query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Method used to export an XML version of the data represented in the generated graph with duration type specific
public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType) { inputButton.addActionListener((ActionEvent e) -> { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileFilter(new FileNameExtensionFilter("xml", "xml")); String selectedExtension = fileChooser.getFileFilter().getDescription(); Document resultDoc = null; int option = fileChooser.showSaveDialog(null); if(option == JFileChooser.APPROVE_OPTION) { try { if(!inputDurationType.equals("")) resultDoc = generateXmlFile(inputData, elementInGraph, graphName, inputDurationType); else resultDoc = generateXmlFile(inputData, elementInGraph, graphName); } catch (ParserConfigurationException ex) { Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex); } //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+"."+selectedExtension)); Source input = new DOMSource(resultDoc); try { TransformerFactory tf = TransformerFactory.newInstance(); Transformer t; t = tf.newTransformer(); t.setOutputProperty(OutputKeys.INDENT, "yes"); t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3"); t.transform(input, output); } catch (IllegalArgumentException | TransformerException ex) { } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType) throws ParserConfigurationException\r\n {\r\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n Document doc = docBuilder.newDocument();\r\n \r\n Date date = new Date();\r\n long time = date.getTime();\r\n Timestamp ts = new Timestamp(time);\r\n \r\n //Nodo Radice export_results\r\n Element export_results = doc.createElement(\"export_results\");\r\n export_results.setAttribute(\"date\", \"\"+ts);\r\n doc.appendChild(export_results);\r\n \r\n //Figlo del nodo radice export_results\r\n Element graph = doc.createElement(\"graph\");\r\n graph.setAttribute(\"name\", graphName);\r\n export_results.appendChild(graph);\r\n \r\n //Popolo iterando sulla mappa i nodi interni del TAG graph\r\n for(String mapKey : inputData.keySet())\r\n {\r\n //System.out.println(\"Key: \" + mapKey + \" - - Value: \" + inputData.get(mapKey));\r\n \r\n Element singleElementInGraph = doc.createElement(elementInGraph);\r\n singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey)));\r\n if(inputDurationType.equals(\"CHORD\") || inputDurationType.equals(\"REST\") || inputDurationType.equals(\"BOTH\"))\r\n {\r\n singleElementInGraph.setAttribute(\"den\", mapKey);\r\n singleElementInGraph.setAttribute(\"num\", \"1\"); \r\n }\r\n graph.appendChild(singleElementInGraph);\r\n }\r\n return doc;\r\n }", "public String durationToXML(Duration duration){\r\n String output;\r\n long day;\r\n long hr;\r\n long min;\r\n day = duration.toDays();\r\n hr = duration.minusDays(day).toHours();\r\n min = duration.minusDays(day).minusHours(hr).toMinutes();\r\n output = \"<duration>\"+\"<day>\" + day +\"</day>\" +\"<hr>\" + hr +\"</hr>\" +\"<mn>\" + min +\"</mn>\" +\"</duration>\";\r\n return output;\r\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public String toXml() throws JAXBException {\n JAXBContext jc = JAXBContext.newInstance(TimeModel.class);\n Marshaller marshaller = jc.createMarshaller();\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n StringWriter out = new StringWriter();\n marshaller.marshal(this, out);\n return out.toString();\n }", "public String toXML(int indent) {\n\t\tStringBuffer xmlBuf = new StringBuffer();\n\t\t//String xml = \"\";\n\n\t\tsynchronized (xmlBuf) {\n\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"<ScheduleEvent>\\n\");\n\t\t\t//xml += \"<ScheduleEvent>\\n\";\n\n\t\t\tindent++;\n\n\t\t\tif (crid != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Program crid=\\\"\");\n\t\t\t\txmlBuf.append(crid.getCRID());\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml = xml + \"<Program crid=\\\"\"+crid.getCRID()+\"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (programURL != null) {\n\t\t\t\txmlBuf.append(programURL.toXML(indent));\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\t//xml = xml + programURL.toXML(indent) + \"\\n\";\n\t\t\t}\n\n\t\t\tif (imi != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<InstanceMetadataId>\");\n\t\t\t\txmlBuf.append(imi.getInstanceMetadataId());\n\t\t\t\txmlBuf.append(\"</InstanceMetadataId>\\n\");\n\t\t\t\t//xml = xml +\n\t\t\t\t// \"<InstanceMetadataId>\"+imi.getInstanceMetadataId()+\"</InstanceMetadataId>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedStartTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedStartTime>\");\n\t\t\t\txmlBuf\n\t\t\t\t\t\t.append(TimeToolbox\n\t\t\t\t\t\t\t\t.makeTVATimeString(publishedStartTime));\n\t\t\t\txmlBuf.append(\"</PublishedStartTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedStartTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedStartTime) +\n\t\t\t\t// \"</PublishedStartTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedEndTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedEndTime>\");\n\t\t\t\txmlBuf.append(TimeToolbox.makeTVATimeString(publishedEndTime));\n\t\t\t\txmlBuf.append(\"</PublishedEndTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedEndTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedEndTime) +\n\t\t\t\t// \"</PublishedEndTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedDuration != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedDuration>\");\n\t\t\t\txmlBuf.append(publishedDuration.getDurationAsString());\n\t\t\t\txmlBuf.append(\"</PublishedDuration>\\n\");\n\t\t\t\t//xml += \"<PublishedDuration>\"+\n\t\t\t\t// publishedDuration.getDurationAsString() +\n\t\t\t\t// \"</PublishedDuration>\\n\";\n\t\t\t}\n\n\t\t\tif (live != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Live value=\\\"\");\n\t\t\t\txmlBuf.append(live);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Live value=\\\"\" + live + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (repeat != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Repeat value=\\\"\");\n\t\t\t\txmlBuf.append(repeat);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Repeat value=\\\"\" + repeat + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (firstShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<FirstShowing value=\\\"\");\n\t\t\t\txmlBuf.append(firstShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<FirstShowing value=\\\"\" + firstShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (lastShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<LastShowing value=\\\"\");\n\t\t\t\txmlBuf.append(lastShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<LastShowing value=\\\"\" + lastShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (free != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Free value=\\\"\");\n\t\t\t\txmlBuf.append(free);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Free value=\\\"\" + free + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (ppv != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PayPerView value=\\\"\");\n\t\t\t\txmlBuf.append(ppv);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<PayPerView value=\\\"\" + ppv + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < indent - 1; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"</ScheduleEvent>\");\n\t\t\t//xml += \"</ScheduleEvent>\";\n\n\t\t\treturn xmlBuf.toString();\n\t\t}\n\t}", "private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName) throws ParserConfigurationException\r\n {\r\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n Document doc = docBuilder.newDocument();\r\n \r\n Date date = new Date();\r\n long time = date.getTime();\r\n Timestamp ts = new Timestamp(time);\r\n \r\n //Nodo Radice export_results\r\n Element export_results = doc.createElement(\"export_results\");\r\n export_results.setAttribute(\"date\", \"\"+ts);\r\n doc.appendChild(export_results);\r\n \r\n //Figlo del nodo radice export_results\r\n Element graph = doc.createElement(\"graph\");\r\n graph.setAttribute(\"name\", graphName);\r\n export_results.appendChild(graph);\r\n \r\n //Popolo iterando sulla mappa i nodi interni del TAG graph\r\n for(String mapKey : inputData.keySet())\r\n {\r\n //System.out.println(\"Key: \" + mapKey + \" - - Value: \" + inputData.get(mapKey));\r\n \r\n Element singleElementInGraph = doc.createElement(elementInGraph);\r\n singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey)));\r\n singleElementInGraph.setAttribute(\"type\", mapKey);\r\n graph.appendChild(singleElementInGraph);\r\n }\r\n return doc;\r\n }", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "Element toXML();", "org.apache.xmlbeans.XmlString xgetDuration();", "private void exportGraphML()\r\n {\r\n // Create the file filter.\r\n SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n new SimpleFileFilter(\"xml\", \"Graph ML (*.xml)\")\r\n };\r\n \r\n // Save the file.\r\n String file = openFileChooser(false, filters);\r\n \r\n // Write the file.\r\n if (file != null)\r\n {\r\n String extension = file.substring(file.length() - 4);\r\n if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n Writer.writeGraphML(m_graph, file);\r\n }\r\n }", "protected abstract void toXml(PrintWriter result);", "public String generateXML() \n { \n \n String xml = new String();\n \n String nodetype = new String();\n if (type.equals(\"internal\")){\n nodetype = \"INTERNAL\"; //change this for change in XML node name\n }\n else {\n nodetype = \"LEAF\"; //change this for change in XML node name\n }\n \n xml = \"<\" + nodetype;\n if (!name.equals(\"\")){\n xml = xml + \" name = \\\"\" + name + \"\\\"\";\n }\n if (length >0){\n xml = xml + \" length = \\\"\" + length + \"\\\"\";\n }\n //Section below tests tree size and depths\n // if (level > 0){\n // xml = xml + \" level = \\\"\" + level + \"\\\"\";\n // }\n //if (depth > 0){\n // xml = xml + \" depth = \\\"\" + depth + \"\\\"\";\n //}\n //if (newicklength > 0){\n // xml = xml + \" newicklength = \\\"\" + newicklength + \"\\\"\";\n //}\n // if (treesize > 0){\n // xml = xml + \" treesize = \\\"\" + treesize + \"\\\"\";\n //}\n //if (startxcoord >= 0){\n // xml = xml + \" startx = \\\"\" + startxcoord + \"\\\"\";\n //}\n //if (endxcoord >= 0){\n // xml = xml + \" endx = \\\"\" + endxcoord + \"\\\"\";\n //}\n //Test section done\n xml = xml + \">\";\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n xml = xml + child.generateXML(); //The recursive coolness happens here!\n }\n }\n xml = xml + \"</\" + nodetype + \">\";\n \n return xml;\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String toXML() {\n StringBuilder xml = new StringBuilder();\n\n //just do the decomposition facts (not the surrounding element) - to keep life simple\n xml.append(super.toXML());\n\n for (YParameter parameter : _enablementParameters.values()) {\n xml.append(parameter.toXML());\n }\n for (YAWLServiceReference service : _yawlServices.values()) {\n xml.append(service.toXML());\n }\n return xml.toString();\n }", "protected String toXMLFragment() {\n StringBuffer xml = new StringBuffer();\n if (isSetStepConfig()) {\n StepConfig stepConfig = getStepConfig();\n xml.append(\"<StepConfig>\");\n xml.append(stepConfig.toXMLFragment());\n xml.append(\"</StepConfig>\");\n } \n if (isSetExecutionStatusDetail()) {\n StepExecutionStatusDetail executionStatusDetail = getExecutionStatusDetail();\n xml.append(\"<ExecutionStatusDetail>\");\n xml.append(executionStatusDetail.toXMLFragment());\n xml.append(\"</ExecutionStatusDetail>\");\n } \n return xml.toString();\n }", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public static boolean exportToXML() {\n\t\ttry {\n\t\t\tDocument doc = new Document();\n\t\t\tdoc.setRootElement(new Element(\"Transactions\"));\n\n\t\t\tFile file = new File(Consts.XML_EXPORT_FILE_PATH);\n\t\t\tfile.getParentFile().mkdirs();\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\n\t\t\tArrayList<Transaction> trans = BlockTransLogic.getInstance().getTrans();\n\n\t\t\tfor (Transaction t : trans) {\n\t\t\t\tif (t.getStatus().equals(E_TransStatus.Executed)) {\n\t\t\t\t\tElement element = new Element(\"Transaction\");\n\t\t\t\t\telement.setAttribute(\"ID\", String.valueOf(t.getID()));\n\t\t\t\t\telement.setAttribute(\"Size\", String.valueOf(t.getSize()));\n\t\t\t\t\telement.setAttribute(\"Type\", (t.getType() == null ? \"\" : t.getType().toString()));\n\t\t\t\t\telement.setAttribute(\"Fee\", String.valueOf(t.getFee()));\n\t\t\t\t\telement.setAttribute(\"Status\", (t.getStatus().toString()));\n\t\t\t\t\telement.setAttribute(\"ExecutaionDate\", t.getAdditionDate().toString());\n\t\t\t\t\tdoc.getRootElement().addContent(element);\n\t\t\t\t}\n\t\t\t}\n\t\t\tXMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());\n\t\t\txmlOutputter.output(doc, new FileOutputStream(file));\n\n\t\t\tSystem.out.println(\"Exported To XML XDXD\");\n\t\t\treturn true;\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "public ExportGraph()\n {\n }", "private static void writeDimesnions() throws IOException {\r\n\t\tDate date = new Date();\r\n\t\t bw.write( \"<> a owl:Ontology ; \\n\"\r\n\t\t \t+ \" rdfs:label \\\"GeoKnow Spatical Data Qaluty DataCube Knowledge Base\\\" ;\\n\"\r\n\t\t \t+ \" dc:description \\\"This knowledgebase contains 3 different DataCubes with different dimensions and measures.\\\" .\\n\\n\"\r\n\t//-----------------------Dataset----------------------------\r\n\t\t \t+ \"#\\n #Data Set \\n # \\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds1> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\" Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd1> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds2> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd2> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\t\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds3> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd3> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\r\n //-----------------Data Cube 1 Structure Definitions-----------------------------------------\r\n\t\t\t+ \"# \\n# Data Structure Definitions \\n # \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube1\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd1/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube2\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd2/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube3\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd3/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c3> . \\n\\n\"\r\n\t\r\n\t//-----------------------Component Specifications-------------------------------------------------------------------\r\n\t\t\t+ \" # \\n #Componenet Specifications\\n #\\n \"\t\t\r\n\t\t\t//-------------DataCube1------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class \\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Coverage . \\n\\n\"\t\t\t\t\r\n\t\t\t//-------------DataCube2------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Weighted Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:WeightedCoverage . \\n\\n\"\t\r\n\t\t\t//-------------DataCube3------------------------------------\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Dataset\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Dataset . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Structuredness\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Structuredness . \\n\\n\"\t\t\t\t\r\n\t//-----------------------Dimensions, Unit and Measure ---------------------------------------------------------\t\t\r\n\t\t\t+ \"### \\n ## Dimensions, Unit, and Measure\\n##\\n\"\r\n\t\t\t+ \"gk-dim:Class a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class of a dataset\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:TimeStamp a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Time Stamp\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:Dataset a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset name\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Coverage a qb:MeasureProperty ; \\n\"\t\r\n\t\t\t+ \" rdfs:label \\\"Class Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:WeightedCoverage a qb:MeasureProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class Weighted Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Structuredness a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset Structuredness\\\"@en .\\n\\n\"\r\n\t\t\t\t );\r\n\t\t\r\n\t}", "void xsetDuration(org.apache.xmlbeans.XmlDuration duration);", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName);\r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "public void transformToSecondXml();", "private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "private void exportTreeML()\r\n {\r\n // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Save the file.\r\n// String file = openFileChooser(false, filters);\r\n// \r\n// // Write the file.\r\n// if (file != null)\r\n// {\r\n// String extension = file.substring(file.length() - 4);\r\n// if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n// Writer.writeTreeML(m_gtree, file);\r\n// }\r\n }", "public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "void export(String path, TimeSeries<?> series);", "public String toXML() {\n return null;\n }", "@Override public void outputXml(IvyXmlWriter xw)\n{\n outputHeader(xw);\n xw.field(\"TYPE\",(is_trigger ? \"TRIGGER\" : \"TIMED\"));\n xw.field(\"MINTIME\",min_time);\n xw.field(\"MAXTIME\",max_time);\n base_condition.outputXml(xw);\n outputTrailer(xw);\n}", "abstract void toXML(StringBuilder xml, int level);", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "void xsetDuration(org.apache.xmlbeans.XmlString duration);", "public static void timeExport() throws ClassNotFoundException, SQLException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tTimeGraph tg = new TimeGraph(conn);\n\t\ttg.pointList();\n\t\ttg.export(\"/Users/Brian/Desktop/PresDeb1_time.csv\");\n\t}", "public String toXML() {\n return null;\n }", "void toXml(OutputStream out, boolean format) throws IOException;", "public String toXml() throws Exception {\r\n\t\tJAXBContext jc = JAXBContext.newInstance(TaskTypes.class);\r\n\t\tMarshaller m = jc.createMarshaller();\r\n\t\tStringWriter sw = new StringWriter();\r\n\t\tm.marshal(this, sw);\r\n\t\treturn sw.toString();\r\n\t}", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "public void dumpAsXmlFile(String pFileName);", "org.apache.xmlbeans.XmlDuration xgetDuration();", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "@Override protected void outputLocalXml(IvyXmlWriter xw)\n{\n xw.field(\"KIND\",\"FLOAT\");\n}", "public String saveTypesAsXML(TextLabels labels) {\n\t\tStringBuffer buf = new StringBuffer(\"<extractions>\\n\");\n\t\tfor (Iterator i=labels.getTypes().iterator(); i.hasNext(); ) {\n\t\t\tString type = (String)i.next();\n\t\t\tfor (Span.Looper j=labels.instanceIterator(type); j.hasNext(); ) {\n\t\t\t\tSpan s = j.nextSpan();\n\t\t\t\tint lo = s.getTextToken(0).getLo();\n\t\t\t\tint hi = s.getTextToken(s.size()-1).getHi();\n\t\t\t\tbuf.append(\" <\"+type+\" lo=\"+lo+\" hi=\"+hi+\">\"+s.asString()+\"</\"+type+\">\\n\");\n\t\t\t}\n\t\t}\n\t\tbuf.append(\"</extractions>\\n\");\n\t\treturn buf.toString();\n\t}", "private static void exportToGraphML(SimState state, String filename) {\n\t\tVertexNameProvider<Agent> vertexIDProvider = new VertexNameProvider<Agent>() { \n\t\t\t@Override\n\t\t\tpublic String getVertexName(Agent a) { return String.valueOf(a.getId()); }\n\t\t}; \n\t\tVertexNameProvider<Agent> vertexNameProvider = new VertexNameProvider<Agent>() { \n\t\t\t@Override\n\t\t\tpublic String getVertexName(Agent a) { return String.valueOf(a.getHS()); }\n\t\t};\n\t\tEdgeNameProvider<DefaultEdge> edgeIDProvider = new EdgeNameProvider<DefaultEdge>() {\n\t\t\t@Override \n\t\t\tpublic String getEdgeName(DefaultEdge edge) {\n\t\t\t\treturn g.getEdgeSource(edge) + \" > \" + g.getEdgeTarget(edge); } \n\t\t\t}; \n EdgeNameProvider<DefaultEdge> edgeLabelProvider = new EdgeNameProvider<DefaultEdge>() { \n @Override \n public String getEdgeName(DefaultEdge edge) { \n return String.valueOf(g.getEdgeWeight(edge)); \n } \n }; \n\t GraphMLExporter<Agent, DefaultEdge> exporter =\n\t \t\tnew GraphMLExporter<Agent, DefaultEdge>(vertexIDProvider, vertexNameProvider, edgeIDProvider, edgeLabelProvider);\n\t FileWriter w;\n\t\ttry {\n\t\t\tw = new FileWriter(filename+\".graphml\");\n\t\t\texporter.export(w, g); // ((SN) state).g\n\t\t\tw.close();\n\t\t} catch (Exception e) {\n\t\t\tprintlnSynchronized(e.getMessage());\n\t\t}\n\t\t\n\t}", "@Get(\"xml\")\n public Representation toXml() {\n\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = getMetadata(status, access,\n \t\t\tgetRequestQueryValues());\n \tmetadata.remove(0);\n\n List<String> pathsToMetadata = buildPathsToMetadata(metadata);\n\n String xmlOutput = buildXmlOutput(pathsToMetadata);\n\n // Returns the XML representation of this document.\n StringRepresentation representation = new StringRepresentation(xmlOutput,\n MediaType.APPLICATION_XML);\n\n return representation;\n }", "@Test\n public void testSerializeXMLObject() {\n //Test to see if serialization is succesful for default. NOTE THIS PATH MUST BE CHANGED FOR EVERY USER!!\n //This is done in this way, without using the read operation to ensure a problem with read does not affect the serialization test.\n System.out.println(\"Testing MeasuredRatioModel's serializeXMLObject(String filename)\");\n String filename= System.getProperty(\"user.dir\");\n filename=filename.concat(File.separator);\n filename=filename.concat(\"test_SerializeXMLObject_MeasuredRatioModel\");\n \n MeasuredRatioModel instance = new MeasuredRatioModel();\n MeasuredRatioModel myValueModel = null;\n //Write file to disk\n instance.serializeXMLObject(filename);\n //Read back\n try{\n XStream xstream = instance.getXStreamReader();\n boolean isValidOrAirplaneMode = instance.validateXML(filename);\n if (isValidOrAirplaneMode) {\n BufferedReader reader = URIHelper.getBufferedReader(filename);\n try {\n myValueModel = (MeasuredRatioModel) xstream.fromXML(reader);\n } catch (ConversionException e) {\n throw new ETException(null, e.getMessage());\n }\n }\n }\n catch(java.io.FileNotFoundException | org.earthtime.exceptions.ETException e){\n System.out.println(e);\n }\n String expResult=instance.getXStreamWriter().toXML(instance);\n String result=instance.getXStreamWriter().toXML(myValueModel);\n assertEquals(expResult,result);\n \n //Tests if serialization works for specified ValueModels\n instance=new MeasuredRatioModel(\"r207_339\",new BigDecimal(\"12.34567890\"),\"PCT\",new BigDecimal(\".9876543210\"),true,true); \n myValueModel = null; \n //Write file to disk\n instance.serializeXMLObject(filename);\n //Read back\n try{\n XStream xstream = instance.getXStreamReader();\n boolean isValidOrAirplaneMode = instance.validateXML(filename);\n if (isValidOrAirplaneMode) {\n BufferedReader reader = URIHelper.getBufferedReader(filename);\n try {\n myValueModel = (MeasuredRatioModel) xstream.fromXML(reader);\n } catch (ConversionException e) {\n throw new ETException(null, e.getMessage());\n }\n }\n }\n catch(FileNotFoundException | ETException e){\n System.out.println(e);\n }\n expResult=instance.getXStreamWriter().toXML(instance);\n result=instance.getXStreamWriter().toXML(myValueModel);\n assertEquals(expResult,result);\n }", "public void serialize(final javax.xml.namespace.QName parentQName,\n javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)\n throws javax.xml.stream.XMLStreamException,\n org.apache.axis2.databinding.ADBException {\n java.lang.String namespace = parentQName.getNamespaceURI();\n java.lang.String _localName = parentQName.getLocalPart();\n\n writeStartElement(null, namespace, _localName, xmlWriter);\n\n // add the type details if this is used in a simple type\n if (serializeType) {\n java.lang.String namespacePrefix = registerPrefix(xmlWriter,\n \"http://schemas.microsoft.com/2003/10/Serialization/\");\n\n if ((namespacePrefix != null) &&\n (namespacePrefix.trim().length() > 0)) {\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"type\",\n namespacePrefix + \":duration\", xmlWriter);\n } else {\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"type\",\n \"duration\", xmlWriter);\n }\n }\n\n if (localDuration == null) {\n throw new org.apache.axis2.databinding.ADBException(\n \"duration cannot be null !!\");\n } else {\n xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n localDuration));\n }\n\n xmlWriter.writeEndElement();\n }", "public String toXml() {\n\t\treturn(toString());\n\t}", "@Override\n public void toXML(Node node)\n {\n super.toXML(node);\n\n Document document = node.getOwnerDocument();\n\n Element e = document.createElement(\"lethal-range\");\n e.setTextContent(String.valueOf(this.getLethalRange()));\n node.appendChild(e);\n\n e = document.createElement(\"pk\");\n e.setTextContent(String.valueOf(this.getPk()));\n node.appendChild(e);\n\n e = document.createElement(\"max-gs\");\n e.setTextContent(String.valueOf(this.getMaxGs()));\n node.appendChild(e);\n }", "@Override\n public String toXML() {\n if (_xml == null)\n _xml = String.format(XML, getStanzaId(), to);\n return _xml;\n }", "@Override\r\n\tpublic XMLConvertor<?> getXMLConveter() throws OneM2MException {\n\t\treturn ConvertorFactory.getXMLConvertor(TimeSeries.class, TimeSeries.SCHEMA_LOCATION);\r\n\t}", "void xsetDuration(org.apache.xmlbeans.XmlInt duration);", "@Override\n public boolean save(String file) {\n /*\n Create a builder for the specific JSON format\n */\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setPrettyPrinting();\n JsonSerializer<DWGraph_DS> serializer = new JsonSerializer<DWGraph_DS>() {\n @Override\n public JsonElement serialize(DWGraph_DS dwGraph_ds, Type type, JsonSerializationContext jsonSerializationContext) {\n JsonObject jsonGraph = new JsonObject();\n jsonGraph.add(\"Nodes\", new JsonArray());\n jsonGraph.add(\"Edges\", new JsonArray());\n\n for (node_data node : G.getV()) {\n JsonObject jsonNodeObject = new JsonObject();\n\n StringBuilder pos = new StringBuilder();\n pos.append(node.getLocation().x());\n pos.append(',');\n pos.append(node.getLocation().y());\n pos.append(',');\n pos.append(node.getLocation().z());\n jsonNodeObject.addProperty(\"pos\", pos.toString());\n jsonNodeObject.addProperty(\"id\", node.getKey());\n jsonNodeObject.addProperty(\"info\", node.getInfo());\n jsonNodeObject.addProperty(\"tag\", node.getTag());\n jsonGraph.get(\"Nodes\").getAsJsonArray().add(jsonNodeObject);\n for (edge_data e : G.getE(node.getKey())) {\n JsonObject jsonEdgeObject = new JsonObject();\n jsonEdgeObject.addProperty(\"src\", e.getSrc());\n jsonEdgeObject.addProperty(\"w\", e.getWeight());\n jsonEdgeObject.addProperty(\"dest\", e.getDest());\n jsonEdgeObject.addProperty(\"info\", e.getInfo());\n jsonEdgeObject.addProperty(\"tag\", e.getTag());\n jsonGraph.get(\"Edges\").getAsJsonArray().add(jsonEdgeObject);\n }\n }\n return jsonGraph;\n }\n };\n gsonBuilder.registerTypeAdapter(DWGraph_DS.class, serializer);\n Gson graphGson = gsonBuilder.create();\n try {\n PrintWriter writer = new PrintWriter(new FileWriter(file));\n writer.write(graphGson.toJson(G));\n writer.flush();\n writer.close();\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public void toXml(XmlContext xc) {\n\n }", "private String getExpectedXMLOutput() {\r\n\t\tStringBuffer xml = new StringBuffer();\r\n\t\txml.append(\"<ddms:verticalExtent \").append(getXmlnsDDMS()).append(\" \");\r\n\t\txml.append(\"ddms:unitOfMeasure=\\\"\").append(TEST_UOM).append(\"\\\" \");\r\n\t\txml.append(\"ddms:datum=\\\"\").append(TEST_DATUM).append(\"\\\">\\n\\t\");\r\n\t\txml.append(\"<ddms:\").append(getTestMinVerticalExtentName()).append(\">\").append(TEST_MIN);\r\n\t\txml.append(\"</ddms:\").append(getTestMinVerticalExtentName()).append(\">\\n\\t\");\r\n\t\txml.append(\"<ddms:\").append(getTestMaxVerticalExtentName()).append(\">\").append(TEST_MAX);\r\n\t\txml.append(\"</ddms:\").append(getTestMaxVerticalExtentName()).append(\">\\n\");\r\n\t\txml.append(\"</ddms:verticalExtent>\");\r\n\t\treturn (xml.toString());\r\n\t}", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "public void serialize(final javax.xml.namespace.QName parentQName,\n javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)\n throws javax.xml.stream.XMLStreamException,\n org.apache.axis2.databinding.ADBException {\n if (localDuration == null) {\n java.lang.String namespace = \"http://schemas.microsoft.com/2003/10/Serialization/\";\n writeStartElement(null, namespace, \"duration\", xmlWriter);\n\n // write the nil attribute\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"nil\", \"1\",\n xmlWriter);\n xmlWriter.writeEndElement();\n } else {\n localDuration.serialize(MY_QNAME, xmlWriter);\n }\n }", "public void dump( Result out ) throws JAXBException;", "public String export() {\r\n\t\tString result = String.format(\"LaneData\\tlaneID:\\t%d\", getID());\r\n\r\n\t\tfor (Integer laneID : getUpLaneIDs())\t\t\t\t\r\n\t\t\tresult += String.format(\"\\tup:\\t%d\", laneID); \r\n\t\tfor (Integer laneID : getDownLaneIDs())\r\n\t\t\tresult += String.format(\"\\tdown:\\t%d\", laneID); \r\n\t\tif (getCrossingYieldToLaneList() != null) {\r\n\t\t\tfor (Lane yLane : getCrossingYieldToLaneList()) {\r\n\t\t\t\tresult += String.format(\"\\tcrossingYieldTo:\\t%d\", yLane.getID()); \r\n\t\t\t}\r\n\t\t}\r\n\t\tif (getMergingYieldToLaneList() != null) {\r\n\t\t\tfor (Lane yLane : getMergingYieldToLaneList()) {\r\n\t\t\t\tresult += String.format(\"\\tmergingYieldTo:\\t%d\", yLane.getID()); \r\n\t\t\t}\r\n\t\t}\r\n\t\tif (getLeft() != null)\r\n\t\t\tresult += String.format(\"\\tleft:\\t%d\", getLeft().getID()); \r\n\t\tif (getRight() != null)\r\n\t\t\tresult += String.format(\"\\tright:\\t%d\", getRight().getID()); \r\n\t\tif (isGoLeft())\r\n\t\t\tresult += String.format(\"\\tgoLeft:\\t%s\", isGoLeft()); \r\n\t\tif (isGoRight())\r\n\t\t\tresult += String.format(\"\\tgoRight:\\t%s\", isGoRight()); \r\n\t\tif (getOrigin() >= 0)\r\n\t\t\tresult += String.format(\"\\torigin:\\t%d\", getOrigin()); \r\n\t\t// FIXME Does not write destination nodes that are not only a sink\r\n\t\tif ((getDestination() >= 0) || crossSectionElement.getCrossSection().getLink().getToNode_r().isSink())\r\n\t\t\tresult += String.format(\"\\tdestination:\\t%d\", getDestination()); \r\n\t\tresult += \"\\n\";\r\n\t\treturn result;\r\n\t}", "public File makeXML(String key, int layerID, String value1, String time1, int totalCopies1, int copyNum1, boolean timerType1, String userId, String time, Certificate cert) {\n\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n Element key1 = document.createElement(\"Search_Result_for\" + key);\n document.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element layerid = document.createElement(\"layerid\");\n\n key1.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(layerID));\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value1));\n layerid.appendChild(Value);\n\n Element timer = document.createElement(\"timer\");\n timer.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(timer);\n\n Element totcopies = document.createElement(\"totcopies\");\n totcopies.appendChild(document.createTextNode(String.valueOf(totalCopies1)));\n layerid.appendChild(totcopies);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum1)));\n layerid.appendChild(copynum);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType1)));\n layerid.appendChild(timertype);\n\n Element userid = document.createElement(\"userid\");\n userid.appendChild(document.createTextNode(userId));\n layerid.appendChild(userid);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(time2);\n\n /*Element cert1 = document.createElement(\"cert\");\n cert1.appendChild(document.createTextNode(String.valueOf(cert)));\n layerid.appendChild((Node) cert);*/\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(layerID + \"_Search Result for \" + key + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n System.out.println(\"Done creating XML File\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(layerID + \"_Search Result for \" + key + \".xml\");\n return file;\n }", "public java.lang.String getXml();", "@GET\n @Produces(MediaType.APPLICATION_XML)\n \n public String getXml() {\n \n return \"<gps_data>\"\n + \"<gps_id>1</gps_id>\"\n + \"<gps_coord>107,-40</gps_coord>\"\n + \"<gps_time>12:00</gps_time>\"\n + \"</gps_data>\";\n }", "private static Element getXML(Module module) {\n\t\tElement moduleEle = new Element(\"Module\");\n\t\tmoduleEle.setAttribute(\"Name\", module.getName());\n\t\tmoduleEle.setAttribute(\"x\", String.valueOf(module.getPoint().x));\n\t\tmoduleEle.setAttribute(\"y\", String.valueOf(module.getPoint().y));\n\n\t\t// save graph information for each state\n\t\tElement statesEle = new Element(\"States\");\n\t\tfor (State state : module.getStates()) {\n\t\t\tstatesEle.addContent(getXML(state));\n\t\t}\n\t\tmoduleEle.addContent(statesEle);\n\n\t\t// save graph information for each transition\n\t\tElement transitionsEle = new Element(\"Transitions\");\n\t\tfor (Transition transition : module.getTransitions()) {\n\t\t\tif (transition.getControl() != null)\n\t\t\t\ttransitionsEle.addContent(getXML(transition));\n\t\t}\n\t\tmoduleEle.addContent(transitionsEle);\n\n\t\treturn moduleEle;\n\t}", "public abstract StringBuffer toXML();", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "public static void exportRouteGraph() {\n try {\n var nodeRouteNr = new ArrayList<Integer>();\n var links = new ArrayList<Pair<Integer, Integer>>();\n\n int[] idx = {0};\n Files.lines(Path.of(Omnibus.class.getResource(\"segments.txt\").getFile())).forEach(line -> {\n String[] parts = line.split(\",\");\n int routeNr = Integer.parseInt(parts[0]) - 1;\n nodeRouteNr.add(routeNr);\n if (parts.length > 5) {\n String[] connections = parts[5].split(\";\");\n for (String c : connections)\n links.add(new Pair(idx[0], Integer.parseInt(c)));\n }\n ++idx[0];\n });\n\n\n File f = Paths.get(\"route-graph.graphml\").toFile();\n var out = new PrintStream(f);\n out.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n out.println(\"<graphml xmlns=\\\"http://graphml.graphdrawing.org/xmlns\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\\\">\");\n out.println(\"<key attr.name=\\\"r\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"r\\\"/>\");\n out.println(\"<key attr.name=\\\"g\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"g\\\"/>\");\n out.println(\"<key attr.name=\\\"b\\\" attr.type=\\\"int\\\" for=\\\"node\\\" id=\\\"b\\\"/>\");\n out.println(\"<graph id=\\\"G\\\" edgedefault=\\\"directed\\\">\");\n for (int n = 0; n < nodeRouteNr.size(); ++n) {\n out.println(\"<node id=\\\"n\" + n + \"\\\">\");\n out.println(\"<data key=\\\"r\\\">\" + (COLOR[nodeRouteNr.get(n)]>>16) + \"</data>\");\n out.println(\"<data key=\\\"g\\\">\" + ((COLOR[nodeRouteNr.get(n)]>>8)&0xff) + \"</data>\");\n out.println(\"<data key=\\\"b\\\">\" + (COLOR[nodeRouteNr.get(n)]&0xff) + \"</data>\");\n out.println(\"</node>\");\n }\n int e = 0;\n for (var link : links)\n out.println(\"<edge id=\\\"e\" + (e++) + \"\\\" source=\\\"n\" + link.p + \"\\\" target=\\\"n\" + link.q + \"\\\"/>\");\n out.println(\"</graph>\");\n out.println(\"</graphml>\");\n out.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "org.apache.xmlbeans.XmlInt xgetDuration();", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public void createGraph(String filename, long time, int stress) throws FileNotFoundException{\n try {\n OutputStream outputstreamdata_reader = openFileOutput(filename, MODE_APPEND);\n OutputStreamWriter outputstreamdata_writer = new OutputStreamWriter(outputstreamdata_reader);\n outputstreamdata_writer.write(time + \",\" + stress + \"\\r\\n\");\n outputstreamdata_writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void exportOutline() {\n boolean modOK = modIfChanged();\n boolean sectionOpen = false;\n int exported = 0;\n if (modOK) {\n fileChooser.setDialogTitle (\"Export Agenda to OPML\");\n fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n File selectedFile = fileChooser.showSaveDialog (this);\n if (selectedFile != null) {\n MarkupWriter writer \n = new MarkupWriter(selectedFile, MarkupWriter.OPML_FORMAT);\n boolean ok = writer.openForOutput();\n if (ok) {\n textMergeScript.clearSortAndFilterSettings();\n int lastSeq = -1;\n for (int i = 0; i < clubEventList.size(); i++) {\n ClubEvent nextClubEvent = clubEventList.get(i);\n if (nextClubEvent != null\n && nextClubEvent.getStatusAsString().contains(\"Current\")) {\n String what = nextClubEvent.getWhat();\n if (exported == 0) {\n writer.startHead();\n writer.writeTitle(\"Minutes for \" + what);\n writer.endHead();\n writer.startBody();\n }\n String seqStr = nextClubEvent.getSeq();\n int seq = Integer.parseInt(seqStr);\n String seqTitle = \"\";\n switch (seq) {\n case 1:\n seqTitle = \"Open Meeting\";\n break;\n case 2:\n seqTitle = \"Finance\";\n break;\n case 3:\n seqTitle = \"Board Info\";\n break;\n case 4:\n seqTitle = \"Recent Events\";\n break;\n case 5:\n seqTitle = \"Upcoming\";\n break;\n case 8:\n seqTitle = \"Communication\";\n break;\n case 9:\n seqTitle = \"Close Meeting\";\n break;\n }\n String category = nextClubEvent.getCategory();\n \n // Start a new outline section for each type of agenda item\n if (seq != lastSeq) {\n if (sectionOpen) {\n writer.endOutline();\n }\n writer.startOutline(seqTitle);\n sectionOpen = true;\n lastSeq = seq;\n }\n \n // Start a new outline item for each event\n writer.startOutline(what);\n String ymd = nextClubEvent.getYmd();\n String when = nextClubEvent.getWhen();\n if (nextClubEvent.hasWhoWithData()) {\n writer.writeOutline(\"Who: \" + nextClubEvent.getWho());\n }\n if (nextClubEvent.hasWhenWithData()) {\n writer.writeOutline(\"When: \" + nextClubEvent.getWhen());\n }\n if (nextClubEvent.hasItemTypeWithData()) {\n writer.writeOutline(\"Item Type: \" + nextClubEvent.getItemType());\n }\n if (nextClubEvent.hasCategoryWithData()) {\n writer.writeOutline(\"Category: \" + nextClubEvent.getCategory());\n }\n if (nextClubEvent.hasStatusWithData()) {\n writer.writeOutline(\"Status: \" + nextClubEvent.getStatusAsString());\n }\n if (nextClubEvent.hasDiscussWithData()) {\n writer.writeOutline(\"To Discuss: \" + nextClubEvent.getDiscuss());\n }\n \n // Action Items\n if (nextClubEvent.hasActionsWithData()) {\n writer.startOutline(\"Action Items\");\n for (int j = 0; j < nextClubEvent.sizeEventActionList(); j++) {\n EventAction action = nextClubEvent.getEventAction(j);\n TextBuilder actionText = new TextBuilder();\n String actionee = action.getActionee();\n if (actionee != null && actionee.length() > 0) {\n actionText.append(actionee + \": \");\n }\n actionText.append(action.getAction());\n writer.writeOutline(actionText.toString());\n }\n writer.endOutline();\n }\n \n // Numbers\n if (nextClubEvent.hasOverUnderWithData()\n || nextClubEvent.hasFinanceProjectionWithData()) {\n writer.startOutline(\"Numbers\");\n \n if (nextClubEvent.hasCost()) {\n writer.writeOutline(\"Cost per Person: \" \n + nextClubEvent.getCost());\n }\n if (nextClubEvent.hasTickets()) {\n writer.writeOutline(\"To Receive Tickets: \" \n + nextClubEvent.getTickets());\n }\n if (nextClubEvent.hasQuantity()) {\n writer.writeOutline(\"Quantity available: \" \n + nextClubEvent.getQuantity());\n }\n if (nextClubEvent.hasPlannedAttendance()) {\n writer.writeOutline(\"Planned Attendance: \" \n + nextClubEvent.getPlannedAttendance());\n }\n if (nextClubEvent.hasActualAttendance()) {\n writer.writeOutline(\"Actual Attendance: \" \n + nextClubEvent.getActualAttendance());\n }\n if (nextClubEvent.hasPlannedIncome()) {\n writer.writeOutline(\"Planned Income: \" \n + nextClubEvent.getPlannedIncome());\n }\n if (nextClubEvent.hasActualIncome()) {\n writer.writeOutline(\"Actual Income: \" \n + nextClubEvent.getActualIncome());\n }\n if (nextClubEvent.hasPlannedExpense()) {\n writer.writeOutline(\"Planned Expense: \" \n + nextClubEvent.getPlannedExpense());\n }\n if (nextClubEvent.hasActualExpense()) {\n writer.writeOutline(\"Actual Expense: \" \n + nextClubEvent.getActualExpense());\n }\n writer.writeOutline(\"Over/Under: \" \n + nextClubEvent.getOverUnder());\n writer.writeOutline(\"Projection: \" \n + nextClubEvent.getFinanceProjection());\n \n writer.endOutline();\n }\n \n // Notes\n if (nextClubEvent.hasNotesWithData()) {\n writer.startOutline(\"Notes\");\n for (int n = 0; n < nextClubEvent.sizeEventNoteList(); n++) {\n EventNote note = nextClubEvent.getEventNote(n);\n TextBuilder noteText = new TextBuilder();\n writer.startOutline(ClubEventCalc.calcNoteHeaderLine(note));\n markdownReader = new StringLineReader(note.getNote());\n MarkdownInitialParser mdParser\n = new MarkdownInitialParser(this);\n MarkdownLine mdLine = mdParser.getNextLine();\n while (mdLine != null) {\n writer.writeOutline(mdLine.getLine());\n mdLine = mdParser.getNextLine();\n }\n writer.endOutline();\n }\n writer.endOutline();\n }\n \n /*\n StringBuilder h3 = new StringBuilder();\n if (ymd != null && ymd.length() > 7) {\n h3.append(when);\n h3.append(\" -- \");\n }\n if (category != null && category.length() > 0) {\n h3.append(category);\n h3.append(\": \");\n }\n h3.append(what);\n writer.writeHeading(3, h3.toString(), \"\");\n \n // Print Who\n exportMinutesField \n (writer, \n \"Who\", \n nextClubEvent.getWho());\n \n // Print Where\n exportMinutesField \n (writer, \n \"Where\", \n nextClubEvent.getWhere());\n \n // Print Finance Projection\n exportMinutesField \n (writer, \n \"Finance Projection\", \n nextClubEvent.getFinanceProjection());\n \n // Print Finance Projection\n exportMinutesField \n (writer, \n \"Over/Under\", \n nextClubEvent.getOverUnder());\n \n // Print Discussion\n exportMinutesField \n (writer, \"For Discussion\", nextClubEvent.getDiscuss());\n \n if (nextClubEvent.sizeEventNoteList() > 0) {\n EventNote note = nextClubEvent.getEventNote(0);\n String via = note.getNoteVia();\n if (via != null && via.equalsIgnoreCase(\"Minutes\")) {\n writer.writeLine(\"Minutes: \");\n writer.writeLine(note.getNote());\n }\n } */\n writer.endOutline();\n exported++;\n } // end if next event not null\n } // end for each item in list\n if (sectionOpen) {\n writer.endOutline();\n }\n writer.endBody();\n writer.close();\n JOptionPane.showMessageDialog(this,\n String.valueOf(exported) + \" Club Events exported successfully to\"\n + GlobalConstants.LINE_FEED\n + selectedFile.toString(),\n \"Export Results\",\n JOptionPane.INFORMATION_MESSAGE,\n Home.getShared().getIcon());\n logger.recordEvent (LogEvent.NORMAL, String.valueOf(exported) \n + \" Club Events exported as minutes to \" \n + selectedFile.toString(),\n false);\n statusBar.setStatus(String.valueOf(exported) \n + \" Club Events exported\");\n } \n if (! ok) {\n logger.recordEvent (LogEvent.MEDIUM,\n \"Problem exporting Club Events as minutes to \" + selectedFile.toString(),\n false);\n trouble.report (\"I/O error attempting to export club events to \" \n + selectedFile.toString(),\n \"I/O Error\");\n statusBar.setStatus(\"Trouble exporting Club Events\");\n } // end if I/O error\n } // end if user selected an output file\n } // end if were able to save the last modified record\n }", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "String toXmlString() throws IOException;", "public String\ttoXML(int indent) {\n\t\tStringBuffer xmlBuf = new StringBuffer();\n\t\t\n\t\tsynchronized(xmlBuf) {\n\t\t\t// Do tabs\n\t\t\tfor (int i=0;i<indent;i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t}\n\t\t\txmlBuf.append(\"<SegmentInformationTable \");\n\t\t\t\n\t\t\tif (timeUnitSet) {\n\t\t\t\txmlBuf.append(\"timeUnit=\\\"\");\n\t\t\t\txmlBuf.append(timeUnit);\n\t\t\t\txmlBuf.append(\"\\\">\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\txmlBuf.append(\">\");\n\t\t\t}\n\t\t\t// Indent and call children\n\t\t\tindent++;\n\t\t\t\n\t\t\tif(segmentList != null) {\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\txmlBuf.append(segmentList.toXML(indent));\n\t\t\t}\n\t\t\tif(segmentGroupList != null) {\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\txmlBuf.append(segmentGroupList.toXML(indent));\n\t\t\t}\n\t\t\txmlBuf.append(\"\\n\");\n\t\t\tfor (int i=0;i<indent-1;i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t}\n\t\t\txmlBuf.append(\"</SegmentInformationTable>\");\n\t\t\treturn xmlBuf.toString();\n\t\t}\n\t}", "public static void generateAndSaveExampleGraph() {\n EuclidDirectedGraph graph1 = new EuclidDirectedGraph();\n //vertexes added and created edge\n BoundsGraphVertex ver1 = new BoundsGraphVertex(10, 10, \"source\");\n BoundsGraphVertex ver2 = new BoundsGraphVertex(10, 30, \"secondNode\");\n BoundsGraphVertex ver3 = new BoundsGraphVertex(10, 40, \"thirdNode\");\n BoundsGraphVertex ver4 = new BoundsGraphVertex(10, 50, \"sink\");\n BoundsGraphVertex ver5 = new BoundsGraphVertex(10, 60, \"fiveNode - loop from second\");\n BoundsGraphVertex ver6 = new BoundsGraphVertex(10, 70, \"sixNode - loop from five\");\n BoundsGraphVertex ver7 = new BoundsGraphVertex(10, 80, \"sevenNode - loop from six to third\");\n\n graph1.addNode(ver1);\n graph1.addNode(ver2);\n graph1.addNode(ver3);\n graph1.addNode(ver4);\n graph1.addNode(ver5);\n graph1.addNode(ver6);\n graph1.addNode(ver7);\n //use .addEuclidEdge to compute edge's length automatically\n graph1.addEuclidEdge(ver1, ver2);\n graph1.addEuclidEdge(ver2, ver3);\n graph1.addEuclidEdge(ver3, ver4);\n graph1.addEuclidEdge(ver2, ver5);\n graph1.addEuclidEdge(ver5, ver6);\n graph1.addEuclidEdge(ver6, ver7);\n graph1.addEuclidEdge(ver7, ver3);\n //created graph #2\n EuclidDirectedGraph graph2 = new EuclidDirectedGraph();\n try {\n //save into file from graph #1\n XMLSerializer.write(graph1, \"input.xml\", false);\n //read from file into graph #2\n graph2 = (EuclidDirectedGraph) XMLSerializer.read(\"input.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testWriteElements() {\n Random rnd = new Random();\n ReadablePeriod ObjectToWrite = new MutablePeriod(1+rnd.nextInt(12),rnd.nextInt(60),rnd.nextInt(60),rnd.nextInt(1000));\n ReadablePeriodXMLWriter instance = new ReadablePeriodXMLWriter();\n Element tempElement = instance.writeElements(ObjectToWrite);\n ReadablePeriod result = instance.readElements(tempElement);\n assertEquals(ObjectToWrite, result);\n }", "public String toXML () { \r\n\t\tString XML = \"<QUERY>\" +\r\n\t\t\t\t \"<CONNECTION>\"+this.getConnectionName()+\"</CONNECTION>\" +\r\n\t\t\t \"<STMT>\"+this.getQueryDefinition() + \"</STMT>\" +\r\n\t\t\t\t \"<VALUE-COLUMN>\"+this.getValueColumns()+\"</VALUE-COLUMN>\" +\r\n\t\t\t\t \"<DESCRIPTION-COLUMN>\"+this.getDescriptionColumns()+\"</DESCRIPTION-COLUMN>\" +\r\n\t\t\t\t \"<VISIBLE-COLUMNS>\"+this.getVisibleColumns()+\"</VISIBLE-COLUMNS>\" +\r\n\t\t\t\t \"<INVISIBLE-COLUMNS>\"+(this.getInvisibleColumns() != null ? this.getInvisibleColumns() : \"\") +\"</INVISIBLE-COLUMNS>\" +\r\n\t\t\t\t \"</QUERY>\";\r\n\t\treturn XML;\r\n\t}", "public abstract StringBuffer toXML ();", "public String toXml()\n\t{\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tStringWriter buffer = new StringWriter();\n\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n\t\t\ttransformer.transform(new DOMSource(conferenceInfo), new StreamResult(buffer));\n\t\t\treturn buffer.toString();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override//隔离\r\n\tpublic String getXmlString() {\n\t\tdouble sum=0.0;\r\n\t\tString xAxisName=\"\";\r\n//\t\tString xAxisName=\"调查问卷统计结果\";\r\n\t\tString xmlStr=\"\";\r\n\t xmlStr=\"<chart caption='\"+xAxisName+\"' xAxisName='\"\r\n\t \t+\"' yAxisName='' showValues='1' decimals='0' formatNumberScale='0' \" +\r\n\t \t\t\t\"baseFontSize='14' outCnvBaseFontSize='14'>\";\r\n\r\n\t String[][] array={{\"非常满意\",\"1\"},{\"满意\",\"2\"},{\"一般\",\"3\"},{\"不满意\",\"4\"}};\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t /*for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select count(*) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n\t\t \tsum+=((Long)(list.get(0))).doubleValue();\r\n\t\t }\t \t\r\n\t }\r\n\t \r\n\t for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select round(count(*)/\"+sum+\"*100,2) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n//\t\t \tSystem.out.println(\"被执行!\");\r\n\t\t \txmlStr+=\"<set label='\"+array[i][0]+\"' value='\";\r\n\t\t \txmlStr+=((Double)(list.get(0))).toString()+\r\n//\t\t \t\"%\"+\r\n\t\t \t\"' />\";\r\n\t\t }\t \t \t\r\n\t }*/\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t for(int i=0;i<array.length;i++){\r\n\t \tString HQL=\" select count(*) from XzfyQuestionnaire x\";\r\n\t\t HQL+=\" where x.selectValue='\"+array[i][1]+\"'\";\r\n\t\t List list=super.find(HQL);\r\n\t\t \r\n\t\t if(!list.isEmpty()){\r\n//\t\t \tSystem.out.println(\"被执行!\");\r\n\t\t \txmlStr+=\"<set label='\"+array[i][0]+\"' value='\";\r\n\t\t \txmlStr+=((Long)(list.get(0))).toString()+\"' />\";\r\n\t\t }\t \t\r\n\t }\r\n\t \r\n\t \r\n\t xmlStr+=\"</chart>\";\r\n// \tSystem.out.println(xmlStr); \r\n\t return xmlStr;\r\n\t}", "@XmlJavaTypeAdapter(AbstractOutputMetric.Adapter.class)\r\npublic interface OutputMetric {\r\n\r\n @SuppressWarnings(\"unused\")\r\n public String getKey();\r\n\r\n @JsonValue\r\n @SuppressWarnings(\"unused\")\r\n public String getDescription();\r\n\r\n @SuppressWarnings(\"unused\")\r\n public String getVersion();\r\n\r\n @JsonIgnore\r\n public String[] getXsdNameList();\r\n\r\n public List<ValidationError> validate(File inputXML) throws ValidationException;\r\n\r\n}", "public String toXMLString(){\n\t\treturn \t\n\n\t\t\t\"<SdSeminarID>\" + m_lSdSeminarID + \"</SdSeminarID>\" + \n\t\t\t\"<DozentID>\" + m_lDozentID + \"</DozentID>\" + \n\t\t\t\"<DozentPublikationID>\" + m_lDozentPublikationID + \"</DozentPublikationID>\" + \n\t\t\t\"<DPAutorName>\" + m_sDPAutorName + \"</DPAutorName>\" + \n\t\t\t\"<DPAutorVorname>\" + m_sDPAutorVorname + \"</DPAutorVorname>\" + \n\t\t\t\"<DPVerfassertyp>\" + m_sDPVerfassertyp + \"</DPVerfassertyp>\" + \n\t\t\t\"<DPTitel>\" + m_sDPTitel + \"</DPTitel>\" + \n\t\t\t\"<DPOrt>\" + m_sDPOrt + \"</DPOrt>\" + \n\t\t\t\"<DPVerlag>\" + m_sDPVerlag + \"</DPVerlag>\" + \n\t\t\t\"<DPJahr>\" + m_iDPJahr + \"</DPJahr>\" + \n\t\t\t\"<DPBuchtitel>\" + m_sDPBuchtitel + \"</DPBuchtitel>\" + \n\t\t\t\"<DPZeitschrift>\" + m_sDPZeitschrift + \"</DPZeitschrift>\" + \n\t\t\t\"<DPHeft>\" + m_sDPHeft + \"</DPHeft>\" + \n\t\t\t\"<DPBand>\" + m_sDPBand + \"</DPBand>\" + \n\t\t\t\"<DPSeitenangaben>\" + m_sDPSeitenangaben + \"</DPSeitenangaben>\" + \n\t\t\t\"<DPReihe>\" + m_sDPReihe + \"</DPReihe>\" + \n\t\t\t\"<DPReiheHgName>\" + m_sDPReiheHgName + \"</DPReiheHgName>\" + \n\t\t\t\"<DPReiheHgVorname>\" + m_sDPReiheHgVorname + \"</DPReiheHgVorname>\" + \n\t\t\t\"<DPHgName>\" + m_sDPHgName + \"</DPHgName>\" + \n\t\t\t\"<DPHgVorname>\" + m_sDPHgVorname + \"</DPHgVorname>\" + \n\t\t\t\"<DPAuflage>\" + m_sDPAuflage + \"</DPAuflage>\" + \n\t\t\t\"<DPArt>\" + m_sDPArt + \"</DPArt>\" + \n\t\t\t\"<DPIndex>\" + m_sDPIndex + \"</DPIndex>\" + \n\t\t\t\"<DPAlternativeAusgabe>\" + m_sDPAlternativeAusgabe + \"</DPAlternativeAusgabe>\" + \n\t\t\t\"<DPBemerkung>\" + m_sDPBemerkung + \"</DPBemerkung>\" + \n\t\t\t\"<DPURL>\" + m_sDPURL + \"</DPURL>\" + \n\t\t\t\"<DPISBN>\" + m_sDPISBN + \"</DPISBN>\" + \n\t\t\t\"<DPISSN>\" + m_sDPISSN + \"</DPISSN>\" + \n\t\t\t\"<DPWeiterePersonen>\" + m_sDPWeiterePersonen + \"</DPWeiterePersonen>\" ;\n\t}", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public String getXMLResultXSD() {\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n try {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n DOMImplementation impl = builder.getDOMImplementation();\n\n Document document = impl.createDocument(null, null, null);\n Element root = document.createElement(\"schema\");\n root.setAttribute(\"xmlns\", \"http://www.w3.org/2001/XMLSchema\");\n document.appendChild(root);\n Element resultElement = document.createElement(\"element\");\n resultElement.setAttribute(\"name\", \"result\");\n root.appendChild(resultElement);\n Element complexTypeElement = document.createElement(\"complexType\");\n resultElement.appendChild(complexTypeElement);\n Element sequenceElement = document.createElement(\"sequence\");\n complexTypeElement.appendChild(sequenceElement);\n\n for (TypeMap tSpec : this.serviceSpec.getTypeSpecs()) {\n Element element = document.createElement(\"element\");\n element.setAttribute(\"name\", tSpec.getOutputTag());\n element.setAttribute(\"maxOccurs\", \"unbounded\");\n element.setAttribute(\"minOccurs\", \"0\");\n\n Element complexType = document.createElement(\"complexType\");\n element.appendChild(complexType);\n\n Element simpleContent = document.createElement(\"simpleContent\");\n complexType.appendChild(simpleContent);\n\n Element extension = document.createElement(\"extension\");\n extension.setAttribute(\"base\", \"string\");\n simpleContent.appendChild(extension);\n\n for (Output output : tSpec.getOutputs()) {\n Element attributeElement = document.createElement(\"attribute\");\n extension.appendChild(attributeElement);\n attributeElement.setAttribute(\"name\", output.getAttribute());\n attributeElement.setAttribute(\"type\", \"string\");\n attributeElement.setAttribute(\"use\", \"optional\");\n }\n sequenceElement.appendChild(element);\n }\n\n DOMSource source = new DOMSource(document);\n TransformerFactory tFactory = TransformerFactory.newInstance();\n Transformer transformer = tFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n StringWriter stringWriter = new StringWriter();\n StreamResult streamResult = new StreamResult(stringWriter);\n transformer.transform(source, streamResult);\n\n return stringWriter.toString();\n } catch (TransformerException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n } catch (ParserConfigurationException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n }\n return null;\n }", "public void saveGraph(String dirName, String fileName) {\r\n try {\r\n if (fileName.indexOf('.') < 0) {\r\n StringBuffer buffer = new StringBuffer(fileName);\r\n buffer.append(\".gpx\");\r\n fileName = buffer.toString();\r\n }\r\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(dirName + fileName));\r\n\r\n /* Type of the graph */\r\n if (graph instanceof GraphUnoriented) {\r\n out.writeInt(GRAPH_UNORIENTED);\r\n } else if (graph instanceof GraphOriented) {\r\n out.writeInt(GRAPH_ORIENTED);\r\n }\r\n /* Graph */\r\n out.writeObject(graph);\r\n out.writeObject(graphX);\r\n\r\n /* Scroll position */\r\n out.writeObject(scrollRectangle);\r\n\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }", "public String getXML() {\n\t\tString xml = \"\";\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance( VolumeRs.class );\n\t\t\tMarshaller m = jc.createMarshaller();\n\t\t\tStringWriter stringWriter = new StringWriter();\n\t\t\tm.marshal(this, stringWriter);\n\t\t\txml = stringWriter.toString();\n\t\t} catch (JAXBException ex) {}\n\t\treturn xml;\n\t}", "private static void writeDates(XMLStreamWriter w, RepositoryConnection con, IRI uri)\n\t\tthrows XMLStreamException {\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(uri, DCTERMS.TEMPORAL, null)) {\n\t\t\twhile (res.hasNext()) {\n\t\t\t\tValue v = res.next().getObject();\n\t\t\t\tif (v instanceof IRI) {\n\t\t\t\t\tIRI date = (IRI) v;\n\t\t\t\t\tw.writeStartElement(\"dct:temporal\");\n\t\t\t\t\tw.writeStartElement(\"dct:PeriodOfTime\");\n\t\t\t\t\twriteLiterals(w, con, date, DCAT.START_DATE, \"dcat:startDate\");\n\t\t\t\t\twriteLiterals(w, con, date, DCAT.END_DATE, \"dcat:endDate\");\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t} else {\n\t\t\t\t\tLOG.error(\"Not a date IRI {}\", v.stringValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public XmlDoc.Element toXML () throws Throwable {\n\t\tXmlDocMaker dm = new XmlDocMaker(\"dicom\");\n\t\tif (_uid!=null) dm.add(\"uid\", _uid);\n\t\tif (_id!=null) dm.add(\"id\", _id);\n\t\tif (_desc!=null) dm.add(\"description\", _desc);\n\t\tif (_date!=null) dm.add(\"date\", _date);\n\t\tif (_modality!=null) dm.add(\"modality\", _modality);\n\t\tif (_rpn!=null) dm.add(\"rpn\", _rpn);\n\t\tif (_institution!=null) dm.add(\"institution\", _institution);\n\t\tif (_station!=null) dm.add(\"station\", _station);\n\t\tif (_manufacturer!=null) dm.add(\"manufacturer\", _manufacturer);\n\t\t//\n\t\tdm.push(\"subject\");\n\t\t// These ones are in mf-dicom-study\n\t\tif (_patientSex!=null) dm.add(\"sex\", _patientSex);\n\n\t\tif (_patientAge>0.0) dm.add(\"age\", _patientAge);\n\t\tif (_patientWeight>0.0) dm.add(\"weight\", _patientWeight);\n\t\tif (_patientLength>0.0) dm.add(\"size\", _patientLength);\n\n\t\t// These ones are in mf-dicom-patient\n\t\tif (_patientID!=null) dm.add(\"id\", _patientID);\n\t\tif (_patientName!=null) dm.add(\"name\", _patientName.toString());\n\t\tif (_dob!=null) dm.add(\"dob\", _dob);\n\t\tdm.pop();\n\t\t//\n\t\treturn dm.root();\n\t}", "void setDuration(org.apache.xmlbeans.GDuration duration);", "private Element createBaseTemporalNode(Node relOpNode, XmlProcessor hqmfXmlProcessor) {\n\n\t\tNamedNodeMap attribMap = relOpNode.getAttributes();\n\t\tElement temporallyRelatedInfoNode = hqmfXmlProcessor.getOriginalDoc()\n\t\t\t\t.createElement(\"temporallyRelatedInformation\");\n\t\ttemporallyRelatedInfoNode.setAttribute(TYPE_CODE, attribMap.getNamedItem(TYPE).getNodeValue().toUpperCase());\n\n\t\tElement temporalInfoNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:temporalInformation\");\n\t\tString precisionUnit = \"min\"; // use min by default\n\n\t\tif (attribMap.getNamedItem(OPERATOR_TYPE) != null) {\n\t\t\tString operatorType = attribMap.getNamedItem(OPERATOR_TYPE).getNodeValue();\n\t\t\tString quantity = attribMap.getNamedItem(QUANTITY).getNodeValue();\n\t\t\tString unit = attribMap.getNamedItem(UNIT).getNodeValue();\n\n\t\t\tif (\"seconds\".equals(unit)) {\n\t\t\t\tprecisionUnit = \"s\";\n\t\t\t\tunit = \"s\";\n\t\t\t} else if (\"hours\".equals(unit)) {\n\t\t\t\tunit = \"h\";\n\t\t\t} else if (\"minutes\".equals(unit)) {\n\t\t\t\tunit = \"min\";\n\t\t\t} else {\n\t\t\t\tprecisionUnit = \"d\";\n\t\t\t\tif (\"days\".equals(unit)) {\n\t\t\t\t\tunit = \"d\";\n\t\t\t\t} else if (\"weeks\".equals(unit)) {\n\t\t\t\t\tunit = \"wk\";\n\t\t\t\t} else if (\"months\".equals(unit)) {\n\t\t\t\t\tunit = \"mo\";\n\t\t\t\t} else if (\"years\".equals(unit)) {\n\t\t\t\t\tunit = \"a\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tElement deltaNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:delta\");\n\t\t\tElement lowNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"low\");\n\t\t\tlowNode.setAttribute(UNIT, unit);\n\n\t\t\tElement highNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"high\");\n\t\t\thighNode.setAttribute(UNIT, unit);\n\n\t\t\tif (operatorType.startsWith(\"Greater Than\")) {\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.removeAttribute(UNIT);\n\t\t\t\thighNode.setAttribute(NULL_FLAVOR, \"PINF\");\n\t\t\t\tif (\"Greater Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\t}\n\t\t\t} else if (\"Equal To\".equals(operatorType)) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t} else if (operatorType.startsWith(\"Less Than\")) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, \"0\");\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t\tif (\"Less Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeltaNode.appendChild(lowNode);\n\t\t\tdeltaNode.appendChild(highNode);\n\t\t\ttemporalInfoNode.appendChild(deltaNode);\n\t\t}\n\t\ttemporalInfoNode.setAttribute(\"precisionUnit\", precisionUnit);\n\t\ttemporallyRelatedInfoNode.appendChild(temporalInfoNode);\n\t\treturn temporallyRelatedInfoNode;\n\t}", "@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"使用xml方式存储\");\n\t}", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "public String getGraphName()\n {\n return \"Testabilty Trend Report\";\n }", "public void exportGraphForClade(String clade_name, String out_filepath){\n \t\tIndexHits<Node> foundNodes = findTaxNodeByName(clade_name);\n \t\tNode firstNode = null;\n \t\tif (foundNodes.size() < 1) {\n System.out.println(\"name '\" + clade_name + \"' not found. quitting.\");\n \t\t\treturn;\n \t\t} else if (foundNodes.size() > 1) {\n \t\t System.out.println(\"more than one node found for name '\" + clade_name + \"'not sure how to deal with this. quitting\");\n \t\t} else {\n \t\t for (Node n : foundNodes) {\n \t\t firstNode = n;\n \t\t }\n \t\t}\n \t\t//TraversalDescription CHILDOF_TRAVERSAL = Traversal.description().relationships(RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tPrintWriter out_file;\n \t\ttry {\n \t\t\tout_file = new PrintWriter(new FileWriter(out_filepath));\n \t\t\tout_file.write(\"strict digraph {\\n\\trankdir = RL ;\\n\");\n \t\t\tHashMap<String, String> src2style = new HashMap<String, String>();\n \t\t\tHashMap<Node, String> nd2dot_name = new HashMap<Node, String>();\n \t\t\tint count = 0;\n \t\t\tfor (Node nd : firstNode.traverse(Traverser.Order.BREADTH_FIRST, \n \t\t\t\t\t\t\t\t\t\t\t StopEvaluator.END_OF_GRAPH,\n \t\t\t\t\t\t\t\t\t\t\t ReturnableEvaluator.ALL,\n \t\t\t\t\t\t\t\t\t\t\t RelTypes.TAXCHILDOF,\n \t\t\t\t\t\t\t\t\t\t\t Direction.INCOMING)) {\n \t\t\t\tfor(Relationship rel : nd.getRelationships(RelTypes.TAXCHILDOF,Direction.INCOMING)) {\n \t\t\t\t\tcount += 1;\n \t\t\t\t\tNode rel_start = rel.getStartNode();\n \t\t\t\t\tString rel_start_name = ((String) rel_start.getProperty(\"name\"));\n \t\t\t\t\tString rel_start_dot_name = nd2dot_name.get(rel_start);\n \t\t\t\t\tif (rel_start_dot_name == null){\n \t\t\t\t\t\trel_start_dot_name = \"n\" + (1 + nd2dot_name.size());\n \t\t\t\t\t\tnd2dot_name.put(rel_start, rel_start_dot_name);\n \t\t\t\t\t\tout_file.write(\"\\t\" + rel_start_dot_name + \" [label=\\\"\" + rel_start_name + \"\\\"] ;\\n\");\n \t\t\t\t\t}\n \t\t\t\t\tNode rel_end = rel.getEndNode();\n \t\t\t\t\tString rel_end_name = ((String) rel_end.getProperty(\"name\"));\n \t\t\t\t\tString rel_end_dot_name = nd2dot_name.get(rel_end);\n \t\t\t\t\tif (rel_end_dot_name == null){\n \t\t\t\t\t\trel_end_dot_name = \"n\" + (1 + nd2dot_name.size());\n \t\t\t\t\t\tnd2dot_name.put(rel_end, rel_end_dot_name);\n \t\t\t\t\t\tout_file.write(\"\\t\" + rel_end_dot_name + \" [label=\\\"\" + rel_end_name + \"\\\"] ;\\n\");\n \t\t\t\t\t}\n \t\t\t\t\tString rel_source = ((String) rel.getProperty(\"source\"));\n \t\t\t\t\tString edge_style = src2style.get(rel_source);\n \t\t\t\t\tif (edge_style == null) {\n \t\t\t\t\t\tedge_style = \"color=black\"; // @TMP\n \t\t\t\t\t\tsrc2style.put(rel_source, edge_style);\n \t\t\t\t\t}\n \t\t\t\t\tout_file.write(\"\\t\" + rel_start_dot_name + \" -> \" + rel_end_dot_name + \" [\" + edge_style + \"] ;\\n\");\n \t\t\t\t}\n \t\t\t}\n \t\t\tout_file.write(\"}\\n\");\n \t\t\tout_file.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "private void generateOutgoingReport() {\r\n\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\tstringBuilder.append(\"\\n----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Outgoing Daily Amount \\n\")\r\n\t\t\t\t.append(\"----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Date | Trade Amount \\n\")\r\n\t\t\t\t.append(\"-----------------+----------------------\\n\");\r\n\t\tallOutgoings.entrySet().forEach(\r\n\t\t\t\tkey -> stringBuilder.append(key.getKey() + \" | \" + key.getValue().get() + \"\\n\"));\r\n\t\tdataWriter.write(stringBuilder.toString());\r\n\t}" ]
[ "0.6534556", "0.64213294", "0.6204568", "0.6204568", "0.6204568", "0.57867044", "0.57302076", "0.5689247", "0.56039476", "0.5600945", "0.55746514", "0.5534084", "0.5484811", "0.5461695", "0.5380906", "0.5375498", "0.53520596", "0.534807", "0.53446305", "0.5312892", "0.5298705", "0.52780855", "0.526652", "0.5264978", "0.52604216", "0.52379966", "0.5216699", "0.5216397", "0.5215996", "0.51911867", "0.51865166", "0.51510125", "0.5146089", "0.51351213", "0.5120068", "0.5114125", "0.51133543", "0.511104", "0.5110533", "0.510836", "0.5101867", "0.5090402", "0.5083282", "0.50677115", "0.50579304", "0.50512594", "0.5047406", "0.50445795", "0.5044295", "0.50382096", "0.50358176", "0.5019899", "0.50125176", "0.5002727", "0.5001708", "0.50006354", "0.49897677", "0.4989548", "0.49749026", "0.49707544", "0.49662894", "0.49556062", "0.4949331", "0.49421623", "0.49312642", "0.49299967", "0.4929229", "0.49292254", "0.49235746", "0.49128604", "0.49121264", "0.49101445", "0.49096853", "0.49096853", "0.4905681", "0.4873365", "0.48732027", "0.48710415", "0.48680457", "0.48600686", "0.48462692", "0.48460454", "0.48332438", "0.48283428", "0.48193622", "0.4810033", "0.48092273", "0.4806209", "0.4805769", "0.4789226", "0.47791696", "0.47713777", "0.47459564", "0.47451323", "0.4739733", "0.47369432", "0.47259432", "0.47253618", "0.47128618", "0.47112855" ]
0.61507803
5
Method used to generate the contents of the xml file using the calculated data
private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName) throws ParserConfigurationException { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Date date = new Date(); long time = date.getTime(); Timestamp ts = new Timestamp(time); //Nodo Radice export_results Element export_results = doc.createElement("export_results"); export_results.setAttribute("date", ""+ts); doc.appendChild(export_results); //Figlo del nodo radice export_results Element graph = doc.createElement("graph"); graph.setAttribute("name", graphName); export_results.appendChild(graph); //Popolo iterando sulla mappa i nodi interni del TAG graph for(String mapKey : inputData.keySet()) { //System.out.println("Key: " + mapKey + " - - Value: " + inputData.get(mapKey)); Element singleElementInGraph = doc.createElement(elementInGraph); singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey))); singleElementInGraph.setAttribute("type", mapKey); graph.appendChild(singleElementInGraph); } return doc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createXMLFileForExamResultNew(Report reportData) {\n\t\ttry{\n\t\t\tFile outDir = new File(reportData.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tfor(Student student : reportData.getStudentList()){\n\t\t\t\tString final_weitage=null;\n\t\t\t\tint total_weitage = 0;\t\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((reportData.getSchoolDetails().getSchoolDetailsName() != null ? reportData.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (reportData.getAcademicYear().getAcademicYearName()!= null ? reportData.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement report = doc.createElement(\"report\");\n\t\t\t\treport.appendChild(doc.createTextNode(\"MARKS STATEMENT\"));\n\t\t\t\tstudentList.appendChild(report);\n\t\t\t\n\t\t\t\tElement termdate = doc.createElement(\"termdate\");\n\t\t\t\ttermdate.appendChild(doc.createTextNode((reportData.getSchoolDetails().getExamName()!=null?reportData.getSchoolDetails().getExamName():\"--------\")));\n\t\t\t\tstudentList.appendChild(termdate);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t\tElement bloodgroup = doc.createElement(\"bloodgroup\");\n\t\t\t\tbloodgroup.appendChild(doc.createTextNode((student.getBloodGroup()!=null?student.getBloodGroup():\"NA\")));\n\t\t\t\tstudentList.appendChild(bloodgroup);\n\t\t\t\t\n\t\t\t\tif(student.getResource()!=null){\n\t\t\t\t\tElement fathername = doc.createElement(\"fathername\");\n\t\t\t\t\tfathername.appendChild(doc.createTextNode((student.getResource().getFatherFirstName()!=null?student.getResource().getFatherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(fathername);\n\t\t\t\t\t\n\t\t\t\t\tElement mothername = doc.createElement(\"mothername\");\n\t\t\t\t\tmothername.appendChild(doc.createTextNode((student.getResource().getMotherFirstName()!=null?student.getResource().getMotherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(mothername);\n\t\t\t\t\t\n\t\t\t\t\tElement dob = doc.createElement(\"dob\");\n\t\t\t\t\tdob.appendChild(doc.createTextNode((student.getResource().getDateOfBirth()!=null?student.getResource().getDateOfBirth():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(dob);\n\t\t\t\t\t}\n\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\tif(examObj.getExamName().equalsIgnoreCase(\"PerioDic Test\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"PTexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Note Book\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"NBexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Sub Enrichment\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"SEexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Half Yearly Exam\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"HYexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\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}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t String subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\t\tString subjectTotalChar = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"grade\");\n\t\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*for(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\"); //For Term 2\n\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*String subjectTotalCharecter = \"\";\n\t\t\t\t\t\t\t\tElement totalTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\ttotalTerm2.appendChild(doc.createTextNode((subjectTotalCharecter!=null?subjectTotalCharecter:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(totalTerm2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\tgradeTerm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeTerm2);*/\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term2\")){\n\t\t\t\t\tSystem.out.println(\"within term2\");\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(Subject subjectObj : studentResult.getSubjectList()){\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\tfor(Exam examObj:subjectObj.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalString!=null?subjectTotalString:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t System.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT1\") || reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT2\") ||reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT3\")){\n\t\t\t\tDouble allTotal = 0.00 ;\n\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\n\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement maxmarks = doc.createElement(\"maxmarks\");\n\t\t\t\t\t\tmaxmarks.appendChild(doc.createTextNode((examObj.getExamName()!=null?examObj.getExamName():\"\")));\n\t\t\t\t\t\tsubject.appendChild(maxmarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\") || examObj.getGrade().equalsIgnoreCase(\"NA\")){\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0.0;\n\t\t\t\t\t\t\t\tallTotal = allTotal + 0.0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\tallTotal = allTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\n\t\t\t\t\t/*Element total = doc.createElement(\"total\");\n\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectString!=null?subjectString:\"\")));\n\t\t\t\t\tsubject.appendChild(total);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString allTotalString = String.format( \"%.2f\", allTotal ) ;\n\t\t\t\t\n\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\ttotal.appendChild(doc.createTextNode((allTotalString!=null?allTotalString:\"\")));\n\t\t\t\tstudentList.appendChild(total);\n\t\t\t}\n\t\t\t\t\t\tif(student.getCoScholasticResultList()!=null && student.getCoScholasticResultList().size()!=0){\n\t\t//\t\t\t\t\tSystem.out.println(\"##....... \"+student.getCoScholasticResultList().size());\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Element coscholasticmarks = doc.createElement(\"coscholasticmarks\");\n\t\t\t\t\t\t\t\t\t//studentList.appendChild(coscholasticmarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"physicalEducation\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticphysicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm2.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"discipline\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticdisciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"healtheducation\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*\tElement coscholastichealtheducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm2.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"workeducation\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\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/*Element coscholasticworkeducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm2.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\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}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(reportData.getXmlFilePath()+reportData.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.error(e);\n\t\t\t}\n\t\t}", "public File makeXML(String key, int layerID, String value1, String time1, int totalCopies1, int copyNum1, boolean timerType1, String userId, String time, Certificate cert) {\n\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n Element key1 = document.createElement(\"Search_Result_for\" + key);\n document.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element layerid = document.createElement(\"layerid\");\n\n key1.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(layerID));\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value1));\n layerid.appendChild(Value);\n\n Element timer = document.createElement(\"timer\");\n timer.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(timer);\n\n Element totcopies = document.createElement(\"totcopies\");\n totcopies.appendChild(document.createTextNode(String.valueOf(totalCopies1)));\n layerid.appendChild(totcopies);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum1)));\n layerid.appendChild(copynum);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType1)));\n layerid.appendChild(timertype);\n\n Element userid = document.createElement(\"userid\");\n userid.appendChild(document.createTextNode(userId));\n layerid.appendChild(userid);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(time2);\n\n /*Element cert1 = document.createElement(\"cert\");\n cert1.appendChild(document.createTextNode(String.valueOf(cert)));\n layerid.appendChild((Node) cert);*/\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(layerID + \"_Search Result for \" + key + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n System.out.println(\"Done creating XML File\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(layerID + \"_Search Result for \" + key + \".xml\");\n return file;\n }", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "public String generateXML() \n { \n \n String xml = new String();\n \n String nodetype = new String();\n if (type.equals(\"internal\")){\n nodetype = \"INTERNAL\"; //change this for change in XML node name\n }\n else {\n nodetype = \"LEAF\"; //change this for change in XML node name\n }\n \n xml = \"<\" + nodetype;\n if (!name.equals(\"\")){\n xml = xml + \" name = \\\"\" + name + \"\\\"\";\n }\n if (length >0){\n xml = xml + \" length = \\\"\" + length + \"\\\"\";\n }\n //Section below tests tree size and depths\n // if (level > 0){\n // xml = xml + \" level = \\\"\" + level + \"\\\"\";\n // }\n //if (depth > 0){\n // xml = xml + \" depth = \\\"\" + depth + \"\\\"\";\n //}\n //if (newicklength > 0){\n // xml = xml + \" newicklength = \\\"\" + newicklength + \"\\\"\";\n //}\n // if (treesize > 0){\n // xml = xml + \" treesize = \\\"\" + treesize + \"\\\"\";\n //}\n //if (startxcoord >= 0){\n // xml = xml + \" startx = \\\"\" + startxcoord + \"\\\"\";\n //}\n //if (endxcoord >= 0){\n // xml = xml + \" endx = \\\"\" + endxcoord + \"\\\"\";\n //}\n //Test section done\n xml = xml + \">\";\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n xml = xml + child.generateXML(); //The recursive coolness happens here!\n }\n }\n xml = xml + \"</\" + nodetype + \">\";\n \n return xml;\n }", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createXMLFileForNOC(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\t//for(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\t/*Element schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);*/\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t//}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public void createXMLFileForCertificate(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\tfor(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t//\tStudentResult setudentResult = new\n\t\t\t\t\n\t\t\t\tElement exam = doc.createElement(\"exam\");\n\t\t\t\texam.appendChild(doc.createTextNode((student.getStudentResultList().get(0).getExam()!=null?student.getStudentResultList().get(0).getExam():\"--------\")));\n\t\t\t\tstudentList.appendChild(exam);\n\t\t\t}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "private static String generateXML(String userName, String hash,\n String userID, String ipAddress, String paymentToolNumber,\n String expDate, String cvc, String orderID, String amount,\n String currency) {\n\n try {\n // Create instance of DocumentBuilderFactory\n DocumentBuilderFactory factory = DocumentBuilderFactory\n .newInstance();\n // Get the DocumentBuilder\n DocumentBuilder docBuilder = factory.newDocumentBuilder();\n // Create blank DOM Document\n Document doc = docBuilder.newDocument();\n\n Element root = doc.createElement(\"GVPSRequest\");\n doc.appendChild(root);\n\n Element Mode = doc.createElement(\"Mode\");\n Mode.appendChild(doc.createTextNode(\"PROD\"));\n root.appendChild(Mode);\n\n Element Version = doc.createElement(\"Version\");\n Version.appendChild(doc.createTextNode(\"v0.01\"));\n root.appendChild(Version);\n\n Element Terminal = doc.createElement(\"Terminal\");\n root.appendChild(Terminal);\n\n Element ProvUserID = doc.createElement(\"ProvUserID\");\n // ProvUserID.appendChild(doc.createTextNode(userName));\n ProvUserID.appendChild(doc.createTextNode(\"PROVAUT\"));\n Terminal.appendChild(ProvUserID);\n\n Element HashData_ = doc.createElement(\"HashData\");\n HashData_.appendChild(doc.createTextNode(hash));\n Terminal.appendChild(HashData_);\n\n Element UserID = doc.createElement(\"UserID\");\n UserID.appendChild(doc.createTextNode(\"deneme\"));\n Terminal.appendChild(UserID);\n\n Element ID = doc.createElement(\"ID\");\n ID.appendChild(doc.createTextNode(\"10000039\"));\n Terminal.appendChild(ID);\n\n Element MerchantID = doc.createElement(\"MerchantID\");\n MerchantID.appendChild(doc.createTextNode(userID));\n Terminal.appendChild(MerchantID);\n\n Element Customer = doc.createElement(\"Customer\");\n root.appendChild(Customer);\n\n Element IPAddress = doc.createElement(\"IPAddress\");\n IPAddress.appendChild(doc.createTextNode(ipAddress));\n Customer.appendChild(IPAddress);\n\n Element EmailAddress = doc.createElement(\"EmailAddress\");\n EmailAddress.appendChild(doc.createTextNode(\"aa@b.com\"));\n Customer.appendChild(EmailAddress);\n\n Element Card = doc.createElement(\"Card\");\n root.appendChild(Card);\n\n Element Number = doc.createElement(\"Number\");\n Number.appendChild(doc.createTextNode(paymentToolNumber));\n Card.appendChild(Number);\n\n Element ExpireDate = doc.createElement(\"ExpireDate\");\n ExpireDate.appendChild(doc.createTextNode(\"1212\"));\n Card.appendChild(ExpireDate);\n\n Element CVV2 = doc.createElement(\"CVV2\");\n CVV2.appendChild(doc.createTextNode(cvc));\n Card.appendChild(CVV2);\n\n Element Order = doc.createElement(\"Order\");\n root.appendChild(Order);\n\n Element OrderID = doc.createElement(\"OrderID\");\n OrderID.appendChild(doc.createTextNode(orderID));\n Order.appendChild(OrderID);\n\n Element GroupID = doc.createElement(\"GroupID\");\n GroupID.appendChild(doc.createTextNode(\"\"));\n Order.appendChild(GroupID);\n\n\t\t\t/*\n * Element Description=doc.createElement(\"Description\");\n\t\t\t * Description.appendChild(doc.createTextNode(\"\"));\n\t\t\t * Order.appendChild(Description);\n\t\t\t */\n\n Element Transaction = doc.createElement(\"Transaction\");\n root.appendChild(Transaction);\n\n Element Type = doc.createElement(\"Type\");\n Type.appendChild(doc.createTextNode(\"sales\"));\n Transaction.appendChild(Type);\n\n Element InstallmentCnt = doc.createElement(\"InstallmentCnt\");\n InstallmentCnt.appendChild(doc.createTextNode(\"\"));\n Transaction.appendChild(InstallmentCnt);\n\n Element Amount = doc.createElement(\"Amount\");\n Amount.appendChild(doc.createTextNode(amount));\n Transaction.appendChild(Amount);\n\n Element CurrencyCode = doc.createElement(\"CurrencyCode\");\n CurrencyCode.appendChild(doc.createTextNode(currency));\n Transaction.appendChild(CurrencyCode);\n\n Element CardholderPresentCode = doc\n .createElement(\"CardholderPresentCode\");\n CardholderPresentCode.appendChild(doc.createTextNode(\"0\"));\n Transaction.appendChild(CardholderPresentCode);\n\n Element MotoInd = doc.createElement(\"MotoInd\");\n MotoInd.appendChild(doc.createTextNode(\"N\"));\n Transaction.appendChild(MotoInd);\n\n // Convert dom to String\n TransformerFactory tranFactory = TransformerFactory.newInstance();\n Transformer aTransformer = tranFactory.newTransformer();\n StringWriter buffer = new StringWriter();\n aTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,\n \"yes\");\n aTransformer\n .transform(new DOMSource(doc), new StreamResult(buffer));\n return buffer.toString();\n\n } catch (Exception e) {\n return null;\n }\n\n }", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "public void generateData()\n {\n }", "public File XMLforRoot(String hashid, String key, String value, int LayerId, int copyNum, String timer, boolean timerType, String userid, String Time, Certificate Certi) {\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"Root_Node_For\" + key + \"Copy\" + copyNum);\n document.appendChild(root);\n\n Element hashId = document.createElement(\"HashID\");\n hashId.appendChild(document.createTextNode(hashid));\n root.appendChild(hashId);\n\n Element layerid = document.createElement(\"layerid\");\n hashId.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(LayerId));\n\n Element key1 = document.createElement(\"Key\");\n hashId.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value));\n hashId.appendChild(Value);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum)));\n hashId.appendChild(copynum);\n\n Element timer2 = document.createElement(\"timer\");\n timer2.appendChild(document.createTextNode(String.valueOf(timer)));\n hashId.appendChild(timer2);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType)));\n hashId.appendChild(timertype);\n\n Element userId = document.createElement(\"userId\");\n userId.appendChild(document.createTextNode(String.valueOf(userid)));\n hashId.appendChild(userId);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(Time)));\n hashId.appendChild(time2);\n\n Element cert = document.createElement(\"Certificate\");\n cert.appendChild(document.createTextNode(String.valueOf(Certi)));\n hashId.appendChild(cert);\n\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\");\n return file;\n }", "@Override\n\tpublic byte[] generateOutput() {\n\t\tthis.plainOut = new PlainOutputConversion();\n\n\t\tString output = \"\";\n\t\ttry {\n\t\t\toutput = constructTextfromXML(this.rootXML, true);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn output.getBytes();\n\t}", "public static void main(String[]args){\n XMLOutputter out = new XMLOutputter();\n SAXBuilder sax = new SAXBuilder();\n\n //Objekte die gepseichert werden sollen\n Car car = new Car(\"CR-MD-5\",\"16.05.1998\",4,4,4);\n Car car2 = new Car(\"UL-M-5\",\"11.03.2002\",10,2,5);\n\n\n Element rootEle = new Element(\"cars\");\n Document doc = new Document(rootEle);\n\n //hinzufuegen des ersten autos\n Element carEle = new Element(\"car\");\n carEle.setAttribute(new Attribute(\"car\",\"1\"));\n carEle.addContent(new Element(\"licenseplate\").setText(car.getLicensePlate()));\n carEle.addContent(new Element(\"productiondate\").setText(car.getProductionDate()));\n carEle.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car.getNumberPassengers())));\n carEle.addContent(new Element(\"numberwheels\").setText(Integer.toString(car.getNumberWheels())));\n carEle.addContent(new Element(\"numberdoors\").setText(Integer.toString(car.getNumberDoors())));\n\n //hinzufuegen des zweiten autos\n Element carEle2 = new Element(\"car2\");\n carEle2.setAttribute(new Attribute(\"car2\",\"2\"));\n carEle2.addContent(new Element(\"licenseplate\").setText(car2.getLicensePlate()));\n carEle2.addContent(new Element(\"productiondate\").setText(car2.getProductionDate()));\n carEle2.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car2.getNumberPassengers())));\n carEle2.addContent(new Element(\"numberwheels\").setText(Integer.toString(car2.getNumberWheels())));\n carEle2.addContent(new Element(\"numberdoors\").setText(Integer.toString(car2.getNumberDoors())));\n\n\n doc.getRootElement().addContent(carEle);\n doc.getRootElement().addContent(carEle2);\n\n //Einstellen des Formates auf gut lesbares, eingeruecktes Format\n out.setFormat(Format.getPrettyFormat());\n //Versuche in xml Datei zu schreiben\n try {\n out.output(doc, new FileWriter(\"SaveCar.xml\"));\n } catch (IOException e) {\n System.out.println(\"Error opening File\");\n }\n\n\n //Einlesen\n\n File input = new File(\"SaveCar.xml\");\n Document inputDoc = null;\n //Versuche aus xml Datei zu lesen und Document zu instanziieren\n try {\n inputDoc = (Document) sax.build(input);\n } catch (JDOMException e) {\n System.out.println(\"An Error occured\");\n } catch (IOException e) {\n System.out.print(\"Error opening File\");\n }\n\n //Liste von Elementen der jeweiligen Autos\n List<Element> listCar = inputDoc.getRootElement().getChildren(\"car\");\n List<Element> listCar2 = inputDoc.getRootElement().getChildren(\"car2\");\n\n //Ausgabe der Objekte auf der Konsole (manuell)\n printXML(listCar);\n System.out.println();\n printXML(listCar2);\n\n //Erstellen der abgespeicherten Objekte\n Car savedCar1 = createObj(listCar);\n Car savedCar2 = createObj(listCar2);\n\n System.out.println();\n System.out.println(savedCar1);\n System.out.println();\n System.out.println(savedCar2);\n\n}", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "protected static void writeXML(String path, String ID, String abs,String cls) {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder;\r\n try {\r\n dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.newDocument();\r\n //add elements to Document\r\n Element rootElement =doc.createElement(\"Data\");\r\n //append root element to document\r\n doc.appendChild(rootElement);\r\n\r\n rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls));\r\n //for output to file, console\r\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n Transformer transformer = transformerFactory.newTransformer();\r\n //for pretty print\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n\r\n //write to console or file\r\n StreamResult console = new StreamResult(System.out);\r\n StreamResult file = new StreamResult(new File(path+\"\"+ID+\".xml\"));\r\n\r\n //write data\r\n transformer.transform(source, console);\r\n transformer.transform(source, file);\r\n //System.out.println(\"DONE\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "public void generateXmlFile(IGallery gallery) {\r\n // create gallery node and page nodes for every page, subpage\r\n // and append that nodes to document object\r\n appendGallery(gallery);\r\n\r\n /*\r\n *****\r\n choose directory and file name\r\n *****\r\n */\r\n try {\r\n document.setXmlStandalone(true);\r\n xmlFile = new File(file + \".xml\");\r\n xmlFile.createNewFile();\r\n FileOutputStream outputStream = new FileOutputStream(xmlFile);\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t = tf.newTransformer();\r\n DOMSource dSource = new DOMSource(document);\r\n StreamResult sr = new StreamResult(outputStream);\r\n\r\n // set node indentation in xml\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", indent);\r\n\r\n // add doctype to xml document\r\n DOMImplementation domImpl = document.getImplementation();\r\n DocumentType docType = domImpl.createDocumentType(\"doctype\", ROOT_NODE, DTD_FILE);\r\n t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, docType.getSystemId());\r\n t.transform(dSource, sr);\r\n\r\n outputStream.flush();\r\n outputStream.close();\r\n\r\n zipGallery();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (TransformerException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void transformToSecondXml();", "private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType) throws ParserConfigurationException\r\n {\r\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n Document doc = docBuilder.newDocument();\r\n \r\n Date date = new Date();\r\n long time = date.getTime();\r\n Timestamp ts = new Timestamp(time);\r\n \r\n //Nodo Radice export_results\r\n Element export_results = doc.createElement(\"export_results\");\r\n export_results.setAttribute(\"date\", \"\"+ts);\r\n doc.appendChild(export_results);\r\n \r\n //Figlo del nodo radice export_results\r\n Element graph = doc.createElement(\"graph\");\r\n graph.setAttribute(\"name\", graphName);\r\n export_results.appendChild(graph);\r\n \r\n //Popolo iterando sulla mappa i nodi interni del TAG graph\r\n for(String mapKey : inputData.keySet())\r\n {\r\n //System.out.println(\"Key: \" + mapKey + \" - - Value: \" + inputData.get(mapKey));\r\n \r\n Element singleElementInGraph = doc.createElement(elementInGraph);\r\n singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey)));\r\n if(inputDurationType.equals(\"CHORD\") || inputDurationType.equals(\"REST\") || inputDurationType.equals(\"BOTH\"))\r\n {\r\n singleElementInGraph.setAttribute(\"den\", mapKey);\r\n singleElementInGraph.setAttribute(\"num\", \"1\"); \r\n }\r\n graph.appendChild(singleElementInGraph);\r\n }\r\n return doc;\r\n }", "protected abstract void toXml(PrintWriter result);", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public void build() throws IOException {\n if (packageWriter == null) {\n //Doclet does not support this output.\n return;\n }\n build(layoutParser.parseXML(ROOT), contentTree);\n }", "public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void createPackageContents() {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n calcEClass = createEClass(CALC);\n createEReference(calcEClass, CALC__EXPR);\n\n exprEClass = createEClass(EXPR);\n\n bitShiftExprEClass = createEClass(BIT_SHIFT_EXPR);\n createEReference(bitShiftExprEClass, BIT_SHIFT_EXPR__CHILDREN);\n createEAttribute(bitShiftExprEClass, BIT_SHIFT_EXPR__OPERATORS);\n\n bitShiftExprChildEClass = createEClass(BIT_SHIFT_EXPR_CHILD);\n\n additiveExprEClass = createEClass(ADDITIVE_EXPR);\n createEReference(additiveExprEClass, ADDITIVE_EXPR__CHILDREN);\n createEAttribute(additiveExprEClass, ADDITIVE_EXPR__OPERATORS);\n\n additiveExprChildEClass = createEClass(ADDITIVE_EXPR_CHILD);\n\n multiplicativeExprEClass = createEClass(MULTIPLICATIVE_EXPR);\n createEReference(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__CHILDREN);\n createEAttribute(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__OPERATORS);\n\n multiplicativeExprChildEClass = createEClass(MULTIPLICATIVE_EXPR_CHILD);\n\n numberEClass = createEClass(NUMBER);\n createEAttribute(numberEClass, NUMBER__VALUE);\n\n // Create enums\n bitShiftOpEEnum = createEEnum(BIT_SHIFT_OP);\n additiveOpEEnum = createEEnum(ADDITIVE_OP);\n multiplicativeOpEEnum = createEEnum(MULTIPLICATIVE_OP);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\toml2OTIProvenanceEClass = createEClass(OML2OTI_PROVENANCE);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OML_UUID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OML_IRI);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_ID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_URL);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_UUID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__EXPLANATION);\n\n\t\t// Create data types\n\t\tuuidEDataType = createEDataType(UUID);\n\t\tomL_IRIEDataType = createEDataType(OML_IRI);\n\t\totI_TOOL_SPECIFIC_IDEDataType = createEDataType(OTI_TOOL_SPECIFIC_ID);\n\t\totI_TOOL_SPECIFIC_UUIDEDataType = createEDataType(OTI_TOOL_SPECIFIC_UUID);\n\t\totI_TOOL_SPECIFIC_URLEDataType = createEDataType(OTI_TOOL_SPECIFIC_URL);\n\t}", "public void process(PurchaseOrder po)\n {\n File file = new File(path + \"/\" + ORDERS_XML);\n \n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource();\n is.setCharacterStream(new FileReader(file));\n\n Document doc = db.parse(is);\n\n Element root = doc.getDocumentElement();\n Element e = doc.createElement(\"order\");\n\n // Convert the purchase order to an XML format\n String keys[] = {\"orderNum\",\"customerRef\",\"product\",\"quantity\",\"unitPrice\"};\n String values[] = {Integer.toString(po.getOrderNum()), po.getCustomerRef(), po.getProduct().getProductType(), Integer.toString(po.getQuantity()), Float.toString(po.getUnitPrice())};\n \n for(int i=0;i<keys.length;i++)\n {\n Element tmp = doc.createElement(keys[i]);\n tmp.setTextContent(values[i]);\n e.appendChild(tmp);\n }\n \n // Set the status to submitted\n Element status = doc.createElement(\"status\");\n status.setTextContent(\"submitted\");\n e.appendChild(status);\n\n // Set the order total\n Element total = doc.createElement(\"orderTotal\");\n float orderTotal = po.getQuantity() * po.getUnitPrice();\n total.setTextContent(Float.toString(orderTotal));\n e.appendChild(total);\n\n // Write the content all as a new element in the root\n root.appendChild(e);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer m = tf.newTransformer();\n DOMSource source = new DOMSource(root);\n StreamResult result = new StreamResult(file);\n m.transform(source, result);\n\n }\n catch(Exception e)\n {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void convertFile(String xlsFileName, String xmlFileName) throws IOException\n\t{\n\t try \n\t {\n\t Document newDoc = domBuilder.newDocument();\n\t Element rootElement = newDoc.createElement(\"suite\");\n\t rootElement.setAttribute(\"name\", \"Regression suite\");\n\t rootElement.setAttribute(\"verbose\", \"1\");\n\t \n\t \n\t \tnewDoc.appendChild(rootElement);\n\n\t \n\t Element rootElement2 = newDoc.createElement(\"listeners\");\n\t rootElement.appendChild(rootElement2);\n\n\t \n\t Element rootElement6 = newDoc.createElement(\"listener\");\n\t rootElement6.setAttribute(\"class-name\", \"com.dista.listeners.RetryListener\");\n\t rootElement2.appendChild(rootElement6);\n\t \n/*\t Element rootElement7 = newDoc.createElement(\"listener\");\n\t rootElement7.setAttribute(\"class-name\", \"com.dista.listeners.ExtentListener\");\n\t rootElement2.appendChild(rootElement7);*/\n\n/*\t Element rootElement8 = newDoc.createElement(\"listener\");\n\t rootElement8.setAttribute(\"class-name\", \"com.dista.listeners.CustomMethods\");\n\t rootElement2.appendChild(rootElement8);*/\n\t \n\t Element rootElement9 = newDoc.createElement(\"listener\");\n\t rootElement9.setAttribute(\"class-name\", \"com.dista.listeners.TestListener\");\n\t rootElement2.appendChild(rootElement9);\n\t \n\t \n\t FileInputStream ExcelFile;\n\t\t\tExcelFile = new FileInputStream(xlsFileName);\t\t//files stored at specified path contains URLs\n\t\t\tXSSFWorkbook ExcelWBook = new XSSFWorkbook(ExcelFile);\n\t\t\tXSSFSheet ExcelWSheet = ExcelWBook.getSheet(\"XML Data\");\n\t\t\tIterator <Row> ri = ExcelWSheet.iterator(); \n\t\t\tRow r = ri.next();\n\t\t\t\n\t\t\tboolean loop_condition2 = true, loop_condition3=true;\n\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\t\n\t\t\t\tboolean loop_condition = true;\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Text\"+r.getCell(0).getStringCellValue());\n\t\t\t\t\n\t\t\t\tElement rowElement = newDoc.createElement(\"test\");\n\t\t\t\trowElement.setAttribute(\"name\", r.getCell(0).getStringCellValue());\n\t\t\t\trootElement.appendChild(rowElement);\n\t\t\t\t\n\t\t\t\tElement curElement = newDoc.createElement(\"classes\");\n\t\t\t\trowElement.appendChild(curElement);\n\t\t\t\t\n\t\t\t\tElement curElement2 = newDoc.createElement(\"class\");\n\t curElement2.setAttribute(\"name\", \"com.dista.test.automation.\"+r.getCell(0).getStringCellValue());\n\t curElement.appendChild(curElement2); \n\t \n\t Element curElement3 = newDoc.createElement(\"methods\");\n\t curElement2.appendChild(curElement3);\n\t \n\t r= ri.next();\n\t \n\t while(loop_condition )\n\t {\n\t \t//System.out.println(r.getCell(1).getStringCellValue());\n\t \n\t \tString option=null;\n\t\n\t try\n\t {\n\t \tswitch (r.getCell(2).getStringCellValue())\n\t \t{\n\t \t\tcase \"Y\":\n\t \t\t\toption = \"include\";\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase \"N\":\n\t \t\t\toption = \"exclude\";\n\t break;\n\t \n\t default:\n\t System.out.println(\"Invalid Data\");\n\t break;\n\t \t} \t\t\t\n\t }\n\t catch(NullPointerException npe)\n\t {\n\t \toption= \"exclude\";\n\t }\n\t \n\t //System.out.println(option);\n\t \t\tElement curElement4 = newDoc.createElement(option);\n\t \t\tcurElement4.setAttribute(\"name\", r.getCell(1).getStringCellValue());\n\t curElement3.appendChild(curElement4);\n\t \n\t\t if (ri.hasNext())\n\t\t {\n\t\t \tr= ri.next();\n\t\t \t\t\n\t\t try\n\t\t { \t\n\t\t \tif(!r.getCell(1).getStringCellValue().isEmpty())\n\t\t \t\tloop_condition= true;\n\t\t \telse\n\t\t \t\tloop_condition=false;\n\t\t \t}\n\t\t catch(NullPointerException npe)\n\t\t {\n\t\t \tloop_condition=false;\n\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t \tloop_condition=false;\n\t\t \tloop_condition3= false;\n\t\t }\n\t }\n\t \n\t if(loop_condition3)\n\t {\n\t\t try\n\t\t { \t\n\t\t \tif(!r.getCell(0).getStringCellValue().isEmpty())\n\t\t \t\tloop_condition2= true;\n\t\t \telse\n\t\t \t\tloop_condition2=false;\n\t\t }\n\t\t catch(NullPointerException npe)\n\t\t {\n\t\t \tloop_condition2=false;\n\t\t }\n\t }\n\t else\n\t \tloop_condition2=false;\n\t\t\t}\n\t\t\twhile(loop_condition2);\n\t\n\t\t\t\n\t\t\tbaos = new ByteArrayOutputStream();\n\t\t\tosw = new OutputStreamWriter(baos);\n\t\n\t\t\tTransformerFactory tranFactory = TransformerFactory.newInstance();\n\t\t\tTransformer aTransformer = tranFactory.newTransformer();\n\t\t\taTransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\taTransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n\t\t\taTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n\t DOMImplementation domImpl = newDoc.getImplementation();\n\t // <!DOCTYPE suite PUBLIC \"-//Oberon//YOUR PUBLIC DOCTYPE//EN\" \"YOURDTD.dtd\">\n\t //<!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\">\n\n\t // <!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\" >\n\t\t DocumentType doctype = domImpl.createDocumentType(\"doctype\",\n\t\t \t\t\"\", \"http://testng.org/testng-1.0.dtd\");\n\t\t aTransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId());\n\t \n\t Source src = new DOMSource(newDoc);\n\t Result result = new StreamResult(new File(xmlFileName));\n\t aTransformer.transform(src, result);\n\t\n\t osw.flush();\n\t System.out.println(new String(baos.toByteArray()));\n\t \n\t ExcelWBook.close();\n\t\n\t\t}\n\t catch (Exception exp) \n\t {\n\t \texp.printStackTrace();\n\t } \n\t \n\t osw.close();\n\t baos.close();\n\t}", "private void loadFile() {\n String xmlContent = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><atomic-mass-table mass-units=\\\"u\\\" abundance-units=\\\"Mole Fraction\\\"><entry symbol=\\\"H\\\" atomic-number=\\\"1\\\"> <natural-abundance> <mass value=\\\"1.00794\\\" error=\\\"0.00007\\\" /> <isotope mass-number=\\\"1\\\"> <mass value=\\\"1.0078250319\\\" error=\\\"0.00000000006\\\" /> <abundance value=\\\"0.999885\\\" error=\\\"0.000070\\\" /> </isotope> <isotope mass-number=\\\"2\\\"> <mass value=\\\"2.0141017779\\\" error=\\\"0.0000000006\\\" /> <abundance value=\\\"0.000115\\\" error=\\\"0.000070\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"He\\\" atomic-number=\\\"2\\\"> <natural-abundance> <mass value=\\\"4.002602\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"3.0160293094\\\" error=\\\"0.0000000012\\\" /> <abundance value=\\\"0.00000134\\\" error=\\\"0.00000003\\\" /> </isotope> <isotope mass-number=\\\"4\\\"> <mass value=\\\"4.0026032497\\\" error=\\\"0.0000000015\\\" /> <abundance value=\\\"0.99999866\\\" error=\\\"0.00000003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Li\\\" atomic-number=\\\"3\\\"> <natural-abundance> <mass value=\\\"6.9421\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"6.0151223\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.0759\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"7\\\"> <mass value=\\\"7.0160041\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.9241\\\" error=\\\"0.0004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Be\\\" atomic-number=\\\"4\\\"> <natural-abundance> <mass value=\\\"9.012182\\\" error=\\\"0.000003\\\" /> <isotope mass-number=\\\"9\\\"> <mass value=\\\"9.0121822\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"B\\\" atomic-number=\\\"5\\\"> <natural-abundance> <mass value=\\\"10.881\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"10\\\"> <mass value=\\\"10.0129371\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.199\\\" error=\\\"0.007\\\" /> </isotope> <isotope mass-number=\\\"11\\\"> <mass value=\\\"11.0093055\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.801\\\" error=\\\"0.007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"C\\\" atomic-number=\\\"6\\\"> <natural-abundance> <mass value=\\\"12.0107\\\" error=\\\"0.0008\\\" /> <isotope mass-number=\\\"12\\\"> <mass value=\\\"12\\\" error=\\\"0\\\" /> <abundance value=\\\"0.9893\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"13\\\"> <mass value=\\\"13.003354838\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.0107\\\" error=\\\"0.0008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"N\\\" atomic-number=\\\"7\\\"> <natural-abundance> <mass value=\\\"14.0067\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"14\\\"> <mass value=\\\"14.0030740074\\\" error=\\\"0.0000000018\\\" /> <abundance value=\\\"0.99636\\\" error=\\\"0.00020\\\" /> </isotope> <isotope mass-number=\\\"15\\\"> <mass value=\\\"15.000108973\\\" error=\\\"0.000000012\\\" /> <abundance value=\\\"0.00364\\\" error=\\\"0.00020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"O\\\" atomic-number=\\\"8\\\"> <natural-abundance> <mass value=\\\"15.9994\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"16\\\"> <mass value=\\\"15.9949146223\\\" error=\\\"0.0000000025\\\" /> <abundance value=\\\"0.99759\\\" error=\\\"0.00016\\\" /> </isotope> <isotope mass-number=\\\"17\\\"> <mass value=\\\"16.99913150\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.00038\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"18\\\"> <mass value=\\\"17.9991604\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.00205\\\" error=\\\"0.00014\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"F\\\" atomic-number=\\\"9\\\"> <natural-abundance> <mass value=\\\"18.9984032\\\" error=\\\"0.0000005\\\" /> <isotope mass-number=\\\"19\\\"> <mass value=\\\"18.99840320\\\" error=\\\"0.00000007\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ne\\\" atomic-number=\\\"10\\\"> <natural-abundance> <mass value=\\\"20.1797\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"20\\\"> <mass value=\\\"19.992440176\\\" error=\\\"0.000000003\\\" /> <abundance value=\\\"0.9048\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"21\\\"> <mass value=\\\"20.99384674\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.0027\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"22\\\"> <mass value=\\\"21.99138550\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0925\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Na\\\" atomic-number=\\\"11\\\"> <natural-abundance> <mass value=\\\"22.989770\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"23\\\"> <mass value=\\\"22.98976966\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mg\\\" atomic-number=\\\"12\\\"> <natural-abundance> <mass value=\\\"24.3050\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"24\\\"> <mass value=\\\"23.98504187\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.7899\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"25\\\"> <mass value=\\\"24.98583700\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1000\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"26\\\"> <mass value=\\\"25.98259300\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1101\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Al\\\" atomic-number=\\\"13\\\"> <natural-abundance> <mass value=\\\"26.981538\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"27\\\"> <mass value=\\\"26.98153841\\\" error=\\\"0.00000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Si\\\" atomic-number=\\\"14\\\"> <natural-abundance> <mass value=\\\"28.0855\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"28\\\"> <mass value=\\\"27.97692649\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.92223\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"29\\\"> <mass value=\\\"28.97649468\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.04685\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"30\\\"> <mass value=\\\"29.97377018\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.03092\\\" error=\\\"0.00011\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"P\\\" atomic-number=\\\"15\\\"> <natural-abundance> <mass value=\\\"30.973761\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"31\\\"> <mass value=\\\"30.97376149\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"S\\\" atomic-number=\\\"16\\\"> <natural-abundance> <mass value=\\\"32.065\\\" error=\\\"0.005\\\" /> <isotope mass-number=\\\"32\\\"> <mass value=\\\"31.97207073\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.9499\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"33\\\"> <mass value=\\\"32.97145854\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.0075\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"34\\\"> <mass value=\\\"33.96786687\\\" error=\\\"0.00000014\\\" /> <abundance value=\\\"0.0425\\\" error=\\\"0.0024\\\" /> </isotope> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96708088\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0001\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cl\\\" atomic-number=\\\"17\\\"> <natural-abundance> <mass value=\\\"35.453\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"35\\\"> <mass value=\\\"34.96885271\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.7576\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"37\\\"> <mass value=\\\"36.96590260\\\" error=\\\"0.00000005\\\" /> <abundance value=\\\"0.2424\\\" error=\\\"0.0010\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ar\\\" atomic-number=\\\"18\\\"> <natural-abundance> <mass value=\\\"39.948\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96754626\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"0.0003365\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"38\\\"> <mass value=\\\"37.9627322\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.000632\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.962383124\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.996003\\\" error=\\\"0.000030\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"K\\\" atomic-number=\\\"19\\\"> <natural-abundance> <mass value=\\\"39.0983\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"39\\\"> <mass value=\\\"38.9637069\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.932581\\\" error=\\\"0.000044\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.96399867\\\" error=\\\"0.00000029\\\" /> <abundance value=\\\"0.000117\\\" error=\\\"0.000001\\\" /> </isotope> <isotope mass-number=\\\"41\\\"> <mass value=\\\"40.96182597\\\" error=\\\"0.00000028\\\" /> <abundance value=\\\"0.067302\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ca\\\" atomic-number=\\\"20\\\"> <natural-abundance> <mass value=\\\"40.078\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.9625912\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.96941\\\" error=\\\"0.00156\\\" /> </isotope> <isotope mass-number=\\\"42\\\"> <mass value=\\\"41.9586183\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.00647\\\" error=\\\"0.00023\\\" /> </isotope> <isotope mass-number=\\\"43\\\"> <mass value=\\\"42.9587668\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.00135\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"44\\\"> <mass value=\\\"43.9554811\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.02086\\\" error=\\\"0.00110\\\" /> </isotope> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9536927\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.00004\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.952533\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00187\\\" error=\\\"0.00021\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sc\\\" atomic-number=\\\"21\\\"> <natural-abundance> <mass value=\\\"44.955910\\\" error=\\\"0.000008\\\" /> <isotope mass-number=\\\"45\\\"> <mass value=\\\"44.9559102\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ti\\\" atomic-number=\\\"22\\\"> <natural-abundance> <mass value=\\\"47.867\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9526295\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"0.0825\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"47\\\"> <mass value=\\\"46.9517637\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0744\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.9479470\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.7372\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"49\\\"> <mass value=\\\"48.9478707\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0541\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"V\\\" atomic-number=\\\"23\\\"> <natural-abundance> <mass value=\\\"50.9415\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9471627\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.00250\\\" error=\\\"0.00004\\\" /> </isotope> <isotope mass-number=\\\"51\\\"> <mass value=\\\"50.9439635\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.99750\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cr\\\" atomic-number=\\\"24\\\"> <natural-abundance> <mass value=\\\"51.9961\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9460495\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.04345\\\" error=\\\"0.00013\\\" /> </isotope> <isotope mass-number=\\\"52\\\"> <mass value=\\\"51.9405115\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.83789\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"53\\\"> <mass value=\\\"52.9406534\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.09501\\\" error=\\\"0.00017\\\" /> </isotope> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.938846\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02365\\\" error=\\\"0.00007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mn\\\" atomic-number=\\\"25\\\"> <natural-abundance> <mass value=\\\"54.938049\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"55\\\"> <mass value=\\\"54.9380493\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Fe\\\" atomic-number=\\\"26\\\"> <natural-abundance> <mass value=\\\"55.845\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.9396147\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.05845\\\" error=\\\"0.00035\\\" /> </isotope> <isotope mass-number=\\\"56\\\"> <mass value=\\\"55.9349418\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.91754\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"57\\\"> <mass value=\\\"56.9353983\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02119\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9332801\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.00282\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Co\\\" atomic-number=\\\"27\\\"> <natural-abundance> <mass value=\\\"58.933200\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"59\\\"> <mass value=\\\"59.9331999\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ni\\\" atomic-number=\\\"28\\\"> <natural-abundance> <mass value=\\\"58.6934\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9353477\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.680769\\\" error=\\\"0.000089\\\" /> </isotope> <isotope mass-number=\\\"60\\\"> <mass value=\\\"59.9307903\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.262231\\\" error=\\\"0.000077\\\" /> </isotope> <isotope mass-number=\\\"61\\\"> <mass value=\\\"60.9310601\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.011399\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"62\\\"> <mass value=\\\"61.9283484\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0036345\\\" error=\\\"0.000017\\\" /> </isotope> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9279692\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.009256\\\" error=\\\"0.000009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cu\\\" atomic-number=\\\"29\\\"> <natural-abundance> <mass value=\\\"63.546\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"63\\\"> <mass value=\\\"62.9296007\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.6915\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"65\\\"> <mass value=\\\"64.9277938\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3085\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zn\\\" atomic-number=\\\"30\\\"> <natural-abundance> <mass value=\\\"65.409\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9291461\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.48268\\\" error=\\\"0.00321\\\" /> </isotope> <isotope mass-number=\\\"66\\\"> <mass value=\\\"65.9260364\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.27975\\\" error=\\\"0.00077\\\" /> </isotope> <isotope mass-number=\\\"67\\\"> <mass value=\\\"66.9271305\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.04102\\\" error=\\\"0.00021\\\" /> </isotope> <isotope mass-number=\\\"68\\\"> <mass value=\\\"67.9248473\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.19024\\\" error=\\\"0.00123\\\" /> </isotope> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.925325\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00631\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ga\\\" atomic-number=\\\"31\\\"> <natural-abundance> <mass value=\\\"69.723\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"69\\\"> <mass value=\\\"68.925581\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.60108\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"71\\\"> <mass value=\\\"70.9247073\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.39892\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ge\\\" atomic-number=\\\"32\\\"> <natural-abundance> <mass value=\\\"72.64\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.9242500\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.2038\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"72\\\"> <mass value=\\\"71.9220763\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2731\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"73\\\"> <mass value=\\\"72.9234595\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0776\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9211784\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.3672\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9214029\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0783\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"As\\\" atomic-number=\\\"33\\\"> <natural-abundance> <mass value=\\\"74.92160\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"75\\\"> <mass value=\\\"74.9215966\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Se\\\" atomic-number=\\\"34\\\"> <natural-abundance> <mass value=\\\"78.96\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9224767\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9192143\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0937\\\" error=\\\"0.0029\\\" /> </isotope> <isotope mass-number=\\\"77\\\"> <mass value=\\\"76.9199148\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0763\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.9173097\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2377\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.9165221\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.4961\\\" error=\\\"0.0041\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9167003\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.0873\\\" error=\\\"0.0022\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Br\\\" atomic-number=\\\"35\\\"> <natural-abundance> <mass value=\\\"79.904\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"79\\\"> <mass value=\\\"78.9183379\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.5069\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"81\\\"> <mass value=\\\"80.916291\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4931\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Kr\\\" atomic-number=\\\"36\\\"> <natural-abundance> <mass value=\\\"83.798\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.920388\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00355\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.916379\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.02286\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9134850\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.11593\\\" error=\\\"0.00031\\\" /> </isotope> <isotope mass-number=\\\"83\\\"> <mass value=\\\"82.914137\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11500\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.911508\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.56987\\\" error=\\\"0.00015\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.910615\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.17279\\\" error=\\\"0.00041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rb\\\" atomic-number=\\\"37\\\"> <natural-abundance> <mass value=\\\"85.4678\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"85\\\"> <mass value=\\\"84.9117924\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.7217\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9091858\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.2783\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sr\\\" atomic-number=\\\"38\\\"> <natural-abundance> <mass value=\\\"87.62\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.913426\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0056\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.9092647\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0986\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9088816\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0700\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"88\\\"> <mass value=\\\"87.9056167\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.8258\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Y\\\" atomic-number=\\\"39\\\"> <natural-abundance> <mass value=\\\"88.90585\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"89\\\"> <mass value=\\\"88.9058485\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zr\\\" atomic-number=\\\"40\\\"> <natural-abundance> <mass value=\\\"91.224\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"90\\\"> <mass value=\\\"89.9047022\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"0.5145\\\" error=\\\"0.0040\\\" /> </isotope> <isotope mass-number=\\\"91\\\"> <mass value=\\\"90.9056434\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1122\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.9050386\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1715\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9063144\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.1738\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.908275\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0280\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nb\\\" atomic-number=\\\"41\\\"> <natural-abundance> <mass value=\\\"92.90638\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"93\\\"> <mass value=\\\"92.9063762\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mo\\\" atomic-number=\\\"42\\\"> <natural-abundance> <mass value=\\\"95.94\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.906810\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.1477\\\" error=\\\"0.0031\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9050867\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0923\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"95\\\"> <mass value=\\\"94.9058406\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1590\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.9046780\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1668\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"97\\\"> <mass value=\\\"96.9030201\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0956\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.9054069\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.2419\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.907476\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0967\\\" error=\\\"0.0020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ru\\\" atomic-number=\\\"44\\\"> <natural-abundance> <mass value=\\\"101.07\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.907604\\\" error=\\\"0.000009\\\" /> <abundance value=\\\"0.0554\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.905287\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.0187\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"99\\\"> <mass value=\\\"98.9059385\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\".01276\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.9042189\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1260\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"101\\\"> <mass value=\\\"100.9055815\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1706\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.9043488\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.3155\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.905430\\\" error=\\\".01862\\\" /> <abundance value=\\\"0.1862\\\" error=\\\"0.0027\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rh\\\" atomic-number=\\\"45\\\"> <natural-abundance> <mass value=\\\"1025.90550\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"103\\\"> <mass value=\\\"102.905504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pd\\\" atomic-number=\\\"46\\\"> <natural-abundance> <mass value=\\\"106.42\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.905607\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0102\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.904034\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.1114\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"105\\\"> <mass value=\\\"104.905083\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2233\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.903484\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2733\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.903895\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.2646\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.905153\\\" error=\\\"0.000012\\\" /> <abundance value=\\\"0.1172\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ag\\\" atomic-number=\\\"47\\\"> <natural-abundance> <mass value=\\\"107.8682\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"107\\\"> <mass value=\\\"106.905093\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.51839\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"109\\\"> <mass value=\\\"108.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.48161\\\" error=\\\"0.00008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cd\\\" atomic-number=\\\"48\\\"> <natural-abundance> <mass value=\\\"112.411\\\" error=\\\"0.008\\\" /> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.906458\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0125\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.904183\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.903006\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1249\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"111\\\"> <mass value=\\\"110.904182\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1280\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.9027577\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2413\\\" error=\\\"0.0021\\\" /> </isotope> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.9044014\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1222\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.9033586\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2873\\\" error=\\\"0.0042\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0749\\\" error=\\\"0.0018\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"In\\\" atomic-number=\\\"49\\\"> <natural-abundance> <mass value=\\\"114.818\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.904062\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0429\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903879\\\" error=\\\"0.000040\\\" /> <abundance value=\\\"0.9571\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sn\\\" atomic-number=\\\"50\\\"> <natural-abundance> <mass value=\\\"118.710\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.904822\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0097\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.902783\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0066\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903347\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0034\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.901745\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1454\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"117\\\"> <mass value=\\\"116.902955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0768\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"118\\\"> <mass value=\\\"117.901608\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2422\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"119\\\"> <mass value=\\\"118.903311\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0859\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.9021985\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3258\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9034411\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0463\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9052745\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0579\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sb\\\" atomic-number=\\\"51\\\"> <natural-abundance> <mass value=\\\"121.760\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"121\\\"> <mass value=\\\"120.9038222\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.5721\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042160\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.4279\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Te\\\" atomic-number=\\\"52\\\"> <natural-abundance> <mass value=\\\"127.60\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.904026\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.0009\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9030558\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0255\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042711\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9028188\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0474\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"125\\\"> <mass value=\\\"124.9044241\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0707\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.9033049\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1884\\\" error=\\\"0.0025\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9044615\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3174\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9062229\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.3408\\\" error=\\\"0.0062\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"I\\\" atomic-number=\\\"53\\\"> <natural-abundance> <mass value=\\\"126.90447\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"127\\\"> <mass value=\\\"126.904468\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Xe\\\" atomic-number=\\\"54\\\"> <natural-abundance> <mass value=\\\"131.293\\\" error=\\\"0.006\\\" /> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9058954\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.000952\\\" error=\\\"0.000003\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.904268\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.000890\\\" error=\\\"0.000002\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9035305\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.019102\\\" error=\\\"0.000008\\\" /> </isotope> <isotope mass-number=\\\"129\\\"> <mass value=\\\"128.9047799\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.264006\\\" error=\\\"0.000082\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9035089\\\" error=\\\"0.0000011\\\" /> <abundance value=\\\"0.040710\\\" error=\\\"0.000013\\\" /> </isotope> <isotope mass-number=\\\"131\\\"> <mass value=\\\"130.9050828\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.212324\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.9041546\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.269086\\\" error=\\\"0.000033\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.9053945\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.104357\\\" error=\\\"0.000021\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907220\\\" error=\\\"0.000008\\\" /> <abundance value=\\\"0.088573\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cs\\\" atomic-number=\\\"55\\\"> <natural-abundance> <mass value=\\\"132.90545\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"133\\\"> <mass value=\\\"132.905447\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ba\\\" atomic-number=\\\"56\\\"> <natural-abundance> <mass value=\\\"137.327\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.906311\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00106\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.905056\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00101\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.904504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02417\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"135\\\"> <mass value=\\\"134.905684\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.000003\\\" error=\\\"0.00012\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.904571\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.07854\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"137\\\"> <mass value=\\\"136.905822\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.11232\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905242\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.71698\\\" error=\\\"0.00042\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"La\\\" atomic-number=\\\"57\\\"> <natural-abundance> <mass value=\\\"138.9055\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.907108\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00090\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"139\\\"> <mass value=\\\"138.906349\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.99910\\\" error=\\\"0.00001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ce\\\" atomic-number=\\\"58\\\"> <natural-abundance> <mass value=\\\"140.116\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907140\\\" error=\\\"0.000050\\\" /> <abundance value=\\\"0.00185\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905986\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.00251\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"140\\\"> <mass value=\\\"139.905\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.88450\\\" error=\\\"0.00051\\\" /> </isotope> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.909241\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11114\\\" error=\\\"0.00051\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pr\\\" atomic-number=\\\"59\\\"> <natural-abundance> <mass value=\\\"140.90765\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"141\\\"> <mass value=\\\"140.907648\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nd\\\" atomic-number=\\\"60\\\"> <natural-abundance> <mass value=\\\"144.24\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.907719\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.272\\\" error=\\\"0.005\\\" /> </isotope> <isotope mass-number=\\\"143\\\"> <mass value=\\\"142.909810\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.122\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.910083\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.238\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"145\\\"> <mass value=\\\"144.912569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.083\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"146\\\"> <mass value=\\\"145.913113\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.172\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.916889\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.057\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.920887\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.056\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sm\\\" atomic-number=\\\"62\\\"> <natural-abundance> <mass value=\\\"150.36\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.911996\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0307\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"147\\\"> <mass value=\\\"146.914894\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1499\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.914818\\\" error=\\\"0.1124\\\" /> <abundance value=\\\"0.1124\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"149\\\"> <mass value=\\\"148.917180\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1382\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.917272\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0738\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919729\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2675\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.922206\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2275\\\" error=\\\"0.0029\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Eu\\\" atomic-number=\\\"63\\\"> <natural-abundance> <mass value=\\\"151.964\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"151\\\"> <mass value=\\\"150.919846\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4781\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"153\\\"> <mass value=\\\"152.921227\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.5219\\\" error=\\\"0.0006\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Gd\\\" atomic-number=\\\"64\\\"> <natural-abundance> <mass value=\\\"157.25\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919789\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0020\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.920862\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0218\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"155\\\"> <mass value=\\\"154.922619\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1480\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.922120\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2047\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"157\\\"> <mass value=\\\"156.923957\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1565\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924101\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2484\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.927051\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2186\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tb\\\" atomic-number=\\\"65\\\"> <natural-abundance> <mass value=\\\"158.92534\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"159\\\"> <mass value=\\\"158.925343\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Dy\\\" atomic-number=\\\"66\\\"> <natural-abundance> <mass value=\\\"162.500\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.924278\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00056\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924405\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00095\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.925194\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02329\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"161\\\"> <mass value=\\\"160.926930\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.18889\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.926795\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25475\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"163\\\"> <mass value=\\\"162.928728\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.24896\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929171\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.28260\\\" error=\\\"0.00054\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ho\\\" atomic-number=\\\"67\\\"> <natural-abundance> <mass value=\\\"164.93032\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"165\\\"> <mass value=\\\"164.930319\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Er\\\" atomic-number=\\\"68\\\"> <natural-abundance> <mass value=\\\"167.259\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.928775\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00139\\\" error=\\\"0.00005\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929197\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.01601\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"166\\\"> <mass value=\\\"165.930290\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33503\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"167\\\"> <mass value=\\\"166.932046\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.22869\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.932368\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.26978\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.935461\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.14910\\\" error=\\\"0.00036\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tm\\\" atomic-number=\\\"69\\\"> <natural-abundance> <mass value=\\\"168.93421\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"169\\\"> <mass value=\\\"168.934211\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Yb\\\" atomic-number=\\\"70\\\"> <natural-abundance> <mass value=\\\"173.04\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.933895\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0013\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.934759\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0304\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"171\\\"> <mass value=\\\"170.936323\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1428\\\" error=\\\"0.0057\\\" /> </isotope> <isotope mass-number=\\\"172\\\"> <mass value=\\\"171.936378\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2183\\\" error=\\\"0.0067\\\" /> </isotope> <isotope mass-number=\\\"173\\\"> <mass value=\\\"172.938207\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1613\\\" error=\\\"0.0027\\\" /> </isotope> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.938858\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3183\\\" error=\\\"0.0092\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.942569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1276\\\" error=\\\"0.0041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Lu\\\" atomic-number=\\\"71\\\"> <natural-abundance> <mass value=\\\"174.967\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"175\\\"> <mass value=\\\"174.9407682\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.9741\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.9426827\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.0259\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hf\\\" atomic-number=\\\"72\\\"> <natural-abundance> <mass value=\\\"178.49\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.940042\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0016\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.941403\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0526\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"177\\\"> <mass value=\\\"176.9432204\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1860\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"178\\\"> <mass value=\\\"177.9436981\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.2728\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"179\\\"> <mass value=\\\"178.9488154\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1362\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.9465488\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3508\\\" error=\\\"0.0016\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ta\\\" atomic-number=\\\"73\\\"> <natural-abundance> <mass value=\\\"180.9479\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.947466\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00012\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"181\\\"> <mass value=\\\"180.947996\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.99988\\\" error=\\\"0.00002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"W\\\" atomic-number=\\\"74\\\"> <natural-abundance> <mass value=\\\"183.84\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.946706\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0012\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"182\\\"> <mass value=\\\"181.948205\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.265\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"183\\\"> <mass value=\\\"182.9502242\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1431\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.9509323\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.3064\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.954362\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2843\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Re\\\" atomic-number=\\\"75\\\"> <natural-abundance> <mass value=\\\"186.207\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"185\\\"> <mass value=\\\"184.952955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3740\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557505\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.6260\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Os\\\" atomic-number=\\\"76\\\"> <natural-abundance> <mass value=\\\"190.23\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.952491\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0002\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.953838\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0159\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557476\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.0196\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"188\\\"> <mass value=\\\"187.9558357\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1324\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"189\\\"> <mass value=\\\"188.958145\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1615\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.958445\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2626\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961479\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.4078\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ir\\\" atomic-number=\\\"77\\\"> <natural-abundance> <mass value=\\\"192.217\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"191\\\"> <mass value=\\\"190.960591\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.373\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"193\\\"> <mass value=\\\"192.962923\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.627\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pt\\\" atomic-number=\\\"78\\\"> <natural-abundance> <mass value=\\\"195.078\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.959930\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00014\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961035\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00782\\\" error=\\\"0.00007\\\" /> </isotope> <isotope mass-number=\\\"194\\\"> <mass value=\\\"193.962663\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.32967\\\" error=\\\"0.00099\\\" /> </isotope> <isotope mass-number=\\\"195\\\"> <mass value=\\\"194.964774\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33832\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.964934\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25242\\\" error=\\\"0.00041\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.967875\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.07163\\\" error=\\\"0.00055\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Au\\\" atomic-number=\\\"79\\\"> <natural-abundance> <mass value=\\\"196.96655\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"197\\\"> <mass value=\\\"196.966551\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hg\\\" atomic-number=\\\"80\\\"> <natural-abundance> <mass value=\\\"200.59\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.965814\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0015\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.966752\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0997\\\" error=\\\"0.0020\\\" /> </isotope> <isotope mass-number=\\\"199\\\"> <mass value=\\\"198.968262\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1687\\\" error=\\\"0.0022\\\" /> </isotope> <isotope mass-number=\\\"200\\\"> <mass value=\\\"199.968309\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2310\\\" error=\\\"0.0019\\\" /> </isotope> <isotope mass-number=\\\"201\\\"> <mass value=\\\"200.970285\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1318\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"202\\\"> <mass value=\\\"201.970625\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2986\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973475\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0687\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tl\\\" atomic-number=\\\"81\\\"> <natural-abundance> <mass value=\\\"204.3833\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"203\\\"> <mass value=\\\"202.972329\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2952\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"205\\\"> <mass value=\\\"204.974412\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.7048\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pb\\\" atomic-number=\\\"82\\\"> <natural-abundance> <mass value=\\\"207.2\\\" error=\\\"0.1\\\" /> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973028\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.014\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"206\\\"> <mass value=\\\"205.974449\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.241\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"207\\\"> <mass value=\\\"206.975880\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.221\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"208\\\"> <mass value=\\\"207.976636\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.524\\\" error=\\\"0.001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Bi\\\" atomic-number=\\\"83\\\"> <natural-abundance> <mass value=\\\"208.98038\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"209\\\"> <mass value=\\\"208.980384\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Th\\\" atomic-number=\\\"90\\\"> <natural-abundance> <mass value=\\\"232.0381\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"232\\\"> <mass value=\\\"232.0380495\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pa\\\" atomic-number=\\\"91\\\"> <natural-abundance> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"231\\\"> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"U\\\" atomic-number=\\\"92\\\"> <natural-abundance> <mass value=\\\"238.02891\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"234\\\"> <mass value=\\\"234.0409447\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.000054\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"235\\\"> <mass value=\\\"235.0439222\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.007204\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"238\\\"> <mass value=\\\"238.0507835\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.992742\\\" error=\\\"0.000010\\\" /> </isotope> </natural-abundance> </entry></atomic-mass-table>\";\n try {\n// this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);\n this.document = XMLParser.parse(xmlContent);\n } catch (Exception e) {\n throw new RuntimeException(\"Error reading atomic_system.xml.\");\n }\n\n NodeList nodes = document.getElementsByTagName(\"entry\");\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n String symbol = node.getAttributes().getNamedItem(\"symbol\").getNodeValue();\n\n entries.put(symbol, new Entry(node));\n }\n }", "public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }", "public FileCodeGenXML(FileCodeGen fileGen)\n {\n this.fileGen = fileGen;\n }", "public Zufallsgenerator(){//der arbeitskonstruktor, der alles setzt\n\t\t\n\t\tfile=\"Zwischenstand.txt\";\n\t\tint x=Gamepanel.Spielfeld.length;//hol die spielfeld-länge\n\n\t\tString ausgabe=\"\";\n\t\tausgabe+=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\";\n\t\tausgabe+=\"\\n\";\n\t\t\n\t\tausgabe+=\"<level>\";\n\t\tausgabe+=\"\\n\";\n\t\ttry{\n\t\tFile schreiber=new File(file);\n\t\tFileWriter fwriter=new FileWriter(schreiber);\n\t\t\n\t\t/**\n\t\t * Die Methode muss mehrmals verwendet werden, da sonst der String oft schnell zu groß wird\n\t\t */\n\t\tfor(int k=0;k<ausgabe.length();k++){\n\t\t\tchar c=ausgabe.charAt(k);\n\t\t\tif(c=='\\n')\n\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\telse fwriter.write(c);\n\t\t}\n\t\tausgabe=\"\";\n\t\tdouble ran;\n\t\t\n\t\tfor(int i=0;i<x;i++){//methode aus dem schreibe_xml\n\t\t\t\n\t\t\tfor(int j=0;j<x;j++){\t\t\t\t\n\t\t\t\tausgabe+=(\"\\t<Feld>\");\n\t\t\t\tausgabe+=\"\\n\";\n\t\t\t\tausgabe+=(\"\\t\\t<Typ>\");\n\t\t\t\t\n\t\t\t\tif(i == 0 || i == 14 || j == 0 || j == 14){\n\t\t\t\t\tausgabe+=\"unzerstoerbar\";\n\t\t\t\t} else if((i == 1 && j == 1) || (i == 1 && j == 2) || (i == 2 && j == 1) || (i == 13 && j == 13)\n\t\t\t\t\t\t|| (i == 13 && j == 12) || (i == 12 && j == 13)) {\n\t\t\t\t\tausgabe+=\"Weg\";\n\t\t\t\t} else if(i == 7 && j == 7){\n\t\t\t\t\tausgabe +=\"Ausgang\";\n\t\t\t\t} else {\n\t\t\t\t\tran = (int) (Math.random()*3);\n\t\t\t\t\tif(ran == 0) ausgabe += \"Weg\";\n\t\t\t\t\tif(ran == 1) ausgabe += \"zerstoerbar\";\n\t\t\t\t\tif(ran == 2) ausgabe += \"zerstoerbar\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tausgabe+=(\"</Typ>\");\n\t\t\t\tausgabe+=\"\\n\";\n\t\t\t\tausgabe+=(\"\\t\\t<Position><X>\"+j+\"</X><Y>\"+i+\"</Y></Position>\\n\");\n\t\t\t\tausgabe+=(\"\\t</Feld>\\n\");\n\t\n\t\t\t}\n\t\t\t\tfor(int k=0;k<ausgabe.length();k++){\n\t\t\t\t\tchar c=ausgabe.charAt(k);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\t\tausgabe=\"\";\n\t\t\t}\n\n\t\t\tausgabe+=\"\\n\\t<Spieler1>\";\t\t\t\n\t\t\tausgabe+=\"\\n\\t\\t<X>\"+40+\"</X>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Y>\"+40+\"</Y>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzBomb>\"+1+\"</AnzBomb>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzLeben>\"+1+\"</AnzLeben>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Handschuh>\"+false+\" </Handschuh>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Kicker>\"+false+ \"</Kicker>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Speed>\"+0.0000275+\"</Speed>\"; \n\t\t\tausgabe+=\"\\n\\t\\t<BombReichweite>\"+2+\"</BombReichweite>\";\n\t\t\tausgabe +=\"\\n\\t</Spieler1>\";\n\t\t\t\n\t\t\tausgabe+=\"\\n\\t<Spieler2>\";\t\t\t\n\t\t\tausgabe+=\"\\n\\t\\t<X>\"+520+\"</X>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Y>\"+520+\"</Y>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzBomb>\"+1+\"</AnzBomb>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzLeben>\"+1+\"</AnzLeben>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Handschuh>\"+false+\" </Handschuh>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Kicker>\"+false+ \"</Kicker>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Speed>\"+0.0000275+\"</Speed>\"; \n\t\t\tausgabe+=\"\\n\\t\\t<BombReichweite>\"+2+\"</BombReichweite>\";\n\t\t\tausgabe +=\"\\n\\t</Spieler2>\";\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<ausgabe.length();i++){\n\t\t\t\t\tchar c=ausgabe.charAt(i);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\tausgabe+=\"\\n\\n\\n</level>\";\n\t\t\t\tfor(int i=0;i<ausgabe.length();i++){\n\t\t\t\t\tchar c=ausgabe.charAt(i);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\tfwriter.flush();\n\t\t\t\tfwriter.close();\n\t\t} catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t\n\t\t}\n\t\t\n\t}", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbaseElementEClass = createEClass(BASE_ELEMENT);\n\t\tcreateEReference(baseElementEClass, BASE_ELEMENT__KEY_VALUE_MAPS);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__ID);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__NAME);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__DESCRIPTION);\n\n\t\tkeyValueMapEClass = createEClass(KEY_VALUE_MAP);\n\t\tcreateEAttribute(keyValueMapEClass, KEY_VALUE_MAP__KEY);\n\t\tcreateEReference(keyValueMapEClass, KEY_VALUE_MAP__VALUES);\n\n\t\tvalueEClass = createEClass(VALUE);\n\t\tcreateEAttribute(valueEClass, VALUE__TAG);\n\t\tcreateEAttribute(valueEClass, VALUE__VALUE);\n\n\t\t// Create enums\n\t\ttimeUnitEEnum = createEEnum(TIME_UNIT);\n\t}", "private void saveXML_FTP(String yearId, String templateId, String schoolCode,Restrictions r) {\n String server = \"192.168.1.36\";\r\n int port = 21;\r\n String user = \"david\";\r\n String pass = \"david\";\r\n DocumentBuilderFactory icFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder icBuilder;\r\n FTPClient ftpClient = new FTPClient();\r\n try {\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\tDate date = new Date();\r\n\t//System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43\r\n String fecha = dateFormat.format(date);\r\n fecha = fecha.replace(\" \", \"_\");\r\n fecha = fecha.replace(\"/\", \"_\");\r\n fecha = fecha.replace(\":\", \"_\");\r\n String filename = yearId + \"_\" + templateId+\"_\"+fecha+\".xml\";\r\n String rutaCarpeta = \"/Schedules/\" + schoolCode;\r\n\r\n if (!ftpClient.changeWorkingDirectory(rutaCarpeta));\r\n {\r\n ftpClient.changeWorkingDirectory(\"/Schedules\");\r\n ftpClient.mkd(schoolCode);\r\n ftpClient.changeWorkingDirectory(schoolCode);\r\n }\r\n\r\n icBuilder = icFactory.newDocumentBuilder();\r\n Document doc = icBuilder.newDocument();\r\n Element mainRootElement = doc.createElementNS(\"http://eduwebgroup.ddns.net/ScheduleWeb/enviarmensaje.htm\", \"Horarios\");\r\n doc.appendChild(mainRootElement);\r\n Element students = doc.createElement(\"Students\");\r\n // append child elements to root element\r\n \r\n for (Course t : r.courses) {\r\n for (int j = 0; j < t.getArraySecciones().size(); j++) {\r\n for (int k = 0; k < t.getArraySecciones().get(j).getIdStudents().size(); k++) { \r\n students.appendChild(getStudent(doc,\"\"+t.getArraySecciones().get(j).getIdStudents().get(k),\"\"+t.getIdCourse(),\"\"+(j+1),yearId,\"\"+t.getArraySecciones().get(j).getClassId())); \r\n } \r\n }\r\n }\r\n \r\n Element cursos = doc.createElement(\"Courses\");\r\n for (Course t : r.courses) {\r\n for (int j = 1; j < t.getArraySecciones().size(); j++) {\r\n //if()\r\n cursos.appendChild(getCursos(doc,\"\"+t.getIdCourse(),\"\"+j,\"\"+t.getArraySecciones().get(j).getIdTeacher(),yearId,\"\"+t.getArraySecciones().get(j).getClassId()));\r\n }\r\n }\r\n \r\n//private Node getBloques(Document doc, String day, String begin, String tempId, String courseId, String section) {\r\n \r\n Element bloques = doc.createElement(\"Blocks\");\r\n for (Course t : r.courses) {\r\n /* for (int i = 0; i < TAMY; i++) {\r\n for (int j = 0; j < TAMX; j++) {\r\n \r\n if ( !t.getHuecos()[j][i].contains(\"0\")) {\r\n if(t.getHuecos()[j][i].contains(\"and\")){\r\n String[] partsSections = t.getHuecos()[j][i].split(\"and\");\r\n for (String partsSection : partsSections) {\r\n String seccionClean = partsSection.replace(\" \", \"\");\r\n if(!seccionClean.equals(\"0\"))bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),seccionClean,yearId));\r\n }\r\n }\r\n else\r\n bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),\"\"+t.getHuecos()[j][i],yearId));\r\n }\r\n }\r\n }*/\r\n for (int i = 0; i < t.getArraySecciones().size(); i++) {\r\n for (int j = 0; j < t.getArraySecciones().get(i).getPatronUsado().size(); j++) {\r\n int col = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).x +1;\r\n int row = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).y +1;\r\n \r\n bloques.appendChild(getBloques(doc,\"\"+(col),\"\"+(row),templateId,\"\"+t.getIdCourse(),\"\"+t.getArraySecciones().get(i).getNumSeccion(),yearId,\"\"+t.getArraySecciones().get(i).getClassId(),\"\"+t.getArraySecciones().get(i).getPatternRenweb()));\r\n }\r\n }\r\n }\r\n \r\n /* students.appendChild(getCompany(doc, \"Paypal\", \"Payment\", \"1000\"));\r\n students.appendChild(getCompany(doc, \"eBay\", \"Shopping\", \"2000\"));\r\n students.appendChild(getCompany(doc, \"Google\", \"Search\", \"3000\"));*/\r\n \r\n mainRootElement.appendChild(students);\r\n mainRootElement.appendChild(cursos);\r\n mainRootElement.appendChild(bloques);\r\n // output DOM XML to console \r\n /*Transformer transformer = TransformerFactory.newInstance().newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult console = new StreamResult(System.out);\r\n transformer.transform(source, console);\r\n*/\r\n\r\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\r\n Source xmlSource = new DOMSource(doc);\r\n Result outputTarget = new StreamResult(outputStream);\r\n TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);\r\n InputStream is = new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n ftpClient.storeFile(filename, is);\r\n ftpClient.logout();\r\n\r\n } catch (Exception ex) {\r\n System.err.println(\"\");\r\n }\r\n\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinvoiceEClass = createEClass(INVOICE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_ID);\n\t\tcreateEReference(invoiceEClass, INVOICE__BILLING_ACCOUNT);\n\t\tcreateEReference(invoiceEClass, INVOICE__CONTACT_MECH);\n\t\tcreateEReference(invoiceEClass, INVOICE__CURRENCY_UOM);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DUE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ITEMS);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_MESSAGE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_NOTES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_STATUSES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__PAID_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceEClass, INVOICE__RECURRENCE_INFO);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__REFERENCE_NUMBER);\n\t\tcreateEReference(invoiceEClass, INVOICE__ROLE_TYPE);\n\t\tcreateEReference(invoiceEClass, INVOICE__STATUS);\n\n\t\tinvoiceAttributeEClass = createEClass(INVOICE_ATTRIBUTE);\n\t\tcreateEReference(invoiceAttributeEClass, INVOICE_ATTRIBUTE__INVOICE);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceContactMechEClass = createEClass(INVOICE_CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__INVOICE);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH_PURPOSE_TYPE);\n\n\t\tinvoiceContentEClass = createEClass(INVOICE_CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__FROM_DATE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__THRU_DATE);\n\n\t\tinvoiceContentTypeEClass = createEClass(INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__INVOICE_CONTENT_TYPE_ID);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemEClass = createEClass(INVOICE_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__AMOUNT);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__DESCRIPTION);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVENTORY_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_ORG_PARTY);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT_FEATURE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__QUANTITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__SALES_OPPORTUNITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_GEO);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_PARTY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTHORITY_RATE_SEQ);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__TAXABLE_FLAG);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__UOM);\n\n\t\tinvoiceItemAssocEClass = createEClass(INVOICE_ITEM_ASSOC);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__FROM_DATE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__AMOUNT);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__QUANTITY);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__THRU_DATE);\n\n\t\tinvoiceItemAssocTypeEClass = createEClass(INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__INVOICE_ITEM_ASSOC_TYPE_ID);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemAttributeEClass = createEClass(INVOICE_ITEM_ATTRIBUTE);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceItemTypeEClass = createEClass(INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ID);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DEFAULT_GL_ACCOUNT);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ATTRS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_GL_ACCOUNTS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemTypeAttrEClass = createEClass(INVOICE_ITEM_TYPE_ATTR);\n\t\tcreateEReference(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__DESCRIPTION);\n\n\t\tinvoiceItemTypeGlAccountEClass = createEClass(INVOICE_ITEM_TYPE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__ORGANIZATION_PARTY);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__GL_ACCOUNT);\n\n\t\tinvoiceItemTypeMapEClass = createEClass(INVOICE_ITEM_TYPE_MAP);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_MAP_KEY);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_TYPE);\n\n\t\tinvoiceNoteEClass = createEClass(INVOICE_NOTE);\n\t\tcreateEReference(invoiceNoteEClass, INVOICE_NOTE__INVOICE);\n\n\t\tinvoiceRoleEClass = createEClass(INVOICE_ROLE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__INVOICE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__PARTY);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__ROLE_TYPE);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__DATETIME_PERFORMED);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__PERCENTAGE);\n\n\t\tinvoiceStatusEClass = createEClass(INVOICE_STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__INVOICE);\n\t\tcreateEAttribute(invoiceStatusEClass, INVOICE_STATUS__STATUS_DATE);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__CHANGE_BY_USER_LOGIN);\n\n\t\tinvoiceTermEClass = createEClass(INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ID);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__DESCRIPTION);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_DAYS);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__TERM_TYPE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TEXT_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__UOM_ID);\n\n\t\tinvoiceTermAttributeEClass = createEClass(INVOICE_TERM_ATTRIBUTE);\n\t\tcreateEReference(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceTypeEClass = createEClass(INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ID);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ATTRS);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__PARENT_TYPE);\n\n\t\tinvoiceTypeAttrEClass = createEClass(INVOICE_TYPE_ATTR);\n\t\tcreateEReference(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__DESCRIPTION);\n\t}", "public CommandProcessXML(String filePath){\n _xmlFile = new File(filePath);\n _dbFactory = DocumentBuilderFactory.newInstance();\n }", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n if(!inputDurationType.equals(\"\"))\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName, inputDurationType);\r\n else\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName); \r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "public void generateCDAFiles() throws Exception {\n\n String stopwatchStart = new SimpleDateFormat(\"yyyy-MM-dd-HH.mm.ss\").format(new Date());\n\n // file/directory locations for the app\n// String labid_file = getPropValues(\"labid-file\") + ts;\n// String comb_dir = getPropValues(\"combined-xml-dir\") + ts;\n// String mal_dir = getPropValues(\"malformed-xml-dir\") + ts;\n// String cda_dir = getPropValues(\"cda-dir\") + ts;\n\n String labid_file = getPropValues(\"labid-file\");\n String haidisplay_file = getPropValues(\"haidisplay-file\");\n String comb_dir = getPropValues(\"combined-xml-dir\");\n String mal_dir = getPropValues(\"malformed-xml-dir\");\n String cda_dir = getPropValues(\"cda-dir\"); //+ \"/\" + stopwatchStart;\n\n // hai-display must be in the same directory as the final CDAs for them to be displayed properly\n File sourceHai = new File(haidisplay_file);\n File targetHai = new File(cda_dir + \"/hai-display.xsl\");\n FileUtils.copyFile(sourceHai, targetHai);\n\n // create new XML Builder\n XMLBuilder xmlBuilder = new XMLBuilder();\n\n // creates ADT + ORU XML files in src/main/resources/ directory\n xmlBuilder.process();\n\n // get list of combined XML (ADT) files\n File dir = new File(comb_dir);\n File[] files = dir.listFiles();\n\n if (files != null) {\n for (File file : files) {\n // Transform XML files using an XSL file to CDA-like files\n\n //src/main/resources/combinedXML/[id]-source.xml\n String relPath = file.getPath();\n //[id]-source.xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 11);\n // System.out.println(relPath);\n // System.out.println(filename);\n // System.out.println(id);\n\n\n String inputXSL = labid_file;\n String inputXML = relPath;\n String outputLabId = mal_dir + \"/\" + id + \".xml\";\n Transform transform = new Transform();\n\n /**/\n\n /**\n String inputXSL = \"src/main/resources/labid.xsl\";\n String inputXML = \"src/main/resources/combinedXML/2.16.840.1.114222.4.1.646516-source.xml\";\n String outputLabId = \"src/main/resources/malformedCDA/2.16.840.1.114222.4.1.646516.xml\";\n Transform transform = new Transform();\n\n /**/\n\n try {\n transform.transformXML(inputXSL, inputXML, outputLabId);\n } catch (Exception e) {\n System.out.println(\"well... that didn't work...\");\n e.printStackTrace();\n }\n /**/\n\n }\n }\n\n\n //TODO: clean up Silas's CDA-like file\n // get list of malformed CDA files\n File mcdaDir = new File(mal_dir);\n File[] mcdafiles = mcdaDir.listFiles();\n\n int count = 0;\n int badCount = 0;\n List<String> badList = new ArrayList<String>();\n\n if (files != null) {\n for (File file : mcdafiles) {\n\n //src/main/resources/malformedCDA/[id].xml\n String relPath = file.getPath();\n //[id].xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 4);\n System.out.println(relPath);\n System.out.println(filename);\n System.out.println(id);\n\n FileReader reader = null;\n String content = \"\";\n try {\n reader = new FileReader(file);\n char[] chars = new char[(int) file.length()];\n try {\n reader.read(chars);\n } catch (IOException e) {\n e.printStackTrace();\n }\n content = new String(chars);\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n // System.out.println(content);\n\n\n int cdaRootIndex = content.indexOf(\"<ClinicalDocument\");\n if (cdaRootIndex < 1) {\n System.out.println(\"no clinical document tag found in malformed CDA with id: \" + id);\n badCount++;\n badList.add(id);\n continue;\n } else {\n String clinicalDoc = content.substring(cdaRootIndex);\n\n\n //System.out.println(clinicalDoc);\n String cleanTop = replace(clinicalDoc, \"<ClinicalDocument\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"hai-display.xsl\\\"?>\\n<ClinicalDocument\");\n String cleanCDA = replace(cleanTop, \"</root>\", \"\");\n //System.out.println(cleanCDA);\n String now = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n try {\n FileUtils.writeStringToFile(new File(cda_dir + \"/\" + id + \"--\" + now + \".xml\"), cleanCDA);\n System.out.println(\"wrote to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n count++;\n } catch (IOException e) {\n System.out.println(\"problem writing to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n e.printStackTrace();\n }\n }\n\n }\n\n System.out.println(\"# CDA Files created: \" + count);\n System.out.println(\"# bad malformed CDAs: \" + badCount);\n for(String id: badList) {\n System.out.println(\"bad id:\" + id);\n }\n }\n }", "void generateContent(OutputStream output) throws Exception;", "public static void main(String[] args) throws ParserConfigurationException, TransformerException, IOException {\n\t\tString[] nomeid={\"primo\",\"secondo\",\"terzo\",\"quarto\",\"quinto\",\"sesto\",\"settimo\",\"ottavo\",\"nono\",\"decimo\",\"undicesimo\",\"dodicesimo\",\"tredicesimo\",\"quattordicesimo\",\"quindicesimo\",\"sedicesimo\",\"diciassettesimo\",\"diciottesimo\",\"diciannovesimo\"};\r\n\r\n\t\t\r\n\t\t\r\n\t//for(int j=0;j<19;j++){\t\r\n\t\t\r\n\t\t//int nomefile=j+1;\r\n\t\tFile f=new File(\"C:\\\\Users\\\\Windows\\\\Desktop\\\\corpus\\\\corpus artigianale\\\\corpus2.xml\");\r\n\t\tString content = readFile(\"C:\\\\Users\\\\Windows\\\\Desktop\\\\corpus\\\\corpus artigianale\\\\corpus2.txt\", StandardCharsets.UTF_8);\t\r\n\t\tString[] frase=content.split(\"\\\\.\");\r\n\t\tString nome=nomeid[4];\t\r\n\t\t\t\r\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n\t \r\n\t\t\t// root elements\r\n\t\t\tDocument doc = docBuilder.newDocument();\r\n\t\t\tElement rootElement = doc.createElement(\"add\");\r\n\t\t\tdoc.appendChild(rootElement);\r\n\t\t\t\r\n\t\t\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tfor (int i=0;i<frase.length;i++){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//if(frase[i].length()>150)\r\n\t\t\t\t//{// doc elements\r\n\t\t\t\t\tElement documento = doc.createElement(\"doc\");\r\n\t\t\t\t\trootElement.appendChild(documento);\r\n\t\t\t\t\r\n\t\t\t\t// id elements\r\n\t\t\t\t\t\tElement id = doc.createElement(\"field\");\r\n\t\t\t\t\t\tid.setAttribute(\"name\",\"id\");\r\n\t\t\t\t\t\tid.appendChild(doc.createTextNode(nome+i));\r\n\t\t\t\t\t\tdocumento.appendChild(id);\r\n\t\t\t\t//name element\r\n\t\t\t\t\t\tElement name = doc.createElement(\"field\");\r\n\t\t\t\t\t\tname.setAttribute(\"name\", \"name\");\r\n\t\t\t\t\t\tname.appendChild(doc.createTextNode(frase[i]));\r\n\t\t\t\t\t\tdocumento.appendChild(name);\r\n\t\t\t\t count++;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(count);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// write the content into xml file\r\n\t\t\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\t\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\t\t\tDOMSource source = new DOMSource(doc);\r\n\t\t\t\t\tStreamResult result = new StreamResult(f);\r\n\t\t\t \r\n\t\t\t\t\t// Output to console for testing\r\n\t\t\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\t\t\t \r\n\t\t\t\t\ttransformer.transform(source, result);\r\n\t\t\t \r\n\t\t\t\t\tSystem.out.println(\"File saved!\");\r\n\t\t\r\n\t //}\r\n\t\r\n\t}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__PARAMS);\n createEReference(modelEClass, MODEL__STATES);\n createEReference(modelEClass, MODEL__POPULATION);\n\n paramEClass = createEClass(PARAM);\n createEAttribute(paramEClass, PARAM__NAME);\n createEAttribute(paramEClass, PARAM__VALUE);\n\n agentStateEClass = createEClass(AGENT_STATE);\n createEAttribute(agentStateEClass, AGENT_STATE__NAME);\n createEReference(agentStateEClass, AGENT_STATE__PREFIXS);\n\n prefixEClass = createEClass(PREFIX);\n createEReference(prefixEClass, PREFIX__ACTION);\n createEAttribute(prefixEClass, PREFIX__CONTINUE);\n\n actionEClass = createEClass(ACTION);\n createEAttribute(actionEClass, ACTION__NAME);\n createEReference(actionEClass, ACTION__RATE);\n\n acT_SpNoMsgEClass = createEClass(ACT_SP_NO_MSG);\n\n acT_SpBrEClass = createEClass(ACT_SP_BR);\n createEReference(acT_SpBrEClass, ACT_SP_BR__RANGE);\n\n acT_SpUniEClass = createEClass(ACT_SP_UNI);\n createEReference(acT_SpUniEClass, ACT_SP_UNI__RANGE);\n\n acT_InBrEClass = createEClass(ACT_IN_BR);\n createEReference(acT_InBrEClass, ACT_IN_BR__VALUE);\n\n acT_InUniEClass = createEClass(ACT_IN_UNI);\n createEReference(acT_InUniEClass, ACT_IN_UNI__VALUE);\n\n iRangeEClass = createEClass(IRANGE);\n\n pR_ExprEClass = createEClass(PR_EXPR);\n createEReference(pR_ExprEClass, PR_EXPR__PR_E);\n\n terminal_PR_ExprEClass = createEClass(TERMINAL_PR_EXPR);\n createEAttribute(terminal_PR_ExprEClass, TERMINAL_PR_EXPR__LINKED_PARAM);\n\n ratE_ExprEClass = createEClass(RATE_EXPR);\n createEReference(ratE_ExprEClass, RATE_EXPR__RT);\n\n terminal_RATE_ExprEClass = createEClass(TERMINAL_RATE_EXPR);\n createEAttribute(terminal_RATE_ExprEClass, TERMINAL_RATE_EXPR__LINKED_PARAM);\n\n agenT_NUMEClass = createEClass(AGENT_NUM);\n createEAttribute(agenT_NUMEClass, AGENT_NUM__TYPE);\n\n populationEClass = createEClass(POPULATION);\n createEReference(populationEClass, POPULATION__POPU);\n\n agentsEClass = createEClass(AGENTS);\n createEAttribute(agentsEClass, AGENTS__TYPE);\n }", "public void exec() throws IOException, XMLStreamException {\n\n\t\tdoc_set = new HashSet<String>();\n\n\t\t// XML event reader of source XML file\n\n\t\tXMLInputFactory in_factory = XMLInputFactory.newInstance();\n\n\t\tInputStream in = PgSchemaUtil.getSchemaInputStream(sph_data_in_path);\n\n\t\tXMLEventReader reader = in_factory.createXMLEventReader(in);\n\n\t\t// XML event writer of extracted XML file\n\n\t\tXMLOutputFactory out_factory = XMLOutputFactory.newInstance();\n\n\t\t// XML event writer of extracted XML file\n\n\t\tBufferedWriter bout = new BufferedWriter(new OutputStreamWriter(Files.newOutputStream(sph_data_out_path), PgSchemaUtil.def_encoding), PgSchemaUtil.def_buffered_output_stream_buffer_size);\n\n\t\txml_writer = out_factory.createXMLEventWriter(bout);\n\n\t\t// XML event writer for interim XML content before xml_writer is prepared\n\n\t\tinterim_events = new ArrayList<XMLEvent>();\n\n\t\tXMLEvent event;\n\t\tEventHandler handler;\n\n\t\twhile (reader.hasNext()) {\n\n\t\t\tevent = reader.nextEvent();\n\n\t\t\thandler = read_handlers.get(event.getEventType());\n\n\t\t\thandler.handleEvent(event);\n\n\t\t}\n\n\t\tinterim_events.clear();\n\n\t\tbout.close();\n\n\t\treader.close();\n\n\t\tin.close();\n\n\t\tdoc_set.clear();\n\n\t\tread_handlers.clear();\n\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\treadCsvFileEClass = createEClass(READ_CSV_FILE);\n\t\tcreateEAttribute(readCsvFileEClass, READ_CSV_FILE__URI);\n\n\t\tprintEClass = createEClass(PRINT);\n\t\tcreateEReference(printEClass, PRINT__INPUT);\n\n\t\twriteCsvFileEClass = createEClass(WRITE_CSV_FILE);\n\t\tcreateEReference(writeCsvFileEClass, WRITE_CSV_FILE__TABLE);\n\t\tcreateEAttribute(writeCsvFileEClass, WRITE_CSV_FILE__URI);\n\n\t\texcludeColumnsEClass = createEClass(EXCLUDE_COLUMNS);\n\t\tcreateEReference(excludeColumnsEClass, EXCLUDE_COLUMNS__TABLE);\n\t\tcreateEAttribute(excludeColumnsEClass, EXCLUDE_COLUMNS__COLUMNS);\n\n\t\tselectColumnsEClass = createEClass(SELECT_COLUMNS);\n\t\tcreateEReference(selectColumnsEClass, SELECT_COLUMNS__TABLE);\n\t\tcreateEAttribute(selectColumnsEClass, SELECT_COLUMNS__COLUMNS);\n\n\t\tassertTablesMatchEClass = createEClass(ASSERT_TABLES_MATCH);\n\t\tcreateEReference(assertTablesMatchEClass, ASSERT_TABLES_MATCH__LEFT);\n\t\tcreateEReference(assertTablesMatchEClass, ASSERT_TABLES_MATCH__RIGHT);\n\t\tcreateEAttribute(assertTablesMatchEClass, ASSERT_TABLES_MATCH__IGNORE_COLUMN_ORDER);\n\t\tcreateEAttribute(assertTablesMatchEClass, ASSERT_TABLES_MATCH__IGNORE_MISSING_COLUMNS);\n\n\t\twriteLinesEClass = createEClass(WRITE_LINES);\n\t\tcreateEAttribute(writeLinesEClass, WRITE_LINES__URI);\n\t\tcreateEAttribute(writeLinesEClass, WRITE_LINES__APPEND);\n\n\t\treadLinesEClass = createEClass(READ_LINES);\n\t\tcreateEAttribute(readLinesEClass, READ_LINES__URI);\n\n\t\tselectRowsEClass = createEClass(SELECT_ROWS);\n\t\tcreateEReference(selectRowsEClass, SELECT_ROWS__TABLE);\n\t\tcreateEAttribute(selectRowsEClass, SELECT_ROWS__COLUMN);\n\t\tcreateEAttribute(selectRowsEClass, SELECT_ROWS__VALUE);\n\t\tcreateEAttribute(selectRowsEClass, SELECT_ROWS__MATCH);\n\n\t\texcludeRowsEClass = createEClass(EXCLUDE_ROWS);\n\t\tcreateEReference(excludeRowsEClass, EXCLUDE_ROWS__TABLE);\n\t\tcreateEAttribute(excludeRowsEClass, EXCLUDE_ROWS__COLUMN);\n\t\tcreateEAttribute(excludeRowsEClass, EXCLUDE_ROWS__VALUE);\n\t\tcreateEAttribute(excludeRowsEClass, EXCLUDE_ROWS__MATCH);\n\n\t\tasTableDataEClass = createEClass(AS_TABLE_DATA);\n\t\tcreateEReference(asTableDataEClass, AS_TABLE_DATA__INPUT);\n\n\t\treadPropertiesEClass = createEClass(READ_PROPERTIES);\n\t\tcreateEAttribute(readPropertiesEClass, READ_PROPERTIES__URI);\n\n\t\t// Create enums\n\t\tignoreColumnsModeEEnum = createEEnum(IGNORE_COLUMNS_MODE);\n\t\trowMatchModeEEnum = createEEnum(ROW_MATCH_MODE);\n\t}", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tsutEClass = createEClass(SUT);\n\t\tcreateEAttribute(sutEClass, SUT__HOSTNAME);\n\t\tcreateEAttribute(sutEClass, SUT__IP);\n\t\tcreateEAttribute(sutEClass, SUT__HARDWARE);\n\t\tcreateEReference(sutEClass, SUT__SUT);\n\t\tcreateEReference(sutEClass, SUT__METRICMODEL);\n\t\tcreateEAttribute(sutEClass, SUT__TYPE);\n\n\t\tloadGeneratorEClass = createEClass(LOAD_GENERATOR);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HOSTNAME);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IP);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IS_MONITOR);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__SUT);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__METRICMODEL);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HARDWARE);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__MONITOR);\n\n\t\tmonitorEClass = createEClass(MONITOR);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HOSTNAME);\n\t\tcreateEAttribute(monitorEClass, MONITOR__IP);\n\t\tcreateEReference(monitorEClass, MONITOR__SUT);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HARDWARE);\n\t\tcreateEAttribute(monitorEClass, MONITOR__DESCRIPTION);\n\n\t\tmetricModelEClass = createEClass(METRIC_MODEL);\n\t\tcreateEAttribute(metricModelEClass, METRIC_MODEL__NAME);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__CRITERIA);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__THRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__ASSOCIATIONCOUNTERCRITERIATHRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__METRIC);\n\n\t\t// Create enums\n\t\tsuT_TYPEEEnum = createEEnum(SUT_TYPE);\n\t\thardwareEEnum = createEEnum(HARDWARE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinstructionEClass = createEClass(INSTRUCTION);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n\t\tgoForwardEClass = createEClass(GO_FORWARD);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__CM);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__INFINITE);\n\n\t\tgoBackwardEClass = createEClass(GO_BACKWARD);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__CM);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__INFINITE);\n\n\t\tbeginEClass = createEClass(BEGIN);\n\n\t\trotateEClass = createEClass(ROTATE);\n\t\tcreateEAttribute(rotateEClass, ROTATE__DEGREES);\n\t\tcreateEAttribute(rotateEClass, ROTATE__RANDOM);\n\n\t\treleaseEClass = createEClass(RELEASE);\n\n\t\tactionEClass = createEClass(ACTION);\n\n\t\tblockEClass = createEClass(BLOCK);\n\n\t\tendEClass = createEClass(END);\n\n\t\tchoreographyEClass = createEClass(CHOREOGRAPHY);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__INSTRUCTIONS);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__EDGE_INSTRUCTIONS);\n\n\t\tedgeInstructionEClass = createEClass(EDGE_INSTRUCTION);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__SOURCE);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__TARGET);\n\n\t\tgrabEClass = createEClass(GRAB);\n\t}", "public void createModuleGeneratedXMLPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getModuleGeneratedXMLPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleGeneratedXMLPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}", "@Parameters({ \"Test\", \"env\", \"Parallel\" })\n\t@Test\n\tpublic void createXMLfile(String Test, String env, @Optional(\"false\") Boolean parallel) throws IOException {\n\n\t\tExcel_Handling excel = new Excel_Handling();\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\n Instant instant = timestamp.toInstant();\n \n String timeStampString = instant.toString();\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\t//SimpleDateFormat formatter = new SimpleDateFormat(\"ddMMyyyyHHmm\"); \n\t\t//Date date = new Date(); \n\t\tFile dataSheet = null;\n\t\tFile dataSheetResult = null;\n\t\tString nameReport = null;\n\t\t\n\t\tnameReport = env+Test+\".html\";\n\t\t//nameReport = env+Test+formatter.format(date)+\".html\";\n\t\t\t\t\n\t\tif (Test.equalsIgnoreCase(\"RegressionIBM\")) {\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_Regression_IBM.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_RegressionIBM_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"RegressionBP\")) {\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_Regression_BP.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Regression_BP_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"SanityBP\")) {\n\t\t\tSystem.out.println(\"SanityBP reader done!\");\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_SanityBP.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Sanity_ResultBP.xlsx\").getFile());\n\t\t\tnameReport = \"SanityBPParallel.html\";\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"SanityIBM\")) {\n\t\t\tSystem.out.println(\"SanityIBM reader done!\");\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_SanityIBM.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Sanity_ResultIBM.xlsx\").getFile());\n\t\t\tnameReport = \"SanityIBMParallel.html\";\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_IBM\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_IBM.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_IBM_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_BP\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_BP.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_BP_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_Min\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_Min.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_Min_Result.xlsx\").getFile());\n\t\t}\n\t\ttry {\n\t\t\texcel.ExcelReader(dataSheet.getAbsolutePath(), \"Data\", dataSheetResult.getAbsolutePath(), \"Data\");\n\t\t\texcel.getExcelDataAll(\"Data\", \"Execute\", \"Y\", \"TC_ID\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"excel reader done!\");\n\t\tSystem.out.println(\"test env is \" + env);\n\n\t\tMap<String, HashMap<String, String>> map = Excel_Handling.TestData;\n\t\t// creation of the testng xml based on parameters/data\n\t\tTestNG testNG = new TestNG();\n\t\tReport_Setup.getInstance();\n\t\tReport_Setup.setReportName(nameReport);\n\t\t\n\t\tXmlSuite suite = new XmlSuite();\n\t\tif (parallel) {\n\t\t\tsuite.setParallel(ParallelMode.TESTS);\n\t\t}\n\t\tfor (String key : map.keySet()) {\n\t\t\tFile configFile = new File(classLoader.getResource(\"Config.xml\").getFile());\n\t\t\tSystem.out.println(\"configFile:: \" + configFile.getAbsolutePath());\n\t\t\tfinal Common_Functions commonFunctions = new Common_Functions();\n\t\t\tsuite.setName(commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), \"Regression_Suite_Name\"));\n\t\t\tXmlTest test = new XmlTest(suite);\n\t\t\ttest.setName(key);\n\t\t\ttest.setPreserveOrder(\"true\");\n\t\t\ttest.addParameter(\"browserType\", Excel_Handling.Get_Data(key, \"Browser_Type\"));\n\t\t\ttest.addParameter(\"tcID\", key);\n\t\t\ttest.addParameter(\"ENV\", env);\n\t\t\ttest.addParameter(\"appURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), \"AppUrl\"));\n\t\t\ttest.addParameter(\"IBMURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"IBM\"));\n\t\t\ttest.addParameter(\"PCSURL\",commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"BPDirectPCS\"));\n\t\t\ttest.addParameter(\"MySAURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"MySA\"));\n\t\t\ttest.addParameter(\"Timestamp\", timeStampString);\n\t\t\tXmlClass testClass = new XmlClass();\n\n\t\t\tif (Test.equalsIgnoreCase(\"RegressionIBM\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.RegressionIBM.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"RegressionBP\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.RegressionBP.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"SanityBP\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Sanity.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"SanityIBM\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Sanity.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_IBM\"))\t{\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_BP\")) { \n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_Min\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\ttest.setXmlClasses(Arrays.asList(new XmlClass[] { testClass }));\n\t\t}\n\t\tList<String> suites = new ArrayList<String>();\n\t\tfinal File f1 = new File(Create_TestNGXML.class.getProtectionDomain().getCodeSource().getLocation().getPath());\n\t\tSystem.out.println(\"f1:: \" + f1.getAbsolutePath());\n\t\tFile f = new File(\".\\\\testNG.xml\");\n\t\tf.createNewFile();\n\t\tFileWriter fw = new FileWriter(f.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(suite.toXml());\n\t\tbw.close();\n\t\tsuites.add(f.getPath());\n\t\ttestNG.setTestSuites(suites);\n\t\ttestNG.run();\n\t\tf.delete();\n\t\tReport_Setup.flush();\n\n\t}", "public void xmlPresentation () {\n System.out.println ( \"****** XML Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n Books books = new Books();\n books.setBooks(new ArrayList<Book>());\n\n bookArrayList = new Request().postRequestBook();\n\n for (Book aux: bookArrayList) {\n books.getBooks().add(aux);\n }\n\n try {\n javax.xml.bind.JAXBContext jaxbContext = JAXBContext.newInstance(Books.class);\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n jaxbMarshaller.marshal(books, System.out);\n } catch (JAXBException e) {\n System.out.println(\"Error: \"+ e);\n }\n ClientEntry.showMenu ( );\n }", "public void run() {\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tsb.append(\"<files>\");\n\t\t\t\tsb.append(\"<file>\");\n\t\t\t\tsb.append(\"<username>\");\n\t\t\t\tsb.append(e1);\n\t\t\t\tsb.append(\"</username>\");\n\t\t\t\t\n\t\t\t\tsb.append(\"<password>\");\n\t\t\t\tsb.append(e2);\n\t\t\t\tsb.append(\"</password>\");\n\t\t\t\t\n\t\t\t\tsb.append(\"<email>\");\n\t\t\t\tsb.append(e4);\n\t\t\t\tsb.append(\"</email>\");\n\t\t\t\tsb.append(\"<name>\");\n\t\t\t\tsb.append(e5);\n\t\t\t\tsb.append(\"</name>\");\n\t\t\t\t\n\t\t\t\tsb.append(\"<sex>\");\n\t\t\t\tsb.append(i);\n\t\t\t\tsb.append(\"</sex>\");\n\t\t\t\tsb.append(\"<phone>\");\n\t\t\t\tsb.append(e6);\n\t\t\t\tsb.append(\"</phone>\");\n\t\t\t\tsb.append(\"<headname>\");\n\t\t\t\tsb.append(url);\n\t\t\t\tsb.append(\"</headname>\");\n\t\t\t\tsb.append(\"<head>\");\n\t\t\t\tByteArrayOutputStream bo = new ByteArrayOutputStream();\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tFileInputStream f = new FileInputStream(\"/sdcard/\"+url);\n\t\t\t\tbyte []image = new byte [1024];\n\t\t\t\tint len = 0;\n\t\t\t\twhile ((len=f.read(image))!=-1){\n\t\t\t\t\tbo.write(image, 0, len);\n\t\t\t\t}\n\t\t\t\tbyte re[] = bo.toByteArray();\n\t\t\t\tString encond = Base64.encodeToString(re, Base64.DEFAULT);\n\t\t\t\n\t\t\t\tbo.close();\n\t\t\t\tf.close();\n\t\t\t\tsb.append(encond);\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\n\t\t\t\tsb.append(\"</head>\");\n\t\t\t\tsb.append(\"<job>\");\n\t\t\t\tsb.append(e8);\n\t\t\t\tsb.append(\"</job>\");\n\t\t\t\tsb.append(\"<address>\");\n\t\t\t\tsb.append(e9);\n\t\t\t\tsb.append(\"</address>\");\n\t\t\t\tsb.append(\"<circle>\");\n\t\t\t\tsb.append(e10);\n\t\t\t\tsb.append(\"</circle>\");\n\t\t\t\tsb.append(\"<guanzhu>\");\n\t\t\t\tsb.append(n1+\"\"+n2+\"\"+n3);\n\t\t\t\tsb.append(\"</guanzhu>\");\n\t\t\t\tsb.append(\"</file>\");\n\t\t\t\tsb.append(\"</files>\");\n\t\t\t\tbyte content[] = sb.toString().getBytes();\n\t\t\t\ttry {\n\t\t\t\t\tURL u = new URL(\"http://10.0.2.2:8080/Lvyou/LYRegisterServlet\");\n\t\t\t\t\tHttpURLConnection huc = (HttpURLConnection) u.openConnection();\n\t\t\t\t\thuc.setDoInput(true);\n\t\t\t\t\thuc.setDoOutput(true);\n\t\t\t\t\thuc.setRequestMethod(\"POST\");\n\t\t\t\t\thuc.setRequestProperty(\"Content-Type\", \"mutipart/form-data\");\n\t\t\t\t\thuc.setRequestProperty(\"Content-Length\", content.length+\"\");\n\t\t\t\t\thuc.getOutputStream().write(content);\n\t\t\t\t\tString str = \"\";\n\t\t\t\t\tif(huc.getResponseCode()==HttpURLConnection.HTTP_OK){\n\t\t\t\t\t\tInputStream in =huc.getInputStream();\n\t\t\t\t\n\t\t\t\t\t\tLYRegisterBean rb = new LYRegisterBean();\n\t\t\t\t\t\tString reg=rb.register(in);\n\t\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\t\tmsg.obj=reg;\n\t\t\t\t\t\thb.sendMessage(msg);\n\n\n\t\t\t\t\t}}\n\t\t\t\t\t catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\tpd.cancel();\n\t\t\t}", "public void generateReport(){\n String fileOutput = \"\";\n fileOutput += allCustomers()+\"\\n\";\n fileOutput += getNoAccounts()+\"\\n\";\n fileOutput += getTotalDeposits()+\"\\n\";\n fileOutput += accountsOfferingLoans()+\"\\n\";\n fileOutput += accountsReceivingLoans()+\"\\n\";\n fileOutput += customersOfferingLoans()+\"\\n\";\n fileOutput += customersReceivingLoans()+\"\\n\";\n System.out.println(fileOutput);\n writeToFile(fileOutput);\n }", "public void generate() {\n\t}", "protected void createContents() {\n\n\t}", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tgemmaEClass = createEClass(GEMMA);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__MACRO_OMS);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__TRANSICIONES);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__VARIABLES_GEMMA);\r\n\r\n\t\tmacroOmEClass = createEClass(MACRO_OM);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__NAME);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__TIPO);\r\n\t\tcreateEReference(macroOmEClass, MACRO_OM__OMS);\r\n\r\n\t\tomEClass = createEClass(OM);\r\n\t\tcreateEAttribute(omEClass, OM__NAME);\r\n\t\tcreateEAttribute(omEClass, OM__TIPO);\r\n\t\tcreateEAttribute(omEClass, OM__ES_OM_RAIZ);\r\n\t\tcreateEReference(omEClass, OM__VARIABLES_OM);\r\n\t\tcreateEAttribute(omEClass, OM__ES_VISIBLE);\r\n\r\n\t\ttrasicionEntreOmOmEClass = createEClass(TRASICION_ENTRE_OM_OM);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__ORIGEN);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__DESTINO);\r\n\r\n\t\ttransicionEntreMacroOmOmEClass = createEClass(TRANSICION_ENTRE_MACRO_OM_OM);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__ORIGEN);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__DESTINO);\r\n\r\n\t\texpresionBinariaEClass = createEClass(EXPRESION_BINARIA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_IZQUIERDA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_DERECHA);\r\n\t\tcreateEAttribute(expresionBinariaEClass, EXPRESION_BINARIA__OPERADOR);\r\n\r\n\t\telementoExpresionEClass = createEClass(ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableOmEClass = createEClass(VARIABLE_OM);\r\n\t\tcreateEAttribute(variableOmEClass, VARIABLE_OM__NAME);\r\n\r\n\t\ttransicionEClass = createEClass(TRANSICION);\r\n\t\tcreateEAttribute(transicionEClass, TRANSICION__NAME);\r\n\t\tcreateEReference(transicionEClass, TRANSICION__ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableGemmaEClass = createEClass(VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(variableGemmaEClass, VARIABLE_GEMMA__NAME);\r\n\r\n\t\trefVariableGemmaEClass = createEClass(REF_VARIABLE_GEMMA);\r\n\t\tcreateEReference(refVariableGemmaEClass, REF_VARIABLE_GEMMA__VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(refVariableGemmaEClass, REF_VARIABLE_GEMMA__NIVEL_DE_ESCRITURA);\r\n\r\n\t\texpresionNotEClass = createEClass(EXPRESION_NOT);\r\n\t\tcreateEReference(expresionNotEClass, EXPRESION_NOT__ELEMENTO_EXPRESION);\r\n\r\n\t\trefVariableOmEClass = createEClass(REF_VARIABLE_OM);\r\n\t\tcreateEReference(refVariableOmEClass, REF_VARIABLE_OM__VARIABLE_OM);\r\n\r\n\t\texpresionConjuntaEClass = createEClass(EXPRESION_CONJUNTA);\r\n\t\tcreateEReference(expresionConjuntaEClass, EXPRESION_CONJUNTA__ELEMENTO_EXPRESION);\r\n\r\n\t\t// Create enums\r\n\t\ttipoOmEEnum = createEEnum(TIPO_OM);\r\n\t\ttipoMacroOmEEnum = createEEnum(TIPO_MACRO_OM);\r\n\t\ttipoOperadorEEnum = createEEnum(TIPO_OPERADOR);\r\n\t\tnivelDeEscrituraEEnum = createEEnum(NIVEL_DE_ESCRITURA);\r\n\t}", "public void createPackageContents()\r\n {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n productEClass = createEClass(PRODUCT);\r\n createEAttribute(productEClass, PRODUCT__PRICE);\r\n createEAttribute(productEClass, PRODUCT__NAME);\r\n createEAttribute(productEClass, PRODUCT__ID);\r\n createEReference(productEClass, PRODUCT__PRODUCER);\r\n createEReference(productEClass, PRODUCT__WISHLISTS);\r\n createEReference(productEClass, PRODUCT__OFFERED_BY);\r\n\r\n customerEClass = createEClass(CUSTOMER);\r\n createEReference(customerEClass, CUSTOMER__ALL_BOUGHT_PRODUCTS);\r\n createEAttribute(customerEClass, CUSTOMER__NAME);\r\n createEAttribute(customerEClass, CUSTOMER__AGE);\r\n createEAttribute(customerEClass, CUSTOMER__ID);\r\n createEReference(customerEClass, CUSTOMER__WISHLISTS);\r\n createEAttribute(customerEClass, CUSTOMER__USERNAME);\r\n\r\n producerEClass = createEClass(PRODUCER);\r\n createEAttribute(producerEClass, PRODUCER__ID);\r\n createEAttribute(producerEClass, PRODUCER__NAME);\r\n createEReference(producerEClass, PRODUCER__PRODUCTS);\r\n\r\n storeEClass = createEClass(STORE);\r\n createEReference(storeEClass, STORE__CUSTOMERS);\r\n createEReference(storeEClass, STORE__PRODUCTS);\r\n createEReference(storeEClass, STORE__PRODUCERS);\r\n createEReference(storeEClass, STORE__SELLERS);\r\n\r\n bookEClass = createEClass(BOOK);\r\n createEAttribute(bookEClass, BOOK__AUTHOR);\r\n\r\n dvdEClass = createEClass(DVD);\r\n createEAttribute(dvdEClass, DVD__INTERPRET);\r\n\r\n wishlistEClass = createEClass(WISHLIST);\r\n createEReference(wishlistEClass, WISHLIST__PRODUCTS);\r\n\r\n sellerEClass = createEClass(SELLER);\r\n createEAttribute(sellerEClass, SELLER__NAME);\r\n createEAttribute(sellerEClass, SELLER__ID);\r\n createEAttribute(sellerEClass, SELLER__USERNAME);\r\n createEReference(sellerEClass, SELLER__ALL_PRODUCTS_TO_SELL);\r\n createEReference(sellerEClass, SELLER__EREFERENCE0);\r\n createEReference(sellerEClass, SELLER__SOLD_PRODUCTS);\r\n }", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\r\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\r\n\r\n\t\tcomDiagEClass = createEClass(COM_DIAG);\r\n\t\tcreateEReference(comDiagEClass, COM_DIAG__ELEMENTS);\r\n\t\tcreateEAttribute(comDiagEClass, COM_DIAG__LEVEL);\r\n\r\n\t\tcomDiagElementEClass = createEClass(COM_DIAG_ELEMENT);\r\n\t\tcreateEReference(comDiagElementEClass, COM_DIAG_ELEMENT__GRAPH);\r\n\r\n\t\tlifelineEClass = createEClass(LIFELINE);\r\n\t\tcreateEAttribute(lifelineEClass, LIFELINE__NUMBER);\r\n\r\n\t\tmessageEClass = createEClass(MESSAGE);\r\n\t\tcreateEAttribute(messageEClass, MESSAGE__OCCURENCE);\r\n\t\tcreateEReference(messageEClass, MESSAGE__SOURCE);\r\n\t\tcreateEReference(messageEClass, MESSAGE__TARGET);\r\n\t}", "private void processGenerateOutputButton() {\n try {\n if(selectedFile != null) {\n //initialScannerOfDataFile();\n world = new World(\"My World\", 0, 0, selectedFile);\n String myTotalOutput = world.toString();\n dataOutputArea.setText(myTotalOutput);\n createTree();\n\n } else {\n JOptionPane.showMessageDialog(null, \"No selected file!\");\n }\n } catch(Exception e2) {\n System.out.println(\"Something is wrong with output generation!\\n\\n\" + e2.getMessage());\n } //end of catch()\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__STMTS);\n\n simpleStatementEClass = createEClass(SIMPLE_STATEMENT);\n\n assignmentEClass = createEClass(ASSIGNMENT);\n createEReference(assignmentEClass, ASSIGNMENT__LEFT_HAND_SIDE);\n createEReference(assignmentEClass, ASSIGNMENT__RIGHT_HAND_SIDE);\n\n expressionEClass = createEClass(EXPRESSION);\n\n unaryMinusExpressionEClass = createEClass(UNARY_MINUS_EXPRESSION);\n createEReference(unaryMinusExpressionEClass, UNARY_MINUS_EXPRESSION__SUB);\n\n unaryPlusExpressionEClass = createEClass(UNARY_PLUS_EXPRESSION);\n createEReference(unaryPlusExpressionEClass, UNARY_PLUS_EXPRESSION__SUB);\n\n logicalNegationExpressionEClass = createEClass(LOGICAL_NEGATION_EXPRESSION);\n createEReference(logicalNegationExpressionEClass, LOGICAL_NEGATION_EXPRESSION__SUB);\n\n bracketExpressionEClass = createEClass(BRACKET_EXPRESSION);\n createEReference(bracketExpressionEClass, BRACKET_EXPRESSION__SUB);\n\n pointerCallEClass = createEClass(POINTER_CALL);\n\n variableCallEClass = createEClass(VARIABLE_CALL);\n createEAttribute(variableCallEClass, VARIABLE_CALL__NAME);\n\n arraySpecifierEClass = createEClass(ARRAY_SPECIFIER);\n\n unarySpecifierEClass = createEClass(UNARY_SPECIFIER);\n createEAttribute(unarySpecifierEClass, UNARY_SPECIFIER__INDEX);\n\n rangeSpecifierEClass = createEClass(RANGE_SPECIFIER);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__FROM);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__TO);\n\n ioFunctionsEClass = createEClass(IO_FUNCTIONS);\n createEAttribute(ioFunctionsEClass, IO_FUNCTIONS__FILE_NAME);\n\n infoFunctionsEClass = createEClass(INFO_FUNCTIONS);\n\n manipFunctionsEClass = createEClass(MANIP_FUNCTIONS);\n\n arithFunctionsEClass = createEClass(ARITH_FUNCTIONS);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__EXPRESSION);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__FIELD);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__WHERE_EXPRESSION);\n\n loadEClass = createEClass(LOAD);\n\n storeEClass = createEClass(STORE);\n createEReference(storeEClass, STORE__EXPRESSION);\n\n exportEClass = createEClass(EXPORT);\n createEReference(exportEClass, EXPORT__EXPRESSION);\n\n printEClass = createEClass(PRINT);\n createEReference(printEClass, PRINT__EXPRESSION);\n\n depthEClass = createEClass(DEPTH);\n createEReference(depthEClass, DEPTH__EXPRESSION);\n\n fieldInfoEClass = createEClass(FIELD_INFO);\n createEReference(fieldInfoEClass, FIELD_INFO__EXPRESSION);\n\n containsEClass = createEClass(CONTAINS);\n createEReference(containsEClass, CONTAINS__KEYS);\n createEReference(containsEClass, CONTAINS__RIGHT);\n\n selectEClass = createEClass(SELECT);\n createEReference(selectEClass, SELECT__FIELDS);\n createEReference(selectEClass, SELECT__FROM_EXPRESSION);\n createEReference(selectEClass, SELECT__WHERE_EXPRESSION);\n\n lengthEClass = createEClass(LENGTH);\n createEReference(lengthEClass, LENGTH__EXPRESSION);\n\n sumEClass = createEClass(SUM);\n\n productEClass = createEClass(PRODUCT);\n\n constantEClass = createEClass(CONSTANT);\n\n primitiveEClass = createEClass(PRIMITIVE);\n createEAttribute(primitiveEClass, PRIMITIVE__STR);\n createEAttribute(primitiveEClass, PRIMITIVE__INT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__FLOAT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__BOOL);\n createEAttribute(primitiveEClass, PRIMITIVE__NIL);\n\n arrayEClass = createEClass(ARRAY);\n createEReference(arrayEClass, ARRAY__VALUES);\n\n jSonObjectEClass = createEClass(JSON_OBJECT);\n createEReference(jSonObjectEClass, JSON_OBJECT__FIELDS);\n\n fieldEClass = createEClass(FIELD);\n createEReference(fieldEClass, FIELD__KEY);\n createEReference(fieldEClass, FIELD__VALUE);\n\n disjunctionExpressionEClass = createEClass(DISJUNCTION_EXPRESSION);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__LEFT);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__RIGHT);\n\n conjunctionExpressionEClass = createEClass(CONJUNCTION_EXPRESSION);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__LEFT);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__RIGHT);\n\n equalityExpressionEClass = createEClass(EQUALITY_EXPRESSION);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__LEFT);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__RIGHT);\n\n inequalityExpressionEClass = createEClass(INEQUALITY_EXPRESSION);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__LEFT);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__RIGHT);\n\n superiorExpressionEClass = createEClass(SUPERIOR_EXPRESSION);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__LEFT);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__RIGHT);\n\n superiorOrEqualExpressionEClass = createEClass(SUPERIOR_OR_EQUAL_EXPRESSION);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n inferiorExpressionEClass = createEClass(INFERIOR_EXPRESSION);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__LEFT);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__RIGHT);\n\n inferiorOrEqualExpressionEClass = createEClass(INFERIOR_OR_EQUAL_EXPRESSION);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n additionExpressionEClass = createEClass(ADDITION_EXPRESSION);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__LEFT);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__RIGHT);\n\n substractionExpressionEClass = createEClass(SUBSTRACTION_EXPRESSION);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__LEFT);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__RIGHT);\n\n multiplicationExpressionEClass = createEClass(MULTIPLICATION_EXPRESSION);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__LEFT);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__RIGHT);\n\n divisionExpressionEClass = createEClass(DIVISION_EXPRESSION);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__LEFT);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__RIGHT);\n\n moduloExpressionEClass = createEClass(MODULO_EXPRESSION);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__LEFT);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__RIGHT);\n\n arrayCallEClass = createEClass(ARRAY_CALL);\n createEReference(arrayCallEClass, ARRAY_CALL__CALLEE);\n createEReference(arrayCallEClass, ARRAY_CALL__SPECIFIER);\n\n fieldCallEClass = createEClass(FIELD_CALL);\n createEReference(fieldCallEClass, FIELD_CALL__CALLEE);\n createEAttribute(fieldCallEClass, FIELD_CALL__FIELD);\n }", "public static void addToXML(CD c)\n\t\t\tthrows TransformerException, FileNotFoundException, SAXException, IOException {\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement;\n\t\t\tString filePath = \"src/Part2_Ex3/CD.xml\";\n\t\t\tFile xmlFile = new File(filePath);\n\n\t\t\tif (xmlFile.isFile()) {\n\t\t\t\tdoc = docBuilder.parse(new FileInputStream(xmlFile));\n\t\t\t\tdoc.getDocumentElement().normalize();\n\t\t\t\trootElement = doc.getDocumentElement();\n\t\t\t} else {\n\t\t\t\trootElement = doc.createElement(\"CDs\");\n\t\t\t\tdoc.appendChild(rootElement);\n\t\t\t}\n\n\t\t\tElement cd = doc.createElement(\"CD\");\n\t\t\trootElement.appendChild(cd);\n\n\t\t\t// id element\n\t\t\tElement id = doc.createElement(\"id\");\n\t\t\tid.appendChild(doc.createTextNode(Integer.toString(c.getId())));\n\t\t\tcd.appendChild(id);\n\t\t\t\n\t\t\t// name\n\t\t\tElement name = doc.createElement(\"name\");\n\t\t\tname.appendChild(doc.createTextNode(c.getName()));\n\t\t\tcd.appendChild(name);\n\n\t\t\t//singer\n\t\t\tElement singer = doc.createElement(\"singer\");\n\t\t\tsinger.appendChild((doc.createTextNode(c.getSinger())));\n\t\t\tcd.appendChild(singer);\n\n\t\t\t// number songs\n\t\t\tElement numbersongs = doc.createElement(\"numbersongs\");\n\t\t\tnumbersongs.appendChild(doc.createTextNode(Integer.toString(c.getNumOfSong())));\n\t\t\tcd.appendChild(numbersongs);\n\t\t\t\n\t\t\t// price\n\t\t\tElement price = doc.createElement(\"price\");\n\t\t\tprice.appendChild(doc.createTextNode(Double.toString(c.getPrice())));\n\t\t\tcd.appendChild(price);\n\t\t\t\n\t\t\t// write the content into xml file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(xmlFile);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"Add completed !\");\n\n\t\t} catch (ParserConfigurationException pce) {\n\t\t\tSystem.out.println(\"Cannot insert new CD. Error: \" + pce.getMessage());\n\t\t}\n\t}", "public void readXML(String xml){\n\t\tint maxId = 0;\n\t\ttry {\n \tFile xmlFile = new File(xml); \n \tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n \tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n \tDocument doc = documentBuilder.parse(xmlFile); \n \tdoc.getDocumentElement().normalize();\n \tNodeList nodeList = doc.getElementsByTagName(\"node\");\n \tHashMap<Integer,Artifact> artifactTable = new HashMap<Integer, Artifact>();\n \tHashMap<Integer,Element> nodeTable = new HashMap<Integer, Element>();\n \n \tfor (int i = 0; i < nodeList.getLength(); i++) { \n \t\tNode xmlItem = nodeList.item(i);\n \t\tif (xmlItem.getNodeType() == Node.ELEMENT_NODE) { \n \t\t\tElement node = (Element) xmlItem;\n \t\t\tArtifact newNode = new Artifact(Rel.getContext());\n \t\t\tRel.addView(newNode,100,100);\n \t\t\tnewNode.setId(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent()));\n \t\t\tnewNode.setPrevWidth(100);\n \t\t\tnewNode.setPrevHeight(100);\n \t\t\tnewNode.setTag(\"node\");\n \t\t\tnewNode.setText(node.getElementsByTagName(\"label\").item(0).getTextContent());\n \t\t\tnewNode.setType(node.getElementsByTagName(\"type\").item(0).getTextContent());\n \t\t\tnewNode.setInformation(node.getElementsByTagName(\"information\").item(0).getTextContent());\n \t\t\tnewNode.setPosition(node.getElementsByTagName(\"position\").item(0).getTextContent());\n \t\t\tnewNode.setAge(Long.parseLong(node.getElementsByTagName(\"age\").item(0).getTextContent()));\n \t\t\tnewNode.setBackgroundResource(Utility.getDrawableType(newNode));\n \t\t\tif(\"\".compareTo((String) newNode.getText()) != 0){\n \t\t\t\tnewNode.matchWithText();\n \t\t\t}\n \t\t\tartifactTable.put(newNode.getId(), newNode);\n \t\t\tnodeTable.put(newNode.getId(), node);\n \t\t\tif(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent())>maxId){\n \t\t\t\tmaxId = Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent());\n \t\t\t}\n \t\t} \n \t\t\n \t}\n \t\n \t//once we created all the artifacts now we can set the fathers and sons for every node with the artifact and xmlnode tables we have filled while reading\n \tIterator it = artifactTable.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry)it.next();\n NodeList sonsList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"son\");\n if(sonsList != null){\n\t for (int j = 0; j < sonsList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addSon(artifactTable.get(Integer.parseInt(sonsList.item(j).getTextContent())));\n\t }\n }\n \n NodeList fathersList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"father\");\n if(fathersList != null){\n\t for (int j = 0; j < fathersList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addFather(artifactTable.get(Integer.parseInt(fathersList.item(j).getTextContent())));\n\t }\n }\n \n }\n \n \n }catch(Exception e){\n \tLog.v(\"error reading xml\",e.toString());\n }\n\t\tGlobal.ID = maxId+1;\n\t}", "public void createFirstXmlFile(ArrayList<Entry> entityList);", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__STMTS);\n\n\t\tstmtEClass = createEClass(STMT);\n\n\t\tarithEClass = createEClass(ARITH);\n\n\t\talVarRefEClass = createEClass(AL_VAR_REF);\n\t\tcreateEAttribute(alVarRefEClass, AL_VAR_REF__NAME);\n\n\t\tarithLitEClass = createEClass(ARITH_LIT);\n\t\tcreateEAttribute(arithLitEClass, ARITH_LIT__VAL);\n\n\t\tarithOpEClass = createEClass(ARITH_OP);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__LHS);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__RHS);\n\n\t\tarithPlusEClass = createEClass(ARITH_PLUS);\n\n\t\tarithMinusEClass = createEClass(ARITH_MINUS);\n\n\t\tprintEClass = createEClass(PRINT);\n\t\tcreateEAttribute(printEClass, PRINT__NAME);\n\n\t\tassignEClass = createEClass(ASSIGN);\n\t\tcreateEAttribute(assignEClass, ASSIGN__NAME);\n\t\tcreateEReference(assignEClass, ASSIGN__VAL);\n\n\t\tifStmtEClass = createEClass(IF_STMT);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__IF_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__ELSE_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__TEST);\n\n\t\trandRangeEClass = createEClass(RAND_RANGE);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MIN);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MAX);\n\n\t\tequalityTestEClass = createEClass(EQUALITY_TEST);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__LHS);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__RHS);\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName);\r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "public void CreatFileXML(HashMap<String, List<Detail>> wordMap, String fileName ) throws ParserConfigurationException, TransformerException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.newDocument();\n\t\t\n\t\t//root element\n\t\tElement rootElement = doc.createElement(\"Words\");\n\t\tdoc.appendChild(rootElement);\n\t\t\n\t\tSet<String> keyset = wordMap.keySet();\n\t\tfor(String key : keyset) {\n\t\t\t\n\t\t\t// Load List of detail from HashMap\n\t\t\tList<Detail> values = wordMap.get(key);\n\t\t\t\n\t\t\tfor (Detail detail : values) {\n\t\t\t\n\t\t\t\t//LexicalEntry element\n\t\t\t\tElement LexicalEntry = doc.createElement(\"LexicalEntry\");\n\t\t\t\trootElement.appendChild(LexicalEntry);\n\t\t\t\t\n\t\t\t\t//HeadWord element\n\t\t\t\tElement HeadWord = doc.createElement(\"HeadWord\");\n\t\t\t\tHeadWord.appendChild(doc.createTextNode(key));\n\t\t\t\tLexicalEntry.appendChild(HeadWord);\n\t\t\t\t\n\t\t\t\t//Detail element\n\t\t\t\tElement Detail = doc.createElement(\"Detail\");\n\t\t\t\t\n\t\t\t\t// WordType element\n\t\t\t\tElement WordType = doc.createElement(\"WordType\");\n\t\t\t\tWordType.appendChild(doc.createTextNode(detail.getTypeWord()));\n\t\t\t\t\n\t\t\t\t// CateWord element\n\t\t\t\tElement CateWord = doc.createElement(\"CateWord\");\n\t\t\t\tCateWord.appendChild(doc.createTextNode(detail.getCateWord()));\n\t\t\t\t\n\t\t\t\t// SubCateWord element\n\t\t\t\tElement SubCateWord = doc.createElement(\"SubCateWord\");\n\t\t\t\tSubCateWord.appendChild(doc.createTextNode(detail.getSubCateWord()));\n\t\t\t\t\n\t\t\t\t// VerbPattern element\n\t\t\t\tElement VerbPattern = doc.createElement(\"VerbPattern\");\n\t\t\t\tVerbPattern.appendChild(doc.createTextNode(detail.getVerbPattern()));\n\t\t\t\t\n\t\t\t\t// CateMean element\n\t\t\t\tElement CateMean = doc.createElement(\"CateMean\");\n\t\t\t\tCateMean.appendChild(doc.createTextNode(detail.getCateMean()));\n\t\t\t\t\n\t\t\t\t// Definition element\n\t\t\t\tElement Definition = doc.createElement(\"Definition\");\n\t\t\t\tDefinition.appendChild(doc.createTextNode(detail.getDefinition()));\n\t\t\t\t\n\t\t\t\t// Example element\n\t\t\t\tElement Example = doc.createElement(\"Example\");\n\t\t\t\tExample.appendChild(doc.createTextNode(detail.getExample()));\n\t\t\t\t\n\t\t\t\t// Put in Detail Element\n\t\t\t\tDetail.appendChild(WordType);\n\t\t\t\tDetail.appendChild(CateWord);\n\t\t\t\tDetail.appendChild(SubCateWord);\n\t\t\t\tDetail.appendChild(VerbPattern);\n\t\t\t\tDetail.appendChild(CateMean);\n\t\t\t\tDetail.appendChild(Definition);\n\t\t\t\tDetail.appendChild(Example);\n\t\t\t\t\n\t\t\t\t// Add Detail into LexicalEntry\n\t\t\t\tLexicalEntry.appendChild(Detail);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write the content into xml file\n\t\tTransformerFactory tfmFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = tfmFactory.newTransformer();\n\t\tDOMSource source = new DOMSource(doc);\n\t\tStreamResult result = new StreamResult(new File(\"F://GitHUB/ReadXML/data/\" + fileName));\n\t\ttransformer.transform(source, result);\n\t\t\n//\t\t// output testing\n//\t\tStreamResult consoleResult = new StreamResult(System.out);\n// transformer.transform(source, consoleResult);\n\t}", "public void obtainDisObsr() {\n\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"Observations\");\n\t\t\tdoc.appendChild(rootElement);\n\n\t\t\treader = new BufferedReader(new FileReader(this.dSPath));\n\n\t\t\tString line;\n\t\t\tString id = null;\n\t\t\tString nextID;\n\t\t\tString siteID;\n\t\t\tString siteID_Old = null;\n\t\t\tStringBuilder obsr = null;\n\n\t\t\t/**\n\t\t\t * Data must be sorted by the user ID Data set Arrana=ged as the\n\t\t\t * following ID Time Site ID\n\t\t\t */\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString lineSplit[] = line.split(\",\");\n\n\t\t\t\tnextID = lineSplit[0].trim();\n\n\t\t\t\tif (id == null) {\n\t\t\t\t\tid = nextID;\n\t\t\t\t}\n\t\t\t\tsiteID = lineSplit[2].trim();\n\n\t\t\t\tif (siteID_Old == null) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t} else if (siteID.equals(siteID_Old) && id.equals(nextID)) {\n\t\t\t\t\t// System.out.println(\"same id\");\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (!siteID.equals(siteID_Old)) {\n\t\t\t\t\tsiteID_Old = siteID;\n\t\t\t\t}\n\n\t\t\t\tif (obsr == null) {\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\t\t\t\t} else if (id.equals(nextID)) {\n\t\t\t\t\tobsr.append(\",\");\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * User changed write the XL file Data Change the user ID ,\n\t\t\t\t\t * and record site with the new user\n\t\t\t\t\t */\n\n\t\t\t\t\tElement userElement = doc.createElement(\"user\");\n\t\t\t\t\trootElement.appendChild(userElement);\n\n\t\t\t\t\t// set attribute to staff element\n\t\t\t\t\tAttr attr = doc.createAttribute(\"id\");\n\t\t\t\t\tattr.setValue(id);\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tattr = doc.createAttribute(\"sitesSequanace\");\n\t\t\t\t\tattr.setValue(obsr.toString());\n\t\t\t\t\tuserElement.setAttributeNode(attr);\n\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tobsr = new StringBuilder(siteID);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(new File(this.xmlPath));\n\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"File saved!\");\n\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (ParserConfigurationException | TransformerException pce) {\n\t\t}\n\t}", "abstract protected String getOtherXml();", "public void createXMLFile(String INPUT_XML_SYMBOL) throws IOException {\n\n\t\t// creates isoxxxx-xxx_temp.xml\n\t\tOUTPUT_FILE_TEMP = INPUT_XML_SYMBOL.replace(\".xml\", \"_temp.xml\");\n\n\t\t// get Symbol\n\t\tString xmlSymbol = readFile(INPUT_XML_SYMBOL);\n\n\t\t// get ComponentName\n\t\tint i = xmlSymbol.indexOf(\"ComponentName=\") + 15;\n\t\tint j = xmlSymbol.indexOf(\"\\\"\", i);\n\t\tString componentName = xmlSymbol.substring(i, j);\n\n\t\t// get basic file stuff\n\t\tString xmlHeader = readFile(this.INPUT_XML_HEADER);\n\t\tString xmlBottom = readFile(this.INPUT_XML_FOOTER).replace(\"abc\", componentName);\n\n\t\t// create the new file\n\t\twriteStringToFile(\n\t\t\t\txmlHeader + \"\\n\" + xmlSymbol + \"\\n\" + \"</ShapeCatalogue>\" + \"\\n\" + xmlBottom + \"\\n\" + \"</PlantModel>\");\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tmaturityModelEClass = createEClass(MATURITY_MODEL);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__NAME);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__VERSION);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__RELEASE_DATE);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__AUTHOR);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__DESCRIPTION);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__ACRONYM);\n\t\tcreateEAttribute(maturityModelEClass, MATURITY_MODEL__URL);\n\t\tcreateEReference(maturityModelEClass, MATURITY_MODEL__ORGANIZES);\n\t\tcreateEReference(maturityModelEClass, MATURITY_MODEL__EVOLVES_INTO);\n\n\t\tprocessAreaEClass = createEClass(PROCESS_AREA);\n\t\tcreateEAttribute(processAreaEClass, PROCESS_AREA__NAME);\n\t\tcreateEAttribute(processAreaEClass, PROCESS_AREA__SHORT_DESCRIPTION);\n\t\tcreateEAttribute(processAreaEClass, PROCESS_AREA__MAIN_DESCRIPTION);\n\t\tcreateEAttribute(processAreaEClass, PROCESS_AREA__ACRONYM);\n\t\tcreateEReference(processAreaEClass, PROCESS_AREA__DEFINES);\n\t\tcreateEReference(processAreaEClass, PROCESS_AREA__IMPLEMENTS);\n\n\t\tspecificPracticeEClass = createEClass(SPECIFIC_PRACTICE);\n\t\tcreateEAttribute(specificPracticeEClass, SPECIFIC_PRACTICE__NAME);\n\t\tcreateEAttribute(specificPracticeEClass, SPECIFIC_PRACTICE__DESCRIPTION);\n\t\tcreateEAttribute(specificPracticeEClass, SPECIFIC_PRACTICE__ACRONYM);\n\t\tcreateEAttribute(specificPracticeEClass, SPECIFIC_PRACTICE__COMPLEMENTARY_DESCRIPTION);\n\n\t\tmaturityLevelEClass = createEClass(MATURITY_LEVEL);\n\t\tcreateEAttribute(maturityLevelEClass, MATURITY_LEVEL__NAME);\n\t\tcreateEAttribute(maturityLevelEClass, MATURITY_LEVEL__DESCRIPTION);\n\t\tcreateEAttribute(maturityLevelEClass, MATURITY_LEVEL__ACRONYM);\n\t\tcreateEReference(maturityLevelEClass, MATURITY_LEVEL__EVOLVES_INTO);\n\n\t\tgenericPracticeEClass = createEClass(GENERIC_PRACTICE);\n\t\tcreateEAttribute(genericPracticeEClass, GENERIC_PRACTICE__NAME);\n\t\tcreateEAttribute(genericPracticeEClass, GENERIC_PRACTICE__DESCRIPTION);\n\t\tcreateEAttribute(genericPracticeEClass, GENERIC_PRACTICE__ACRONYM);\n\t\tcreateEAttribute(genericPracticeEClass, GENERIC_PRACTICE__COMPLEMENTARY_DESCRIPTION);\n\t\tcreateEReference(genericPracticeEClass, GENERIC_PRACTICE__DIVIDED);\n\n\t\tgpSubPracticeEClass = createEClass(GP_SUB_PRACTICE);\n\t\tcreateEAttribute(gpSubPracticeEClass, GP_SUB_PRACTICE__NAME);\n\t\tcreateEAttribute(gpSubPracticeEClass, GP_SUB_PRACTICE__DESCRIPTION);\n\t\tcreateEAttribute(gpSubPracticeEClass, GP_SUB_PRACTICE__ACRONYM);\n\t}", "protected abstract void generate();", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tqueryExpressionEClass = createEClass(QUERY_EXPRESSION);\n\n\t\tvalueExpressionEClass = createEClass(VALUE_EXPRESSION);\n\n\t\tsearchConditionEClass = createEClass(SEARCH_CONDITION);\n\n\t\tqueryExpressionDefaultEClass = createEClass(QUERY_EXPRESSION_DEFAULT);\n\t\tcreateEAttribute(queryExpressionDefaultEClass, QUERY_EXPRESSION_DEFAULT__SQL);\n\n\t\tsearchConditionDefaultEClass = createEClass(SEARCH_CONDITION_DEFAULT);\n\t\tcreateEAttribute(searchConditionDefaultEClass, SEARCH_CONDITION_DEFAULT__SQL);\n\n\t\tvalueExpressionDefaultEClass = createEClass(VALUE_EXPRESSION_DEFAULT);\n\t\tcreateEAttribute(valueExpressionDefaultEClass, VALUE_EXPRESSION_DEFAULT__SQL);\n\t}", "public void exec() {\n\n try {\n\n String webDotXMLPath = webAppPath + \"/WEB-INF/web.xml\";\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory\n .newInstance();\n\n DocumentBuilder builder = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = builder.parse(new File(webDotXMLPath));\n DocumentType docType = doc.getDoctype();\n if (docType != null) {\n doc.removeChild(docType);\n }\n Element webAppElement = (Element) doc.getFirstChild();\n webAppElement.setAttribute(\"version\", \"2.4\");\n webAppElement.setAttribute(\"xmlns\",\n \"http://java.sun.com/xml/ns/j2ee\");\n webAppElement.setAttribute(\"xmlns:xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\");\n webAppElement\n .setAttribute(\n \"xsi:schemaLocation\",\n \"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\");\n\n OutputFormat of = new OutputFormat();\n of.setIndenting(true);\n of.setIndent(4); // 2-space indention\n of.setLineWidth(16384);\n\n OutputStream outputStream = new FileOutputStream(webDotXMLPath);\n Writer writer = new OutputStreamWriter(outputStream, \"utf-8\");\n\n XMLSerializer serializer = new XMLSerializer(writer, of);\n serializer.serialize(doc);\n\n writer.close();\n\n } catch (Exception e) {\n throw new RuntimeException(\"Processing failed\", e);\n }\n\n }", "public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskModelEClass = createEClass(TASK_MODEL);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__ROOT);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__TASKS);\n\t\tcreateEAttribute(taskModelEClass, TASK_MODEL__NAME);\n\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__OPERATOR);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEReference(taskEClass, TASK__PARENT);\n\t\tcreateEAttribute(taskEClass, TASK__MIN);\n\t\tcreateEAttribute(taskEClass, TASK__MAX);\n\t\tcreateEAttribute(taskEClass, TASK__ITERATIVE);\n\n\t\tuserTaskEClass = createEClass(USER_TASK);\n\n\t\tapplicationTaskEClass = createEClass(APPLICATION_TASK);\n\n\t\tinteractionTaskEClass = createEClass(INTERACTION_TASK);\n\n\t\tabstractionTaskEClass = createEClass(ABSTRACTION_TASK);\n\n\t\tnullTaskEClass = createEClass(NULL_TASK);\n\n\t\ttemporalOperatorEClass = createEClass(TEMPORAL_OPERATOR);\n\n\t\tchoiceOperatorEClass = createEClass(CHOICE_OPERATOR);\n\n\t\torderIndependenceOperatorEClass = createEClass(ORDER_INDEPENDENCE_OPERATOR);\n\n\t\tinterleavingOperatorEClass = createEClass(INTERLEAVING_OPERATOR);\n\n\t\tsynchronizationOperatorEClass = createEClass(SYNCHRONIZATION_OPERATOR);\n\n\t\tparallelOperatorEClass = createEClass(PARALLEL_OPERATOR);\n\n\t\tdisablingOperatorEClass = createEClass(DISABLING_OPERATOR);\n\n\t\tsequentialEnablingInfoOperatorEClass = createEClass(SEQUENTIAL_ENABLING_INFO_OPERATOR);\n\n\t\tsequentialEnablingOperatorEClass = createEClass(SEQUENTIAL_ENABLING_OPERATOR);\n\n\t\tsuspendResumeOperatorEClass = createEClass(SUSPEND_RESUME_OPERATOR);\n\t}", "public void openXml() throws ParserConfigurationException, TransformerConfigurationException, SAXException {\n\n SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();\n transformer = saxTransformerFactory.newTransformerHandler();\n\n // pretty XML output\n Transformer serializer = transformer.getTransformer();\n serializer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n serializer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setResult(result);\n transformer.startDocument();\n transformer.startElement(null, null, \"inserts\", null);\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__SPEC);\n\n statementEClass = createEClass(STATEMENT);\n createEReference(statementEClass, STATEMENT__DEF);\n createEReference(statementEClass, STATEMENT__OUT);\n createEReference(statementEClass, STATEMENT__IN);\n createEAttribute(statementEClass, STATEMENT__COMMENT);\n\n definitionEClass = createEClass(DEFINITION);\n createEAttribute(definitionEClass, DEFINITION__NAME);\n createEReference(definitionEClass, DEFINITION__PARAM_LIST);\n createEAttribute(definitionEClass, DEFINITION__TYPE);\n createEReference(definitionEClass, DEFINITION__EXPRESSION);\n\n paramListEClass = createEClass(PARAM_LIST);\n createEAttribute(paramListEClass, PARAM_LIST__PARAMS);\n createEAttribute(paramListEClass, PARAM_LIST__TYPES);\n\n outEClass = createEClass(OUT);\n createEReference(outEClass, OUT__EXP);\n createEAttribute(outEClass, OUT__NAME);\n\n inEClass = createEClass(IN);\n createEAttribute(inEClass, IN__NAME);\n createEAttribute(inEClass, IN__TYPE);\n\n typedExpressionEClass = createEClass(TYPED_EXPRESSION);\n createEReference(typedExpressionEClass, TYPED_EXPRESSION__EXP);\n createEAttribute(typedExpressionEClass, TYPED_EXPRESSION__TYPE);\n\n expressionEClass = createEClass(EXPRESSION);\n\n valueEClass = createEClass(VALUE);\n createEAttribute(valueEClass, VALUE__OP);\n createEReference(valueEClass, VALUE__EXP);\n createEReference(valueEClass, VALUE__STATEMENTS);\n createEAttribute(valueEClass, VALUE__NAME);\n createEReference(valueEClass, VALUE__ARGS);\n\n argEClass = createEClass(ARG);\n createEAttribute(argEClass, ARG__ARG);\n createEReference(argEClass, ARG__EXP);\n\n ifStatementEClass = createEClass(IF_STATEMENT);\n createEReference(ifStatementEClass, IF_STATEMENT__IF);\n createEReference(ifStatementEClass, IF_STATEMENT__THEN);\n createEReference(ifStatementEClass, IF_STATEMENT__ELSE);\n\n operationEClass = createEClass(OPERATION);\n createEReference(operationEClass, OPERATION__LEFT);\n createEAttribute(operationEClass, OPERATION__OP);\n createEReference(operationEClass, OPERATION__RIGHT);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tpartyQualEClass = createEClass(PARTY_QUAL);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__PARTY);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__PARTY_QUAL_TYPE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__FROM_DATE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__QUALIFICATION_DESC);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__STATUS);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__THRU_DATE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__TITLE);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__VERIF_STATUS);\n\n\t\tpartyQualTypeEClass = createEClass(PARTY_QUAL_TYPE);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__PARTY_QUAL_TYPE_ID);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__HAS_TABLE);\n\t\tcreateEReference(partyQualTypeEClass, PARTY_QUAL_TYPE__PARENT_TYPE);\n\n\t\tpartyResumeEClass = createEClass(PARTY_RESUME);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_ID);\n\t\tcreateEReference(partyResumeEClass, PARTY_RESUME__CONTENT);\n\t\tcreateEReference(partyResumeEClass, PARTY_RESUME__PARTY);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_DATE);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_TEXT);\n\n\t\tpartySkillEClass = createEClass(PARTY_SKILL);\n\t\tcreateEReference(partySkillEClass, PARTY_SKILL__PARTY);\n\t\tcreateEReference(partySkillEClass, PARTY_SKILL__SKILL_TYPE);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__RATING);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__SKILL_LEVEL);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__STARTED_USING_DATE);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__YEARS_EXPERIENCE);\n\n\t\tperfRatingTypeEClass = createEClass(PERF_RATING_TYPE);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__PERF_RATING_TYPE_ID);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__HAS_TABLE);\n\t\tcreateEReference(perfRatingTypeEClass, PERF_RATING_TYPE__PARENT_TYPE);\n\n\t\tperfReviewEClass = createEClass(PERF_REVIEW);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__EMPLOYEE_PARTY);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__EMPLOYEE_ROLE_TYPE_ID);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__PERF_REVIEW_ID);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__COMMENTS);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__EMPL_POSITION);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__FROM_DATE);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__MANAGER_PARTY);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__MANAGER_ROLE_TYPE_ID);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__PAYMENT);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__THRU_DATE);\n\n\t\tperfReviewItemEClass = createEClass(PERF_REVIEW_ITEM);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__EMPLOYEE_PARTY);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__EMPLOYEE_ROLE_TYPE_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ITEM_SEQ_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__COMMENTS);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_RATING_TYPE);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ITEM_TYPE);\n\n\t\tperfReviewItemTypeEClass = createEClass(PERF_REVIEW_ITEM_TYPE);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__PERF_REVIEW_ITEM_TYPE_ID);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__PARENT_TYPE);\n\n\t\tperformanceNoteEClass = createEClass(PERFORMANCE_NOTE);\n\t\tcreateEReference(performanceNoteEClass, PERFORMANCE_NOTE__PARTY);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__FROM_DATE);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__ROLE_TYPE_ID);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__COMMENTS);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__COMMUNICATION_DATE);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__THRU_DATE);\n\n\t\tpersonTrainingEClass = createEClass(PERSON_TRAINING);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__PARTY);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__TRAINING_CLASS_TYPE);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__FROM_DATE);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__APPROVAL_STATUS);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__APPROVER);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__REASON);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__THRU_DATE);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__TRAINING_REQUEST);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__WORK_EFFORT);\n\n\t\tresponsibilityTypeEClass = createEClass(RESPONSIBILITY_TYPE);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__RESPONSIBILITY_TYPE_ID);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__HAS_TABLE);\n\t\tcreateEReference(responsibilityTypeEClass, RESPONSIBILITY_TYPE__PARENT_TYPE);\n\n\t\tskillTypeEClass = createEClass(SKILL_TYPE);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__SKILL_TYPE_ID);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__HAS_TABLE);\n\t\tcreateEReference(skillTypeEClass, SKILL_TYPE__PARENT_TYPE);\n\n\t\ttrainingClassTypeEClass = createEClass(TRAINING_CLASS_TYPE);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__TRAINING_CLASS_TYPE_ID);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__HAS_TABLE);\n\t\tcreateEReference(trainingClassTypeEClass, TRAINING_CLASS_TYPE__PARENT_TYPE);\n\t}", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "@SuppressWarnings({ \"resource\", \"unused\" })\n\tpublic static void main(String[] args) throws IOException, JDOMException, TransformerException {\n\n\t\tWorkbook wb = new XSSFWorkbook();\n\t\tCreationHelper ch = wb.getCreationHelper();\n\t\tSheet sh = wb.createSheet(\"MySheet\");\n\t\tCellStyle cs1 = wb.createCellStyle();\n\t\tCellStyle cs2 = wb.createCellStyle();\n\t\tDataFormat df = wb.createDataFormat();\n\t\tFont f1 = wb.createFont();\n\t\tFont f2 = wb.createFont();\n\n\t\tf1.setFontHeightInPoints((short) 12);\n\t\tf1.setColor(IndexedColors.RED.getIndex());\n\t\tf1.setBoldweight(Font.BOLDWEIGHT_BOLD);\n\n\t\tf2.setFontHeightInPoints((short) 10);\n\t\tf2.setColor(IndexedColors.BLUE.getIndex());\n\t\tf2.setItalic(true);\n\n\t\tcs1.setFont(f1);\n\t\tcs1.setDataFormat(df.getFormat(\"#,##0.0\"));\n\n\t\tcs2.setFont(f2);\n\t\tcs2.setBorderBottom(cs2.BORDER_THIN);\n\t\tcs2.setDataFormat(df.getFormat(\"text\"));\n\t\t\n\t\tFile myFile = new File(\"recipe.xml\");\n\t\t\ntry{\n\t\t\t\n\t\t\t\n\t\t\n//\t\t\tSystem.out.println(doc.getRootElement().getValue());\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t\t\n\t\t\n\t\n\t\t\nSAXBuilder sb = new SAXBuilder();\nDocument doc = sb.build(myFile);\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tRow r = sh.createRow(i);\n\t\t\tCell c2 = r.createCell(i);\n\t\t\tc2.setCellStyle(cs2);\n\t\t\t\n\t\t\tList<Element> children = doc.getRootElement().getChildren();\n\t\t\tSystem.out.println(children.size());\n\t\t\t\tc2.setCellValue(children.get(i).getChildText(\"Title\"));\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tFileOutputStream outf = new FileOutputStream(\"src/RecipesXSL.xlsx\");\n\t\twb.write(outf);\n\t\toutf.close();\n\t\tSystem.out.println(\"WbSaved\");\n\t}", "static void processFile(File xmlFile) {\n Document doc = null;\n try {\n doc = builder.parse(xmlFile);\n }\n catch (IOException e) {\n e.printStackTrace();\n System.exit(3);\n }\n catch (SAXException e) {\n System.out.println(\"Parsing error on file \" + xmlFile);\n System.out.println(\" (not supposed to happen with supplied XML files)\");\n e.printStackTrace();\n System.exit(3);\n }\n \n /* At this point 'doc' contains a DOM representation of an 'Items' XML\n * file. Use doc.getDocumentElement() to get the root Element. */\n System.out.println(\"Successfully parsed - \" + xmlFile);\n \n /* Fill in code here (you will probably need to write auxiliary\n methods). */\n \n Element[] elems = getElementsByTagNameNR(doc.getDocumentElement(), \"Item\");\n for(Element e : elems) {\n\n String itemId = e.getAttribute(\"ItemID\");\n String name = getElementTextByTagNameNR(e, \"Name\");\n String currently = strip(getElementTextByTagNameNR(e, \"Currently\"));\n String buy_price = strip(getElementTextByTagNameNR(e, \"Buy_Price\"));\n String first_bid = strip(getElementTextByTagNameNR(e, \"First_Bid\"));\n String number_of_bids = getElementTextByTagNameNR(e, \"Number_of_Bids\");\n String country = getElementTextByTagNameNR(e, \"Country\");\n String started = changeTime(getElementTextByTagNameNR(e, \"Started\"));\n String ends = changeTime(getElementTextByTagNameNR(e, \"Ends\"));\n Element seller = getElementByTagNameNR(e, \"Seller\");\n String sellerId = seller.getAttribute(\"UserID\");\n String sellerRatings = seller.getAttribute(\"Rating\");\n String location = getElementTextByTagNameNR(e, \"Location\");\n Element locate = getElementByTagNameNR(e, \"Location\");\n String latitude = locate.getAttribute(\"Latitude\");\n String longitude = locate.getAttribute(\"Longitude\");\n String description = getElementTextByTagNameNR(e, \"Description\");\n if(description.length() > 4000)\n description = description.substring(0, 4001);\n\n // add the record to the list\n items.add(itemRecord(itemId, name, currently, buy_price, first_bid, number_of_bids, country,\n started, ends, sellerId, location, latitude, longitude, description));\n\n // add the category infomation and belongsTo information\n Element[] cates = getElementsByTagNameNR(e, \"Category\");\n for(Element c : cates) {\n String cate = getElementText(c);\n if(category.containsKey(cate) == false) {\n int cnt = category.size();\n category.put(cate, cnt);\n }\n int index = category.get(cate);\n String caterecord = itemId + columnSeparator + index;\n belongsTo.add(caterecord);\n }\n\n // add the user information\n if(users.containsKey(sellerId)) {\n users.get(sellerId).sellRating = sellerRatings;\n }\n else {\n User u = new User(sellerId);\n u.sellRating = sellerRatings;\n users.put(sellerId, u);\n }\n\n // add the bid infromation and bider inforamtion\n Element[] ebids = getElementsByTagNameNR(getElementByTagNameNR(e, \"Bids\"), \"Bid\");\n for(Element b : ebids) {\n Element bidder = getElementByTagNameNR(b, \"Bidder\");\n String bidderId = bidder.getAttribute(\"UserID\");\n String bidderRating = bidder.getAttribute(\"Rating\");\n String bidderloc = getElementTextByTagNameNR(bidder, \"Location\");\n String biddercoun = getElementTextByTagNameNR(bidder, \"Country\");\n String amount = strip(getElementTextByTagNameNR(b, \"Amount\"));\n String time = changeTime(getElementTextByTagNameNR(b, \"Time\"));\n\n\n if(users.containsKey(bidderId) == false) {\n User u = new User(bidderId);\n users.put(bidderId, u);\n }\n users.get(bidderId).location = bidderloc;\n users.get(bidderId).country = biddercoun;\n users.get(bidderId).bidRating = bidderRating;\n bids.add(bidRecord(itemId, bidderId, time, amount));\n }\n\n }\n \n \n /**************************************************************/\n \n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\telementEClass = createEClass(ELEMENT);\n\t\tcreateEOperation(elementEClass, ELEMENT___GET_ONTOLOGY);\n\t\tcreateEOperation(elementEClass, ELEMENT___EXTRA_VALIDATE__DIAGNOSTICCHAIN_MAP);\n\n\t\tannotationEClass = createEClass(ANNOTATION);\n\t\tcreateEReference(annotationEClass, ANNOTATION__PROPERTY);\n\t\tcreateEReference(annotationEClass, ANNOTATION__LITERAL_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__REFERENCE_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__OWNING_ELEMENT);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_VALUE);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_ANNOTATED_ELEMENT);\n\n\t\tidentifiedElementEClass = createEClass(IDENTIFIED_ELEMENT);\n\t\tcreateEReference(identifiedElementEClass, IDENTIFIED_ELEMENT__OWNED_ANNOTATIONS);\n\t\tcreateEOperation(identifiedElementEClass, IDENTIFIED_ELEMENT___GET_IRI);\n\n\t\timportEClass = createEClass(IMPORT);\n\t\tcreateEAttribute(importEClass, IMPORT__KIND);\n\t\tcreateEAttribute(importEClass, IMPORT__NAMESPACE);\n\t\tcreateEAttribute(importEClass, IMPORT__PREFIX);\n\t\tcreateEReference(importEClass, IMPORT__OWNING_ONTOLOGY);\n\t\tcreateEOperation(importEClass, IMPORT___GET_IRI);\n\t\tcreateEOperation(importEClass, IMPORT___GET_SEPARATOR);\n\n\t\tinstanceEClass = createEClass(INSTANCE);\n\t\tcreateEReference(instanceEClass, INSTANCE__OWNED_PROPERTY_VALUES);\n\n\t\taxiomEClass = createEClass(AXIOM);\n\t\tcreateEOperation(axiomEClass, AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tassertionEClass = createEClass(ASSERTION);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_OBJECT);\n\n\t\tpredicateEClass = createEClass(PREDICATE);\n\t\tcreateEReference(predicateEClass, PREDICATE__ANTECEDENT_RULE);\n\t\tcreateEReference(predicateEClass, PREDICATE__CONSEQUENT_RULE);\n\n\t\targumentEClass = createEClass(ARGUMENT);\n\t\tcreateEAttribute(argumentEClass, ARGUMENT__VARIABLE);\n\t\tcreateEReference(argumentEClass, ARGUMENT__LITERAL);\n\t\tcreateEReference(argumentEClass, ARGUMENT__INSTANCE);\n\n\t\tliteralEClass = createEClass(LITERAL);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_STRING_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_TYPE_IRI);\n\n\t\tontologyEClass = createEClass(ONTOLOGY);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__NAMESPACE);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__PREFIX);\n\t\tcreateEReference(ontologyEClass, ONTOLOGY__OWNED_IMPORTS);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_IRI);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_SEPARATOR);\n\n\t\tmemberEClass = createEClass(MEMBER);\n\t\tcreateEAttribute(memberEClass, MEMBER__NAME);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___IS_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___RESOLVE);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_IRI);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_ABBREVIATED_IRI);\n\n\t\tvocabularyBoxEClass = createEClass(VOCABULARY_BOX);\n\n\t\tdescriptionBoxEClass = createEClass(DESCRIPTION_BOX);\n\n\t\tvocabularyEClass = createEClass(VOCABULARY);\n\t\tcreateEReference(vocabularyEClass, VOCABULARY__OWNED_STATEMENTS);\n\n\t\tvocabularyBundleEClass = createEClass(VOCABULARY_BUNDLE);\n\n\t\tdescriptionEClass = createEClass(DESCRIPTION);\n\t\tcreateEReference(descriptionEClass, DESCRIPTION__OWNED_STATEMENTS);\n\n\t\tdescriptionBundleEClass = createEClass(DESCRIPTION_BUNDLE);\n\n\t\tstatementEClass = createEClass(STATEMENT);\n\n\t\tvocabularyMemberEClass = createEClass(VOCABULARY_MEMBER);\n\n\t\tdescriptionMemberEClass = createEClass(DESCRIPTION_MEMBER);\n\n\t\tvocabularyStatementEClass = createEClass(VOCABULARY_STATEMENT);\n\t\tcreateEReference(vocabularyStatementEClass, VOCABULARY_STATEMENT__OWNING_VOCABULARY);\n\n\t\tdescriptionStatementEClass = createEClass(DESCRIPTION_STATEMENT);\n\t\tcreateEReference(descriptionStatementEClass, DESCRIPTION_STATEMENT__OWNING_DESCRIPTION);\n\n\t\ttermEClass = createEClass(TERM);\n\n\t\truleEClass = createEClass(RULE);\n\t\tcreateEReference(ruleEClass, RULE__REF);\n\t\tcreateEReference(ruleEClass, RULE__ANTECEDENT);\n\t\tcreateEReference(ruleEClass, RULE__CONSEQUENT);\n\n\t\tbuiltInEClass = createEClass(BUILT_IN);\n\t\tcreateEReference(builtInEClass, BUILT_IN__REF);\n\n\t\tspecializableTermEClass = createEClass(SPECIALIZABLE_TERM);\n\t\tcreateEReference(specializableTermEClass, SPECIALIZABLE_TERM__OWNED_SPECIALIZATIONS);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\n\t\ttypeEClass = createEClass(TYPE);\n\n\t\trelationBaseEClass = createEClass(RELATION_BASE);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__SOURCES);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__TARGETS);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__REVERSE_RELATION);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__INVERSE_FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__SYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__ASYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__REFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__IRREFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__TRANSITIVE);\n\n\t\tspecializablePropertyEClass = createEClass(SPECIALIZABLE_PROPERTY);\n\t\tcreateEReference(specializablePropertyEClass, SPECIALIZABLE_PROPERTY__OWNED_EQUIVALENCES);\n\n\t\tclassifierEClass = createEClass(CLASSIFIER);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_EQUIVALENCES);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_PROPERTY_RESTRICTIONS);\n\n\t\tscalarEClass = createEClass(SCALAR);\n\t\tcreateEReference(scalarEClass, SCALAR__REF);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_ENUMERATION);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_EQUIVALENCES);\n\n\t\tentityEClass = createEClass(ENTITY);\n\t\tcreateEReference(entityEClass, ENTITY__OWNED_KEYS);\n\n\t\tstructureEClass = createEClass(STRUCTURE);\n\t\tcreateEReference(structureEClass, STRUCTURE__REF);\n\n\t\taspectEClass = createEClass(ASPECT);\n\t\tcreateEReference(aspectEClass, ASPECT__REF);\n\n\t\tconceptEClass = createEClass(CONCEPT);\n\t\tcreateEReference(conceptEClass, CONCEPT__REF);\n\t\tcreateEReference(conceptEClass, CONCEPT__OWNED_ENUMERATION);\n\n\t\trelationEntityEClass = createEClass(RELATION_ENTITY);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__REF);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__FORWARD_RELATION);\n\n\t\tannotationPropertyEClass = createEClass(ANNOTATION_PROPERTY);\n\t\tcreateEReference(annotationPropertyEClass, ANNOTATION_PROPERTY__REF);\n\n\t\tsemanticPropertyEClass = createEClass(SEMANTIC_PROPERTY);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___IS_FUNCTIONAL);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_RANGE_LIST);\n\n\t\tscalarPropertyEClass = createEClass(SCALAR_PROPERTY);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__REF);\n\t\tcreateEAttribute(scalarPropertyEClass, SCALAR_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__DOMAINS);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__RANGES);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_RANGE_LIST);\n\n\t\tstructuredPropertyEClass = createEClass(STRUCTURED_PROPERTY);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__REF);\n\t\tcreateEAttribute(structuredPropertyEClass, STRUCTURED_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__DOMAINS);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__RANGES);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_RANGE_LIST);\n\n\t\trelationEClass = createEClass(RELATION);\n\t\tcreateEOperation(relationEClass, RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(relationEClass, RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAINS);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGES);\n\t\tcreateEOperation(relationEClass, RELATION___GET_INVERSE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAIN_LIST);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGE_LIST);\n\n\t\tforwardRelationEClass = createEClass(FORWARD_RELATION);\n\t\tcreateEReference(forwardRelationEClass, FORWARD_RELATION__RELATION_ENTITY);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_REF);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_RANGES);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_INVERSE);\n\n\t\treverseRelationEClass = createEClass(REVERSE_RELATION);\n\t\tcreateEReference(reverseRelationEClass, REVERSE_RELATION__RELATION_BASE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_REF);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_RANGES);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_INVERSE);\n\n\t\tunreifiedRelationEClass = createEClass(UNREIFIED_RELATION);\n\t\tcreateEReference(unreifiedRelationEClass, UNREIFIED_RELATION__REF);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_RANGES);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_INVERSE);\n\n\t\tnamedInstanceEClass = createEClass(NAMED_INSTANCE);\n\t\tcreateEReference(namedInstanceEClass, NAMED_INSTANCE__OWNED_TYPES);\n\n\t\tconceptInstanceEClass = createEClass(CONCEPT_INSTANCE);\n\t\tcreateEReference(conceptInstanceEClass, CONCEPT_INSTANCE__REF);\n\n\t\trelationInstanceEClass = createEClass(RELATION_INSTANCE);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__REF);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__SOURCES);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__TARGETS);\n\n\t\tstructureInstanceEClass = createEClass(STRUCTURE_INSTANCE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__TYPE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_AXIOM);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_ASSERTION);\n\n\t\tkeyAxiomEClass = createEClass(KEY_AXIOM);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__PROPERTIES);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__OWNING_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_KEYED_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tspecializationAxiomEClass = createEClass(SPECIALIZATION_AXIOM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__SUPER_TERM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__OWNING_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_SUB_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tinstanceEnumerationAxiomEClass = createEClass(INSTANCE_ENUMERATION_AXIOM);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__INSTANCES);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__OWNING_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_ENUMERATED_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRestrictionAxiomEClass = createEClass(PROPERTY_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__PROPERTY);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_AXIOM);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_RESTRICTING_DOMAIN);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tliteralEnumerationAxiomEClass = createEClass(LITERAL_ENUMERATION_AXIOM);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__LITERALS);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__OWNING_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_ENUMERATED_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tclassifierEquivalenceAxiomEClass = createEClass(CLASSIFIER_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__SUPER_CLASSIFIERS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNED_PROPERTY_RESTRICTIONS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_SUB_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tscalarEquivalenceAxiomEClass = createEClass(SCALAR_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__SUPER_SCALAR);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__OWNING_SCALAR);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__PATTERN);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LANGUAGE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_EXCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_EXCLUSIVE);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_SUB_SCALAR);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyEquivalenceAxiomEClass = createEClass(PROPERTY_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__SUPER_PROPERTY);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__OWNING_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_SUB_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRangeRestrictionAxiomEClass = createEClass(PROPERTY_RANGE_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__KIND);\n\t\tcreateEReference(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyCardinalityRestrictionAxiomEClass = createEClass(PROPERTY_CARDINALITY_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__KIND);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__CARDINALITY);\n\t\tcreateEReference(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyValueRestrictionAxiomEClass = createEClass(PROPERTY_VALUE_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__NAMED_INSTANCE_VALUE);\n\t\tcreateEOperation(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM___GET_VALUE);\n\n\t\tpropertySelfRestrictionAxiomEClass = createEClass(PROPERTY_SELF_RESTRICTION_AXIOM);\n\n\t\ttypeAssertionEClass = createEClass(TYPE_ASSERTION);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__TYPE);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_OBJECT);\n\n\t\tpropertyValueAssertionEClass = createEClass(PROPERTY_VALUE_ASSERTION);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__PROPERTY);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__NAMED_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_VALUE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_OBJECT);\n\n\t\tunaryPredicateEClass = createEClass(UNARY_PREDICATE);\n\t\tcreateEReference(unaryPredicateEClass, UNARY_PREDICATE__ARGUMENT);\n\n\t\tbinaryPredicateEClass = createEClass(BINARY_PREDICATE);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT1);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT2);\n\n\t\tbuiltInPredicateEClass = createEClass(BUILT_IN_PREDICATE);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__BUILT_IN);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__ARGUMENTS);\n\n\t\ttypePredicateEClass = createEClass(TYPE_PREDICATE);\n\t\tcreateEReference(typePredicateEClass, TYPE_PREDICATE__TYPE);\n\n\t\trelationEntityPredicateEClass = createEClass(RELATION_ENTITY_PREDICATE);\n\t\tcreateEReference(relationEntityPredicateEClass, RELATION_ENTITY_PREDICATE__TYPE);\n\n\t\tpropertyPredicateEClass = createEClass(PROPERTY_PREDICATE);\n\t\tcreateEReference(propertyPredicateEClass, PROPERTY_PREDICATE__PROPERTY);\n\n\t\tsameAsPredicateEClass = createEClass(SAME_AS_PREDICATE);\n\n\t\tdifferentFromPredicateEClass = createEClass(DIFFERENT_FROM_PREDICATE);\n\n\t\tquotedLiteralEClass = createEClass(QUOTED_LITERAL);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__VALUE);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__LANG_TAG);\n\t\tcreateEReference(quotedLiteralEClass, QUOTED_LITERAL__TYPE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_TYPE_IRI);\n\n\t\tintegerLiteralEClass = createEClass(INTEGER_LITERAL);\n\t\tcreateEAttribute(integerLiteralEClass, INTEGER_LITERAL__VALUE);\n\t\tcreateEOperation(integerLiteralEClass, INTEGER_LITERAL___GET_TYPE_IRI);\n\n\t\tdecimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n\t\tcreateEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__VALUE);\n\t\tcreateEOperation(decimalLiteralEClass, DECIMAL_LITERAL___GET_TYPE_IRI);\n\n\t\tdoubleLiteralEClass = createEClass(DOUBLE_LITERAL);\n\t\tcreateEAttribute(doubleLiteralEClass, DOUBLE_LITERAL__VALUE);\n\t\tcreateEOperation(doubleLiteralEClass, DOUBLE_LITERAL___GET_TYPE_IRI);\n\n\t\tbooleanLiteralEClass = createEClass(BOOLEAN_LITERAL);\n\t\tcreateEAttribute(booleanLiteralEClass, BOOLEAN_LITERAL__VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___IS_VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___GET_TYPE_IRI);\n\n\t\t// Create enums\n\t\tseparatorKindEEnum = createEEnum(SEPARATOR_KIND);\n\t\trangeRestrictionKindEEnum = createEEnum(RANGE_RESTRICTION_KIND);\n\t\tcardinalityRestrictionKindEEnum = createEEnum(CARDINALITY_RESTRICTION_KIND);\n\t\timportKindEEnum = createEEnum(IMPORT_KIND);\n\n\t\t// Create data types\n\t\tunsignedIntEDataType = createEDataType(UNSIGNED_INT);\n\t\tunsignedIntegerEDataType = createEDataType(UNSIGNED_INTEGER);\n\t\tdecimalEDataType = createEDataType(DECIMAL);\n\t\tidEDataType = createEDataType(ID);\n\t\tnamespaceEDataType = createEDataType(NAMESPACE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tontologicalStructureEClass = createEClass(ONTOLOGICAL_STRUCTURE);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__ONTOLOGICAL_CONCEPTS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__CONDITIONS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__PROPERTIES);\n\n\t\tontologicalConceptEClass = createEClass(ONTOLOGICAL_CONCEPT);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__LABEL);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__URI);\n\n\t\tconditionEClass = createEClass(CONDITION);\n\t\tcreateEAttribute(conditionEClass, CONDITION__LABEL);\n\n\t\tlogicalConditionEClass = createEClass(LOGICAL_CONDITION);\n\n\t\tnaturalLangConditionEClass = createEClass(NATURAL_LANG_CONDITION);\n\t\tcreateEAttribute(naturalLangConditionEClass, NATURAL_LANG_CONDITION__STATEMENT);\n\n\t\tmathConditionEClass = createEClass(MATH_CONDITION);\n\n\t\tnegformulaEClass = createEClass(NEGFORMULA);\n\t\tcreateEReference(negformulaEClass, NEGFORMULA__CONDITION_STATEMENT);\n\n\t\toRformulaEClass = createEClass(ORFORMULA);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tanDformulaEClass = createEClass(AN_DFORMULA);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tequalFormulaEClass = createEClass(EQUAL_FORMULA);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tmoreEqformulaEClass = createEClass(MORE_EQFORMULA);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tlessformulaEClass = createEClass(LESSFORMULA);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__LABEL);\n\n\t\tnumberPropertyEClass = createEClass(NUMBER_PROPERTY);\n\t\tcreateEAttribute(numberPropertyEClass, NUMBER_PROPERTY__VALUE);\n\n\t\tbooleanPropertyEClass = createEClass(BOOLEAN_PROPERTY);\n\t\tcreateEAttribute(booleanPropertyEClass, BOOLEAN_PROPERTY__VALUE);\n\n\t\tstringPropertyEClass = createEClass(STRING_PROPERTY);\n\t\tcreateEAttribute(stringPropertyEClass, STRING_PROPERTY__VALUE);\n\t}", "@SuppressWarnings(\"PMD.AvoidDuplicateLiterals\")\n public XML getFixedResult() {\n final List<String> packages = this.skeleton.xpath(\"//package/@id\");\n String finalres = \"\";\n if (this.tempres.toString().indexOf(\"<package\") > 6) {\n finalres = this.tempres.toString().substring(\n 0,\n this.tempres.toString().indexOf(\"<package\") - 6\n );\n }\n for (final String apackage : packages) {\n finalres = finalres.concat(\n String.format(\n \" <package id=\\\"%s\\\">\\n\",\n apackage\n )\n );\n final List<String> classes = this.skeleton.xpath(\n String.format(\n \"//package[@id ='%s']/class/@id\",\n apackage\n )\n );\n for (final String aclass : classes) {\n finalres = this.calc(aclass, finalres);\n }\n finalres = finalres.concat(\" </package>\\n\");\n }\n if (this.tempres.toString().indexOf(\"</app\") > 1) {\n finalres = finalres.concat(\n this.tempres.toString().substring(\n this.tempres.toString().indexOf(\"</app\")\n )\n );\n }\n return new XMLDocument(finalres);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__TASK_ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEAttribute(taskEClass, TASK__DEADLINE);\n\n\t\tperiodicTaskEClass = createEClass(PERIODIC_TASK);\n\t\tcreateEAttribute(periodicTaskEClass, PERIODIC_TASK__PERIOD);\n\t\tcreateEAttribute(periodicTaskEClass, PERIODIC_TASK__OFFSET);\n\n\t\taperiodicTaskEClass = createEClass(APERIODIC_TASK);\n\t\tcreateEReference(aperiodicTaskEClass, APERIODIC_TASK__INTERARRIVAL_DISTRIBUTION);\n\n\t\tsubtaskEClass = createEClass(SUBTASK);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__NAME);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__PRIORITY);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__RET_ANCHOR_USED);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__ACTIVATION_SYNCHRONOUS);\n\t\tcreateEReference(subtaskEClass, SUBTASK__EXEC_TIME_DISTRIBUTION);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__BYPASS);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__DOWNSAMPLING_FACTOR);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__CALLING_THREAD_PRIORITY);\n\t\tcreateEReference(subtaskEClass, SUBTASK__MUTEXES);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__PIN_ID);\n\n\t\tdistributionEClass = createEClass(DISTRIBUTION);\n\n\t\tconstantEClass = createEClass(CONSTANT);\n\t\tcreateEAttribute(constantEClass, CONSTANT__VALUE);\n\n\t\texponentialEClass = createEClass(EXPONENTIAL);\n\t\tcreateEAttribute(exponentialEClass, EXPONENTIAL__MEAN);\n\n\t\tuniformEClass = createEClass(UNIFORM);\n\t\tcreateEAttribute(uniformEClass, UNIFORM__MAX);\n\t\tcreateEAttribute(uniformEClass, UNIFORM__MIN);\n\n\t\tunknownEClass = createEClass(UNKNOWN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MEAN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MIN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MAX);\n\n\t\tnormalEClass = createEClass(NORMAL);\n\t\tcreateEAttribute(normalEClass, NORMAL__MEAN);\n\t\tcreateEAttribute(normalEClass, NORMAL__STD_DEV);\n\n\t\tperformanceModelEClass = createEClass(PERFORMANCE_MODEL);\n\t\tcreateEReference(performanceModelEClass, PERFORMANCE_MODEL__TASKS);\n\t\tcreateEAttribute(performanceModelEClass, PERFORMANCE_MODEL__NAME);\n\t\tcreateEReference(performanceModelEClass, PERFORMANCE_MODEL__MUTEXES);\n\t\tcreateEAttribute(performanceModelEClass, PERFORMANCE_MODEL__SOURCE_FILE);\n\n\t\tssTaskEClass = createEClass(SS_TASK);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__BUDGET);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__REPLENISHMENT_PERIOD);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__BACKGROUND_PRIORITY);\n\n\t\tmutexEClass = createEClass(MUTEX);\n\t\tcreateEAttribute(mutexEClass, MUTEX__NAME);\n\t}", "@SuppressWarnings(\"null\")\n\tpublic static String[] xmlcreator(int ok) {\n \tString[] SystemData = null;\n \tif (ok ==1) {\n try {\n \tOperatingSystemMXBean operatingSystemBean = ManagementFactory.getOperatingSystemMXBean();\n\n \tRuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();\n\n \tMemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();\n\n \tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"traccar\");\n document.appendChild(root);\n\n // info element\n Element info = document.createElement(\"info\");\n\n root.appendChild(info);\n\n\n // Operating system's name element\n Element Name = document.createElement(\"Operating_system_s_name\");\n Name.appendChild(document.createTextNode(operatingSystemBean.getName()));\n info.appendChild(Name);\n SystemData[0] = operatingSystemBean.getName();\n\n // Operating system's version element\n Element version = document.createElement(\"Operating_system_s_version\");\n version.appendChild(document.createTextNode(operatingSystemBean.getVersion()));\n info.appendChild(version);\n SystemData[1] = operatingSystemBean.getVersion();\n\n // Operating system's architecture element\n Element arhit = document.createElement(\"Operating_systems_architecture\");\n arhit.appendChild(document.createTextNode(operatingSystemBean.getArch()));\n info.appendChild(arhit);\n SystemData[2] = operatingSystemBean.getArch();\n\n // Java runtime's name elements\n Element name2 = document.createElement(\"Java_runtimes_name\");\n name2.appendChild(document.createTextNode(runtimeBean.getVmName()));\n info.appendChild(name2);\n SystemData [3] = runtimeBean.getVmName();\n\n // Java runtime's vendor elements\n Element vendor = document.createElement(\"Java_runtimes_vendor\");\n vendor.appendChild(document.createTextNode(runtimeBean.getVmVendor()));\n info.appendChild(vendor);\n SystemData [4] = runtimeBean.getVmVendor();\n\n // Java runtime's version elements\n Element version2 = document.createElement(\"Java_runtimes_version\");\n version2.appendChild(document.createTextNode(runtimeBean.getVmVersion()));\n info.appendChild(version2);\n SystemData[5] = runtimeBean.getVmVersion();\n\n // Memory limit's heap elements\n Element heap = document.createElement(\"Memory_limits_non_heap\");\n heap.appendChild(document.createTextNode(memoryBean.getHeapMemoryUsage().getMax() / (1024 * 1024) + \"mb\"));\n info.appendChild(heap);\n SystemData[6] = (memoryBean.getHeapMemoryUsage().getMax() / (1024 * 1024) + \"mb\");\n\n // Memory limit's heap elements\n Element non_heap = document.createElement(\"Memory_limits_non_heap\");\n non_heap.appendChild(document.createTextNode(memoryBean.getNonHeapMemoryUsage().getMax() / (1024 * 1024) + \"mb\"));\n info.appendChild(non_heap);\n SystemData[7] = (memoryBean.getNonHeapMemoryUsage().getMax() / (1024 * 1024) + \"mb\");\n\n // Character encoding elements\n Element Character_encoding = document.createElement(\"Character_encoding\");\n Character_encoding.appendChild(document.createTextNode(System.getProperty(\"file.encoding\") + \" charset: \" + Charset.defaultCharset()));\n info.appendChild(Character_encoding);\n SystemData[8] = (System.getProperty(\"file.encoding\") + \" charset: \" + Charset.defaultCharset());\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(xmlFilePath));\n\n // If you use\n // StreamResult result = new StreamResult(System.out);\n // the output will be pushed to the standard output ...\n // You can use that for debugging\n\n transformer.transform(domSource, streamResult);\n\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n }\n if (ok==0) {\n \ttry {\n\n \tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"traccar\");\n document.appendChild(root);\n\n // employee element\n Element info = document.createElement(\"info\");\n\n root.appendChild(info);\n\n\n // Operating system's name element\n Element warn = document.createElement(\"warn\");\n warn.appendChild(document.createTextNode(\"Failed to get system info\"));\n info.appendChild(warn);\n\n SystemData[0] = (\"Failed to get system info\");\n SystemData[1] = (\"Failed to get system info\");\n SystemData[2] = (\"Failed to get system info\");\n SystemData[3] = (\"Failed to get system info\");\n SystemData[4] = (\"Failed to get system info\");\n SystemData[5] = (\"Failed to get system info\");\n SystemData[6] = (\"Failed to get system info\");\n SystemData[7] = (\"Failed to get system info\");\n SystemData[8] = (\"Failed to get system info\");\n\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(xmlFilePath));\n\n // If you use\n // StreamResult result = new StreamResult(System.out);\n // the output will be pushed to the standard output ...\n // You can use that for debugging\n\n transformer.transform(domSource, streamResult);\n\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n }else {\n \tthrow new IllegalArgumentException(\"Number had no sign\");\n }\n\treturn SystemData;\n}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n programmeEClass = createEClass(PROGRAMME);\n createEReference(programmeEClass, PROGRAMME__PROCEDURES);\n\n procedureEClass = createEClass(PROCEDURE);\n createEAttribute(procedureEClass, PROCEDURE__NAME);\n createEAttribute(procedureEClass, PROCEDURE__PARAM);\n createEAttribute(procedureEClass, PROCEDURE__PARAMS);\n createEReference(procedureEClass, PROCEDURE__INST);\n\n instructionEClass = createEClass(INSTRUCTION);\n\n openEClass = createEClass(OPEN);\n createEAttribute(openEClass, OPEN__NAME);\n createEAttribute(openEClass, OPEN__VALUE);\n\n gotoEClass = createEClass(GOTO);\n createEAttribute(gotoEClass, GOTO__NAME);\n createEAttribute(gotoEClass, GOTO__VALUE);\n\n clickEClass = createEClass(CLICK);\n createEAttribute(clickEClass, CLICK__NAME);\n createEAttribute(clickEClass, CLICK__TYPE);\n createEReference(clickEClass, CLICK__IDENTIFIER);\n\n fillEClass = createEClass(FILL);\n createEAttribute(fillEClass, FILL__NAME);\n createEAttribute(fillEClass, FILL__FIELD_TYPE);\n createEReference(fillEClass, FILL__IDENTIFIER);\n createEAttribute(fillEClass, FILL__VAR);\n createEAttribute(fillEClass, FILL__VALUE);\n\n checkEClass = createEClass(CHECK);\n createEAttribute(checkEClass, CHECK__NAME);\n createEAttribute(checkEClass, CHECK__ALL);\n createEReference(checkEClass, CHECK__IDENTIFIER);\n\n uncheckEClass = createEClass(UNCHECK);\n createEAttribute(uncheckEClass, UNCHECK__NAME);\n createEAttribute(uncheckEClass, UNCHECK__ALL);\n createEReference(uncheckEClass, UNCHECK__IDENTIFIER);\n\n selectEClass = createEClass(SELECT);\n createEAttribute(selectEClass, SELECT__NAME);\n createEAttribute(selectEClass, SELECT__ELEM);\n createEReference(selectEClass, SELECT__IDENTIFIER);\n\n readEClass = createEClass(READ);\n createEAttribute(readEClass, READ__NAME);\n createEReference(readEClass, READ__IDENTIFIER);\n createEReference(readEClass, READ__SAVE_PATH);\n\n elementidentifierEClass = createEClass(ELEMENTIDENTIFIER);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__NAME);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__TYPE);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__VALUE);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__INFO);\n createEAttribute(elementidentifierEClass, ELEMENTIDENTIFIER__VAR);\n\n verifyEClass = createEClass(VERIFY);\n createEAttribute(verifyEClass, VERIFY__VALUE);\n\n verifY_CONTAINSEClass = createEClass(VERIFY_CONTAINS);\n createEAttribute(verifY_CONTAINSEClass, VERIFY_CONTAINS__TYPE);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__IDENTIFIER);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__CONTAINED_IDENTIFIER);\n createEReference(verifY_CONTAINSEClass, VERIFY_CONTAINS__VARIABLE);\n\n verifY_EQUALSEClass = createEClass(VERIFY_EQUALS);\n createEReference(verifY_EQUALSEClass, VERIFY_EQUALS__OPERATION);\n createEReference(verifY_EQUALSEClass, VERIFY_EQUALS__REGISTERED_VALUE);\n\n registereD_VALUEEClass = createEClass(REGISTERED_VALUE);\n createEAttribute(registereD_VALUEEClass, REGISTERED_VALUE__VAR);\n\n countEClass = createEClass(COUNT);\n createEAttribute(countEClass, COUNT__NAME);\n createEReference(countEClass, COUNT__IDENTIFIER);\n createEReference(countEClass, COUNT__SAVE_VARIABLE);\n\n savevarEClass = createEClass(SAVEVAR);\n createEAttribute(savevarEClass, SAVEVAR__VAR);\n\n playEClass = createEClass(PLAY);\n createEAttribute(playEClass, PLAY__NAME);\n createEAttribute(playEClass, PLAY__PREOCEDURE);\n createEAttribute(playEClass, PLAY__PARAMS);\n }", "@Override\n\tprotected String getJRXML() throws Exception {\n\t\treturn \"CaseFile.jrxml\";\n\t}" ]
[ "0.6722369", "0.627485", "0.6251452", "0.61840737", "0.6183589", "0.6143427", "0.61259294", "0.61203384", "0.6034102", "0.59924895", "0.59716123", "0.5960237", "0.5931278", "0.5928725", "0.5921135", "0.58759075", "0.5860452", "0.5850786", "0.5798288", "0.575634", "0.57527375", "0.57511437", "0.57479054", "0.57319844", "0.5718253", "0.57178134", "0.57055086", "0.5690326", "0.567867", "0.56465375", "0.56326234", "0.5629651", "0.5626593", "0.5615", "0.56128204", "0.55749786", "0.55393815", "0.553026", "0.55215067", "0.5498678", "0.5498678", "0.5498678", "0.5468833", "0.5459518", "0.545392", "0.5435574", "0.5433469", "0.5430138", "0.54301226", "0.54282475", "0.54250157", "0.54245734", "0.5424308", "0.5423742", "0.5423019", "0.54101545", "0.5405181", "0.54027396", "0.5401222", "0.5398728", "0.5390004", "0.53893554", "0.5380332", "0.5375783", "0.5369284", "0.536348", "0.53446865", "0.5340412", "0.53381383", "0.53295726", "0.53196347", "0.5305121", "0.5293929", "0.5290387", "0.5289746", "0.5288428", "0.5287411", "0.5283427", "0.52800035", "0.5278112", "0.527808", "0.5271928", "0.5265559", "0.526186", "0.5261522", "0.52601975", "0.52568126", "0.5255869", "0.5250809", "0.52456987", "0.5237277", "0.5237204", "0.52340674", "0.52328324", "0.52323484", "0.5229261", "0.52285564", "0.52269906", "0.52155757", "0.5215372" ]
0.5643501
30
Method used to generate the contents of the xml file using the calculated data with duration type specific
private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType) throws ParserConfigurationException { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Date date = new Date(); long time = date.getTime(); Timestamp ts = new Timestamp(time); //Nodo Radice export_results Element export_results = doc.createElement("export_results"); export_results.setAttribute("date", ""+ts); doc.appendChild(export_results); //Figlo del nodo radice export_results Element graph = doc.createElement("graph"); graph.setAttribute("name", graphName); export_results.appendChild(graph); //Popolo iterando sulla mappa i nodi interni del TAG graph for(String mapKey : inputData.keySet()) { //System.out.println("Key: " + mapKey + " - - Value: " + inputData.get(mapKey)); Element singleElementInGraph = doc.createElement(elementInGraph); singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey))); if(inputDurationType.equals("CHORD") || inputDurationType.equals("REST") || inputDurationType.equals("BOTH")) { singleElementInGraph.setAttribute("den", mapKey); singleElementInGraph.setAttribute("num", "1"); } graph.appendChild(singleElementInGraph); } return doc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File makeXML(String key, int layerID, String value1, String time1, int totalCopies1, int copyNum1, boolean timerType1, String userId, String time, Certificate cert) {\n\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n Element key1 = document.createElement(\"Search_Result_for\" + key);\n document.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element layerid = document.createElement(\"layerid\");\n\n key1.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(layerID));\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value1));\n layerid.appendChild(Value);\n\n Element timer = document.createElement(\"timer\");\n timer.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(timer);\n\n Element totcopies = document.createElement(\"totcopies\");\n totcopies.appendChild(document.createTextNode(String.valueOf(totalCopies1)));\n layerid.appendChild(totcopies);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum1)));\n layerid.appendChild(copynum);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType1)));\n layerid.appendChild(timertype);\n\n Element userid = document.createElement(\"userid\");\n userid.appendChild(document.createTextNode(userId));\n layerid.appendChild(userid);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(time2);\n\n /*Element cert1 = document.createElement(\"cert\");\n cert1.appendChild(document.createTextNode(String.valueOf(cert)));\n layerid.appendChild((Node) cert);*/\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(layerID + \"_Search Result for \" + key + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n System.out.println(\"Done creating XML File\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(layerID + \"_Search Result for \" + key + \".xml\");\n return file;\n }", "public String durationToXML(Duration duration){\r\n String output;\r\n long day;\r\n long hr;\r\n long min;\r\n day = duration.toDays();\r\n hr = duration.minusDays(day).toHours();\r\n min = duration.minusDays(day).minusHours(hr).toMinutes();\r\n output = \"<duration>\"+\"<day>\" + day +\"</day>\" +\"<hr>\" + hr +\"</hr>\" +\"<mn>\" + min +\"</mn>\" +\"</duration>\";\r\n return output;\r\n }", "public void createXMLFileForExamResultNew(Report reportData) {\n\t\ttry{\n\t\t\tFile outDir = new File(reportData.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tfor(Student student : reportData.getStudentList()){\n\t\t\t\tString final_weitage=null;\n\t\t\t\tint total_weitage = 0;\t\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((reportData.getSchoolDetails().getSchoolDetailsName() != null ? reportData.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (reportData.getAcademicYear().getAcademicYearName()!= null ? reportData.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement report = doc.createElement(\"report\");\n\t\t\t\treport.appendChild(doc.createTextNode(\"MARKS STATEMENT\"));\n\t\t\t\tstudentList.appendChild(report);\n\t\t\t\n\t\t\t\tElement termdate = doc.createElement(\"termdate\");\n\t\t\t\ttermdate.appendChild(doc.createTextNode((reportData.getSchoolDetails().getExamName()!=null?reportData.getSchoolDetails().getExamName():\"--------\")));\n\t\t\t\tstudentList.appendChild(termdate);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t\tElement bloodgroup = doc.createElement(\"bloodgroup\");\n\t\t\t\tbloodgroup.appendChild(doc.createTextNode((student.getBloodGroup()!=null?student.getBloodGroup():\"NA\")));\n\t\t\t\tstudentList.appendChild(bloodgroup);\n\t\t\t\t\n\t\t\t\tif(student.getResource()!=null){\n\t\t\t\t\tElement fathername = doc.createElement(\"fathername\");\n\t\t\t\t\tfathername.appendChild(doc.createTextNode((student.getResource().getFatherFirstName()!=null?student.getResource().getFatherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(fathername);\n\t\t\t\t\t\n\t\t\t\t\tElement mothername = doc.createElement(\"mothername\");\n\t\t\t\t\tmothername.appendChild(doc.createTextNode((student.getResource().getMotherFirstName()!=null?student.getResource().getMotherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(mothername);\n\t\t\t\t\t\n\t\t\t\t\tElement dob = doc.createElement(\"dob\");\n\t\t\t\t\tdob.appendChild(doc.createTextNode((student.getResource().getDateOfBirth()!=null?student.getResource().getDateOfBirth():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(dob);\n\t\t\t\t\t}\n\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\tif(examObj.getExamName().equalsIgnoreCase(\"PerioDic Test\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"PTexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Note Book\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"NBexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Sub Enrichment\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"SEexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Half Yearly Exam\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"HYexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\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}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t String subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\t\tString subjectTotalChar = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"grade\");\n\t\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*for(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\"); //For Term 2\n\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*String subjectTotalCharecter = \"\";\n\t\t\t\t\t\t\t\tElement totalTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\ttotalTerm2.appendChild(doc.createTextNode((subjectTotalCharecter!=null?subjectTotalCharecter:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(totalTerm2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\tgradeTerm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeTerm2);*/\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term2\")){\n\t\t\t\t\tSystem.out.println(\"within term2\");\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(Subject subjectObj : studentResult.getSubjectList()){\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\tfor(Exam examObj:subjectObj.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalString!=null?subjectTotalString:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t System.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT1\") || reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT2\") ||reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT3\")){\n\t\t\t\tDouble allTotal = 0.00 ;\n\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\n\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement maxmarks = doc.createElement(\"maxmarks\");\n\t\t\t\t\t\tmaxmarks.appendChild(doc.createTextNode((examObj.getExamName()!=null?examObj.getExamName():\"\")));\n\t\t\t\t\t\tsubject.appendChild(maxmarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\") || examObj.getGrade().equalsIgnoreCase(\"NA\")){\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0.0;\n\t\t\t\t\t\t\t\tallTotal = allTotal + 0.0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\tallTotal = allTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\n\t\t\t\t\t/*Element total = doc.createElement(\"total\");\n\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectString!=null?subjectString:\"\")));\n\t\t\t\t\tsubject.appendChild(total);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString allTotalString = String.format( \"%.2f\", allTotal ) ;\n\t\t\t\t\n\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\ttotal.appendChild(doc.createTextNode((allTotalString!=null?allTotalString:\"\")));\n\t\t\t\tstudentList.appendChild(total);\n\t\t\t}\n\t\t\t\t\t\tif(student.getCoScholasticResultList()!=null && student.getCoScholasticResultList().size()!=0){\n\t\t//\t\t\t\t\tSystem.out.println(\"##....... \"+student.getCoScholasticResultList().size());\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Element coscholasticmarks = doc.createElement(\"coscholasticmarks\");\n\t\t\t\t\t\t\t\t\t//studentList.appendChild(coscholasticmarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"physicalEducation\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticphysicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm2.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"discipline\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticdisciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"healtheducation\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*\tElement coscholastichealtheducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm2.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm2);*/\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"workeducation\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\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/*Element coscholasticworkeducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm2.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\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}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\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}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(reportData.getXmlFilePath()+reportData.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.error(e);\n\t\t\t}\n\t\t}", "org.apache.xmlbeans.XmlString xgetDuration();", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "private void createTotalTime(BufferedWriter writer) throws IOException {\r\n\t\tMap<String, String> dataMap = data.getTotalTime();\r\n\t\tString parent = \"<div style='width: 260px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 281px;'>\";\r\n\t\tString subChild = \"<label style='position: absolute;margin-top: 5px;'>\";\r\n\t\tString totalTimeLabel = \"<span style='font-weight: bold;color: #000000;padding-left: 8px;font-family: Roboto, sans-serif;'>Total Time</span></label>\";\r\n\t\tString subChild1 = \"<label style='margin-top: 57px;position: absolute;'>\";\r\n\t\tString totatlTime = \"<span style='font-weight: bold;color: #000000;padding-left: 8px;font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ dataMap.get(\"total-time\") + \"</span></label></div>\";\r\n\t\twriter.write(parent + subChild + totalTimeLabel + subChild1\r\n\t\t\t\t+ totatlTime);\r\n\r\n\t\tString startTimePanel = \"<div style='width: 260px;background-color: #00E676;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 554px;'>\";\r\n\t\tString labelTime = \"<label style='position: absolute;margin-left: 8px;'>\";\r\n\t\tString startTimeLabel = \"<span style='font-weight: bold;color: gray;padding-top: 3px;font-family: Roboto, sans-serif;'>Start Time</span></label>\";\r\n\t\tString timeContainer = \"<label style='position: absolute;margin-top: 58px;padding-left: 118px;font-weight: bold;color: white;'><span style='font-family: Roboto, sans-serif;font-size:smaller'>\";\r\n\t\tString startTime = dataMap.get(\"start-time\") + \"</span></label></div>\";\r\n\t\twriter.write(startTimePanel + labelTime + startTimeLabel\r\n\t\t\t\t+ timeContainer + startTime);\r\n\r\n\t\tString endTimePanel = \"<div style='width: 260px;background-color: #F44336;box-shadow: 1px 1px 1px #888888;height: 85px;position: absolute;top: 67px;left: 828px;'>\";\r\n\t\tString endlabelTime = \"<label style='position: absolute;margin-left: 8px;'>\";\r\n\t\tString endTimeLabel = \"<span style='font-weight: bold;color: gray;padding-top: 3px;font-family: Roboto, sans-serif;'>End Time</span></label>\";\r\n\t\tString endTimeContainer = \"<label style='position: absolute;margin-top: 58px;padding-left: 118px; font-weight: bold;color: white;'><span style='font-family: Roboto, sans-serif;font-size:smaller'>\";\r\n\t\tString endTime = dataMap.get(\"end-time\") + \"</span></label></div>\";\r\n\t\twriter.write(endTimePanel + endlabelTime + endTimeLabel\r\n\t\t\t\t+ endTimeContainer + endTime);\r\n\r\n\t}", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "void xsetDuration(org.apache.xmlbeans.XmlDuration duration);", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n if(!inputDurationType.equals(\"\"))\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName, inputDurationType);\r\n else\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName); \r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "void xsetDuration(org.apache.xmlbeans.XmlString duration);", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "public File XMLforRoot(String hashid, String key, String value, int LayerId, int copyNum, String timer, boolean timerType, String userid, String Time, Certificate Certi) {\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"Root_Node_For\" + key + \"Copy\" + copyNum);\n document.appendChild(root);\n\n Element hashId = document.createElement(\"HashID\");\n hashId.appendChild(document.createTextNode(hashid));\n root.appendChild(hashId);\n\n Element layerid = document.createElement(\"layerid\");\n hashId.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(LayerId));\n\n Element key1 = document.createElement(\"Key\");\n hashId.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value));\n hashId.appendChild(Value);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum)));\n hashId.appendChild(copynum);\n\n Element timer2 = document.createElement(\"timer\");\n timer2.appendChild(document.createTextNode(String.valueOf(timer)));\n hashId.appendChild(timer2);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType)));\n hashId.appendChild(timertype);\n\n Element userId = document.createElement(\"userId\");\n userId.appendChild(document.createTextNode(String.valueOf(userid)));\n hashId.appendChild(userId);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(Time)));\n hashId.appendChild(time2);\n\n Element cert = document.createElement(\"Certificate\");\n cert.appendChild(document.createTextNode(String.valueOf(Certi)));\n hashId.appendChild(cert);\n\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\");\n return file;\n }", "void xsetDuration(org.apache.xmlbeans.XmlInt duration);", "public void getXmlFromStream (BufferedReader reader){\n\n String tmpDate = null;\n String strDate = null;\n Date date = null;\n\n try{\n XmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n XmlPullParser xpp = factory.newPullParser();\n\n // point the parser to our file.\n xpp.setInput(reader);\n // get initial eventType\n int eventType = xpp.getEventType();\n\n // process tag while not reaching the end of document\n while(eventType != XmlPullParser.END_DOCUMENT) {\n switch(eventType) {\n // at start of document: START_DOCUMENT\n case XmlPullParser.START_DOCUMENT:\n //study = new Study();\n break;\n\n // at start of a tag: START_TAG\n case XmlPullParser.START_TAG:\n // get tag name\n String tagName = xpp.getName();\n\n // if <Cube>, get attribute: 'currency'\n if(tagName.equalsIgnoreCase(KEY_CUBE)) {\n if(strDate == null){\n strDate = xpp.getAttributeValue(null, KEY_DATE);\n }\n\n String currency = xpp.getAttributeValue(null, KEY_CURRENCY);\n String rate = xpp.getAttributeValue(null, KEY_RATE);\n if(currency != null) {\n\n // Create new object\n date = createDate(strDate); // Create date\n double doubleRate = Double.parseDouble(rate); // Convert string to double\n cubes.add(new CubeXML(new Date(),currency, doubleRate)); // Create object and store in list\n }\n }\n break;\n }\n // jump to next event\n eventType = xpp.next();\n }\n\n // Add euro\n cubes.add(new CubeXML(date, \"Euro\",1));\n\n } catch (XmlPullParserException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public String toXML(int indent) {\n\t\tStringBuffer xmlBuf = new StringBuffer();\n\t\t//String xml = \"\";\n\n\t\tsynchronized (xmlBuf) {\n\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"<ScheduleEvent>\\n\");\n\t\t\t//xml += \"<ScheduleEvent>\\n\";\n\n\t\t\tindent++;\n\n\t\t\tif (crid != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Program crid=\\\"\");\n\t\t\t\txmlBuf.append(crid.getCRID());\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml = xml + \"<Program crid=\\\"\"+crid.getCRID()+\"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (programURL != null) {\n\t\t\t\txmlBuf.append(programURL.toXML(indent));\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\t//xml = xml + programURL.toXML(indent) + \"\\n\";\n\t\t\t}\n\n\t\t\tif (imi != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<InstanceMetadataId>\");\n\t\t\t\txmlBuf.append(imi.getInstanceMetadataId());\n\t\t\t\txmlBuf.append(\"</InstanceMetadataId>\\n\");\n\t\t\t\t//xml = xml +\n\t\t\t\t// \"<InstanceMetadataId>\"+imi.getInstanceMetadataId()+\"</InstanceMetadataId>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedStartTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedStartTime>\");\n\t\t\t\txmlBuf\n\t\t\t\t\t\t.append(TimeToolbox\n\t\t\t\t\t\t\t\t.makeTVATimeString(publishedStartTime));\n\t\t\t\txmlBuf.append(\"</PublishedStartTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedStartTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedStartTime) +\n\t\t\t\t// \"</PublishedStartTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedEndTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedEndTime>\");\n\t\t\t\txmlBuf.append(TimeToolbox.makeTVATimeString(publishedEndTime));\n\t\t\t\txmlBuf.append(\"</PublishedEndTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedEndTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedEndTime) +\n\t\t\t\t// \"</PublishedEndTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedDuration != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedDuration>\");\n\t\t\t\txmlBuf.append(publishedDuration.getDurationAsString());\n\t\t\t\txmlBuf.append(\"</PublishedDuration>\\n\");\n\t\t\t\t//xml += \"<PublishedDuration>\"+\n\t\t\t\t// publishedDuration.getDurationAsString() +\n\t\t\t\t// \"</PublishedDuration>\\n\";\n\t\t\t}\n\n\t\t\tif (live != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Live value=\\\"\");\n\t\t\t\txmlBuf.append(live);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Live value=\\\"\" + live + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (repeat != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Repeat value=\\\"\");\n\t\t\t\txmlBuf.append(repeat);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Repeat value=\\\"\" + repeat + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (firstShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<FirstShowing value=\\\"\");\n\t\t\t\txmlBuf.append(firstShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<FirstShowing value=\\\"\" + firstShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (lastShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<LastShowing value=\\\"\");\n\t\t\t\txmlBuf.append(lastShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<LastShowing value=\\\"\" + lastShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (free != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Free value=\\\"\");\n\t\t\t\txmlBuf.append(free);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Free value=\\\"\" + free + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (ppv != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PayPerView value=\\\"\");\n\t\t\t\txmlBuf.append(ppv);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<PayPerView value=\\\"\" + ppv + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < indent - 1; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"</ScheduleEvent>\");\n\t\t\t//xml += \"</ScheduleEvent>\";\n\n\t\t\treturn xmlBuf.toString();\n\t\t}\n\t}", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "public String generateXML() \n { \n \n String xml = new String();\n \n String nodetype = new String();\n if (type.equals(\"internal\")){\n nodetype = \"INTERNAL\"; //change this for change in XML node name\n }\n else {\n nodetype = \"LEAF\"; //change this for change in XML node name\n }\n \n xml = \"<\" + nodetype;\n if (!name.equals(\"\")){\n xml = xml + \" name = \\\"\" + name + \"\\\"\";\n }\n if (length >0){\n xml = xml + \" length = \\\"\" + length + \"\\\"\";\n }\n //Section below tests tree size and depths\n // if (level > 0){\n // xml = xml + \" level = \\\"\" + level + \"\\\"\";\n // }\n //if (depth > 0){\n // xml = xml + \" depth = \\\"\" + depth + \"\\\"\";\n //}\n //if (newicklength > 0){\n // xml = xml + \" newicklength = \\\"\" + newicklength + \"\\\"\";\n //}\n // if (treesize > 0){\n // xml = xml + \" treesize = \\\"\" + treesize + \"\\\"\";\n //}\n //if (startxcoord >= 0){\n // xml = xml + \" startx = \\\"\" + startxcoord + \"\\\"\";\n //}\n //if (endxcoord >= 0){\n // xml = xml + \" endx = \\\"\" + endxcoord + \"\\\"\";\n //}\n //Test section done\n xml = xml + \">\";\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n xml = xml + child.generateXML(); //The recursive coolness happens here!\n }\n }\n xml = xml + \"</\" + nodetype + \">\";\n \n return xml;\n }", "org.apache.xmlbeans.XmlInt xgetDuration();", "public void generateCDAFiles() throws Exception {\n\n String stopwatchStart = new SimpleDateFormat(\"yyyy-MM-dd-HH.mm.ss\").format(new Date());\n\n // file/directory locations for the app\n// String labid_file = getPropValues(\"labid-file\") + ts;\n// String comb_dir = getPropValues(\"combined-xml-dir\") + ts;\n// String mal_dir = getPropValues(\"malformed-xml-dir\") + ts;\n// String cda_dir = getPropValues(\"cda-dir\") + ts;\n\n String labid_file = getPropValues(\"labid-file\");\n String haidisplay_file = getPropValues(\"haidisplay-file\");\n String comb_dir = getPropValues(\"combined-xml-dir\");\n String mal_dir = getPropValues(\"malformed-xml-dir\");\n String cda_dir = getPropValues(\"cda-dir\"); //+ \"/\" + stopwatchStart;\n\n // hai-display must be in the same directory as the final CDAs for them to be displayed properly\n File sourceHai = new File(haidisplay_file);\n File targetHai = new File(cda_dir + \"/hai-display.xsl\");\n FileUtils.copyFile(sourceHai, targetHai);\n\n // create new XML Builder\n XMLBuilder xmlBuilder = new XMLBuilder();\n\n // creates ADT + ORU XML files in src/main/resources/ directory\n xmlBuilder.process();\n\n // get list of combined XML (ADT) files\n File dir = new File(comb_dir);\n File[] files = dir.listFiles();\n\n if (files != null) {\n for (File file : files) {\n // Transform XML files using an XSL file to CDA-like files\n\n //src/main/resources/combinedXML/[id]-source.xml\n String relPath = file.getPath();\n //[id]-source.xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 11);\n // System.out.println(relPath);\n // System.out.println(filename);\n // System.out.println(id);\n\n\n String inputXSL = labid_file;\n String inputXML = relPath;\n String outputLabId = mal_dir + \"/\" + id + \".xml\";\n Transform transform = new Transform();\n\n /**/\n\n /**\n String inputXSL = \"src/main/resources/labid.xsl\";\n String inputXML = \"src/main/resources/combinedXML/2.16.840.1.114222.4.1.646516-source.xml\";\n String outputLabId = \"src/main/resources/malformedCDA/2.16.840.1.114222.4.1.646516.xml\";\n Transform transform = new Transform();\n\n /**/\n\n try {\n transform.transformXML(inputXSL, inputXML, outputLabId);\n } catch (Exception e) {\n System.out.println(\"well... that didn't work...\");\n e.printStackTrace();\n }\n /**/\n\n }\n }\n\n\n //TODO: clean up Silas's CDA-like file\n // get list of malformed CDA files\n File mcdaDir = new File(mal_dir);\n File[] mcdafiles = mcdaDir.listFiles();\n\n int count = 0;\n int badCount = 0;\n List<String> badList = new ArrayList<String>();\n\n if (files != null) {\n for (File file : mcdafiles) {\n\n //src/main/resources/malformedCDA/[id].xml\n String relPath = file.getPath();\n //[id].xml\n String filename = file.getName();\n //2.16.840.1.114222.4.1.646522\n String id = filename.substring(0, filename.length() - 4);\n System.out.println(relPath);\n System.out.println(filename);\n System.out.println(id);\n\n FileReader reader = null;\n String content = \"\";\n try {\n reader = new FileReader(file);\n char[] chars = new char[(int) file.length()];\n try {\n reader.read(chars);\n } catch (IOException e) {\n e.printStackTrace();\n }\n content = new String(chars);\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n // System.out.println(content);\n\n\n int cdaRootIndex = content.indexOf(\"<ClinicalDocument\");\n if (cdaRootIndex < 1) {\n System.out.println(\"no clinical document tag found in malformed CDA with id: \" + id);\n badCount++;\n badList.add(id);\n continue;\n } else {\n String clinicalDoc = content.substring(cdaRootIndex);\n\n\n //System.out.println(clinicalDoc);\n String cleanTop = replace(clinicalDoc, \"<ClinicalDocument\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"hai-display.xsl\\\"?>\\n<ClinicalDocument\");\n String cleanCDA = replace(cleanTop, \"</root>\", \"\");\n //System.out.println(cleanCDA);\n String now = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n try {\n FileUtils.writeStringToFile(new File(cda_dir + \"/\" + id + \"--\" + now + \".xml\"), cleanCDA);\n System.out.println(\"wrote to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n count++;\n } catch (IOException e) {\n System.out.println(\"problem writing to \" + cda_dir + \"/\" + id + \"--\" + now + \".xml\");\n e.printStackTrace();\n }\n }\n\n }\n\n System.out.println(\"# CDA Files created: \" + count);\n System.out.println(\"# bad malformed CDAs: \" + badCount);\n for(String id: badList) {\n System.out.println(\"bad id:\" + id);\n }\n }\n }", "org.apache.xmlbeans.XmlDuration xgetDuration();", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "private void saveXML_FTP(String yearId, String templateId, String schoolCode,Restrictions r) {\n String server = \"192.168.1.36\";\r\n int port = 21;\r\n String user = \"david\";\r\n String pass = \"david\";\r\n DocumentBuilderFactory icFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder icBuilder;\r\n FTPClient ftpClient = new FTPClient();\r\n try {\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\tDate date = new Date();\r\n\t//System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43\r\n String fecha = dateFormat.format(date);\r\n fecha = fecha.replace(\" \", \"_\");\r\n fecha = fecha.replace(\"/\", \"_\");\r\n fecha = fecha.replace(\":\", \"_\");\r\n String filename = yearId + \"_\" + templateId+\"_\"+fecha+\".xml\";\r\n String rutaCarpeta = \"/Schedules/\" + schoolCode;\r\n\r\n if (!ftpClient.changeWorkingDirectory(rutaCarpeta));\r\n {\r\n ftpClient.changeWorkingDirectory(\"/Schedules\");\r\n ftpClient.mkd(schoolCode);\r\n ftpClient.changeWorkingDirectory(schoolCode);\r\n }\r\n\r\n icBuilder = icFactory.newDocumentBuilder();\r\n Document doc = icBuilder.newDocument();\r\n Element mainRootElement = doc.createElementNS(\"http://eduwebgroup.ddns.net/ScheduleWeb/enviarmensaje.htm\", \"Horarios\");\r\n doc.appendChild(mainRootElement);\r\n Element students = doc.createElement(\"Students\");\r\n // append child elements to root element\r\n \r\n for (Course t : r.courses) {\r\n for (int j = 0; j < t.getArraySecciones().size(); j++) {\r\n for (int k = 0; k < t.getArraySecciones().get(j).getIdStudents().size(); k++) { \r\n students.appendChild(getStudent(doc,\"\"+t.getArraySecciones().get(j).getIdStudents().get(k),\"\"+t.getIdCourse(),\"\"+(j+1),yearId,\"\"+t.getArraySecciones().get(j).getClassId())); \r\n } \r\n }\r\n }\r\n \r\n Element cursos = doc.createElement(\"Courses\");\r\n for (Course t : r.courses) {\r\n for (int j = 1; j < t.getArraySecciones().size(); j++) {\r\n //if()\r\n cursos.appendChild(getCursos(doc,\"\"+t.getIdCourse(),\"\"+j,\"\"+t.getArraySecciones().get(j).getIdTeacher(),yearId,\"\"+t.getArraySecciones().get(j).getClassId()));\r\n }\r\n }\r\n \r\n//private Node getBloques(Document doc, String day, String begin, String tempId, String courseId, String section) {\r\n \r\n Element bloques = doc.createElement(\"Blocks\");\r\n for (Course t : r.courses) {\r\n /* for (int i = 0; i < TAMY; i++) {\r\n for (int j = 0; j < TAMX; j++) {\r\n \r\n if ( !t.getHuecos()[j][i].contains(\"0\")) {\r\n if(t.getHuecos()[j][i].contains(\"and\")){\r\n String[] partsSections = t.getHuecos()[j][i].split(\"and\");\r\n for (String partsSection : partsSections) {\r\n String seccionClean = partsSection.replace(\" \", \"\");\r\n if(!seccionClean.equals(\"0\"))bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),seccionClean,yearId));\r\n }\r\n }\r\n else\r\n bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),\"\"+t.getHuecos()[j][i],yearId));\r\n }\r\n }\r\n }*/\r\n for (int i = 0; i < t.getArraySecciones().size(); i++) {\r\n for (int j = 0; j < t.getArraySecciones().get(i).getPatronUsado().size(); j++) {\r\n int col = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).x +1;\r\n int row = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).y +1;\r\n \r\n bloques.appendChild(getBloques(doc,\"\"+(col),\"\"+(row),templateId,\"\"+t.getIdCourse(),\"\"+t.getArraySecciones().get(i).getNumSeccion(),yearId,\"\"+t.getArraySecciones().get(i).getClassId(),\"\"+t.getArraySecciones().get(i).getPatternRenweb()));\r\n }\r\n }\r\n }\r\n \r\n /* students.appendChild(getCompany(doc, \"Paypal\", \"Payment\", \"1000\"));\r\n students.appendChild(getCompany(doc, \"eBay\", \"Shopping\", \"2000\"));\r\n students.appendChild(getCompany(doc, \"Google\", \"Search\", \"3000\"));*/\r\n \r\n mainRootElement.appendChild(students);\r\n mainRootElement.appendChild(cursos);\r\n mainRootElement.appendChild(bloques);\r\n // output DOM XML to console \r\n /*Transformer transformer = TransformerFactory.newInstance().newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult console = new StreamResult(System.out);\r\n transformer.transform(source, console);\r\n*/\r\n\r\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\r\n Source xmlSource = new DOMSource(doc);\r\n Result outputTarget = new StreamResult(outputStream);\r\n TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);\r\n InputStream is = new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n ftpClient.storeFile(filename, is);\r\n ftpClient.logout();\r\n\r\n } catch (Exception ex) {\r\n System.err.println(\"\");\r\n }\r\n\r\n }", "public void convertFile(String xlsFileName, String xmlFileName) throws IOException\n\t{\n\t try \n\t {\n\t Document newDoc = domBuilder.newDocument();\n\t Element rootElement = newDoc.createElement(\"suite\");\n\t rootElement.setAttribute(\"name\", \"Regression suite\");\n\t rootElement.setAttribute(\"verbose\", \"1\");\n\t \n\t \n\t \tnewDoc.appendChild(rootElement);\n\n\t \n\t Element rootElement2 = newDoc.createElement(\"listeners\");\n\t rootElement.appendChild(rootElement2);\n\n\t \n\t Element rootElement6 = newDoc.createElement(\"listener\");\n\t rootElement6.setAttribute(\"class-name\", \"com.dista.listeners.RetryListener\");\n\t rootElement2.appendChild(rootElement6);\n\t \n/*\t Element rootElement7 = newDoc.createElement(\"listener\");\n\t rootElement7.setAttribute(\"class-name\", \"com.dista.listeners.ExtentListener\");\n\t rootElement2.appendChild(rootElement7);*/\n\n/*\t Element rootElement8 = newDoc.createElement(\"listener\");\n\t rootElement8.setAttribute(\"class-name\", \"com.dista.listeners.CustomMethods\");\n\t rootElement2.appendChild(rootElement8);*/\n\t \n\t Element rootElement9 = newDoc.createElement(\"listener\");\n\t rootElement9.setAttribute(\"class-name\", \"com.dista.listeners.TestListener\");\n\t rootElement2.appendChild(rootElement9);\n\t \n\t \n\t FileInputStream ExcelFile;\n\t\t\tExcelFile = new FileInputStream(xlsFileName);\t\t//files stored at specified path contains URLs\n\t\t\tXSSFWorkbook ExcelWBook = new XSSFWorkbook(ExcelFile);\n\t\t\tXSSFSheet ExcelWSheet = ExcelWBook.getSheet(\"XML Data\");\n\t\t\tIterator <Row> ri = ExcelWSheet.iterator(); \n\t\t\tRow r = ri.next();\n\t\t\t\n\t\t\tboolean loop_condition2 = true, loop_condition3=true;\n\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\t\n\t\t\t\tboolean loop_condition = true;\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Text\"+r.getCell(0).getStringCellValue());\n\t\t\t\t\n\t\t\t\tElement rowElement = newDoc.createElement(\"test\");\n\t\t\t\trowElement.setAttribute(\"name\", r.getCell(0).getStringCellValue());\n\t\t\t\trootElement.appendChild(rowElement);\n\t\t\t\t\n\t\t\t\tElement curElement = newDoc.createElement(\"classes\");\n\t\t\t\trowElement.appendChild(curElement);\n\t\t\t\t\n\t\t\t\tElement curElement2 = newDoc.createElement(\"class\");\n\t curElement2.setAttribute(\"name\", \"com.dista.test.automation.\"+r.getCell(0).getStringCellValue());\n\t curElement.appendChild(curElement2); \n\t \n\t Element curElement3 = newDoc.createElement(\"methods\");\n\t curElement2.appendChild(curElement3);\n\t \n\t r= ri.next();\n\t \n\t while(loop_condition )\n\t {\n\t \t//System.out.println(r.getCell(1).getStringCellValue());\n\t \n\t \tString option=null;\n\t\n\t try\n\t {\n\t \tswitch (r.getCell(2).getStringCellValue())\n\t \t{\n\t \t\tcase \"Y\":\n\t \t\t\toption = \"include\";\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase \"N\":\n\t \t\t\toption = \"exclude\";\n\t break;\n\t \n\t default:\n\t System.out.println(\"Invalid Data\");\n\t break;\n\t \t} \t\t\t\n\t }\n\t catch(NullPointerException npe)\n\t {\n\t \toption= \"exclude\";\n\t }\n\t \n\t //System.out.println(option);\n\t \t\tElement curElement4 = newDoc.createElement(option);\n\t \t\tcurElement4.setAttribute(\"name\", r.getCell(1).getStringCellValue());\n\t curElement3.appendChild(curElement4);\n\t \n\t\t if (ri.hasNext())\n\t\t {\n\t\t \tr= ri.next();\n\t\t \t\t\n\t\t try\n\t\t { \t\n\t\t \tif(!r.getCell(1).getStringCellValue().isEmpty())\n\t\t \t\tloop_condition= true;\n\t\t \telse\n\t\t \t\tloop_condition=false;\n\t\t \t}\n\t\t catch(NullPointerException npe)\n\t\t {\n\t\t \tloop_condition=false;\n\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t \tloop_condition=false;\n\t\t \tloop_condition3= false;\n\t\t }\n\t }\n\t \n\t if(loop_condition3)\n\t {\n\t\t try\n\t\t { \t\n\t\t \tif(!r.getCell(0).getStringCellValue().isEmpty())\n\t\t \t\tloop_condition2= true;\n\t\t \telse\n\t\t \t\tloop_condition2=false;\n\t\t }\n\t\t catch(NullPointerException npe)\n\t\t {\n\t\t \tloop_condition2=false;\n\t\t }\n\t }\n\t else\n\t \tloop_condition2=false;\n\t\t\t}\n\t\t\twhile(loop_condition2);\n\t\n\t\t\t\n\t\t\tbaos = new ByteArrayOutputStream();\n\t\t\tosw = new OutputStreamWriter(baos);\n\t\n\t\t\tTransformerFactory tranFactory = TransformerFactory.newInstance();\n\t\t\tTransformer aTransformer = tranFactory.newTransformer();\n\t\t\taTransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\taTransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n\t\t\taTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\n\t DOMImplementation domImpl = newDoc.getImplementation();\n\t // <!DOCTYPE suite PUBLIC \"-//Oberon//YOUR PUBLIC DOCTYPE//EN\" \"YOURDTD.dtd\">\n\t //<!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\">\n\n\t // <!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\" >\n\t\t DocumentType doctype = domImpl.createDocumentType(\"doctype\",\n\t\t \t\t\"\", \"http://testng.org/testng-1.0.dtd\");\n\t\t aTransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId());\n\t \n\t Source src = new DOMSource(newDoc);\n\t Result result = new StreamResult(new File(xmlFileName));\n\t aTransformer.transform(src, result);\n\t\n\t osw.flush();\n\t System.out.println(new String(baos.toByteArray()));\n\t \n\t ExcelWBook.close();\n\t\n\t\t}\n\t catch (Exception exp) \n\t {\n\t \texp.printStackTrace();\n\t } \n\t \n\t osw.close();\n\t baos.close();\n\t}", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "@Override\r\n\tpublic void endElement(String uri, String localName, String qName)\r\n\t\t\tthrows SAXException {\n\t\tif(qName.equalsIgnoreCase(\"item\")){\r\n\t\t\t//tempEvent = new PragyanEventData();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"item\")){\r\n\t\t\ttempEvent = new PragyanEventData();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"itemname\")){\r\n\t\t\ttempEvent.setEventName(tempString);\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"one\")){\r\n\t\t\ttempEvent.setEventCaption(tempString);\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"imgurl\")){\r\n\t\t\ttempEvent.setEventImage(tempString);\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"starttime\")){\r\n\t\t\ttry { \r\n\t\t\t\t//Log.d(\"TIMESTART\", tempString);\r\n\t\t\t Date time = format.parse(dateWriter.toString()); \r\n\t\t\t \r\n\t\t\t tempEvent.addStartTime(time);\r\n\t\t\t\t\r\n\t\t\t\twritingDate = false;\r\n\t\t\t\tdateWriter.reset();\r\n\t\t\t} catch (java.text.ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\ttempString=\"\";\r\n\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally{}\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"endtime\")){\r\n\t\t\ttry { \r\n\t\t\t\t//Log.d(\"TIMEEND\", tempString);\r\n\t\t\t Date time = format.parse(dateWriter.toString()); \r\n\t\t\t\ttempEvent.addEndTime(time);\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t\twritingDate = false;\r\n\t\t\t\tdateWriter.reset();\r\n\r\n\t\t\t} catch (java.text.ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t//Log.d(\"ERROR\", tempEvent.getEventName());\r\n\t\t\t\t//Log.d(\"ERROR\", tempString);\r\n\t\t\t\ttempString=\"\";\r\n\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally{}\r\n\t\t}\r\n\t\t\r\n\t\tif(qName.equalsIgnoreCase(\"children\")){\r\n\t\t\ttempEvent =stackEvents.pop();\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"main\")){\r\n\t\t\ttempEvent.addPageTitle(\"About\");\r\n\t\t\ttempString = tempString.replace(\"$$##$$\", \"\\n\");\r\n\t\t\ttempString = tempString.replace(\"$$!!$$\", \" \");\r\n\t\t\ttempString = tempString.replace(\"$$%%$$\", \" \");\r\n\t\t\t//Log.d(\"MAIN\",tempString);\r\n\t\t\ttempEvent.addPageContent(tempString);\r\n\t\t\tstartPage=false;\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"pagename\")){\r\n\t\t\tif(startPage){\r\n\t\t\t\t////Log.d(\"FIXIT\",tempString.trim());\r\n\t\t\t\ttempEvent.addPageTitle(tempString.trim());\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"pgimg\")){\r\n\t\t\tif(startPage){\r\n\t\t\t\ttempEvent.setEventSecondaryImage(rootUrl+tempString);\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"content\")){\r\n\t\t\t//Log.d(\"ACTION\",\"hit contentend\"+String.valueOf(startPage)+\":\"+tempString);\r\n\t\t\tif(startPage){\r\n\t\t\t\ttempEvent.addPageContent(charWriter.toString());\r\n\t\t\t\t////Log.d(\"CONT\",charWriter.toString());\r\n\t\t\t\ttempString=\"\";\r\n\t\t\t\tcharWriter.reset();\r\n\t\t\t\tstartContent = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(qName.equalsIgnoreCase(\"page\")){\r\n\t\t\t////Log.d(\"FOXIT\",\"pageend:\"+String.valueOf(tempEvent.pageTitles.size()));\r\n\t\t\tstartPage=false;\r\n\t\t}\r\n\t\t\r\n\t}", "public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "@Override public void outputXml(IvyXmlWriter xw)\n{\n outputHeader(xw);\n xw.field(\"TYPE\",(is_trigger ? \"TRIGGER\" : \"TIMED\"));\n xw.field(\"MINTIME\",min_time);\n xw.field(\"MAXTIME\",max_time);\n base_condition.outputXml(xw);\n outputTrailer(xw);\n}", "private Element createBaseTemporalNode(Node relOpNode, XmlProcessor hqmfXmlProcessor) {\n\n\t\tNamedNodeMap attribMap = relOpNode.getAttributes();\n\t\tElement temporallyRelatedInfoNode = hqmfXmlProcessor.getOriginalDoc()\n\t\t\t\t.createElement(\"temporallyRelatedInformation\");\n\t\ttemporallyRelatedInfoNode.setAttribute(TYPE_CODE, attribMap.getNamedItem(TYPE).getNodeValue().toUpperCase());\n\n\t\tElement temporalInfoNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:temporalInformation\");\n\t\tString precisionUnit = \"min\"; // use min by default\n\n\t\tif (attribMap.getNamedItem(OPERATOR_TYPE) != null) {\n\t\t\tString operatorType = attribMap.getNamedItem(OPERATOR_TYPE).getNodeValue();\n\t\t\tString quantity = attribMap.getNamedItem(QUANTITY).getNodeValue();\n\t\t\tString unit = attribMap.getNamedItem(UNIT).getNodeValue();\n\n\t\t\tif (\"seconds\".equals(unit)) {\n\t\t\t\tprecisionUnit = \"s\";\n\t\t\t\tunit = \"s\";\n\t\t\t} else if (\"hours\".equals(unit)) {\n\t\t\t\tunit = \"h\";\n\t\t\t} else if (\"minutes\".equals(unit)) {\n\t\t\t\tunit = \"min\";\n\t\t\t} else {\n\t\t\t\tprecisionUnit = \"d\";\n\t\t\t\tif (\"days\".equals(unit)) {\n\t\t\t\t\tunit = \"d\";\n\t\t\t\t} else if (\"weeks\".equals(unit)) {\n\t\t\t\t\tunit = \"wk\";\n\t\t\t\t} else if (\"months\".equals(unit)) {\n\t\t\t\t\tunit = \"mo\";\n\t\t\t\t} else if (\"years\".equals(unit)) {\n\t\t\t\t\tunit = \"a\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tElement deltaNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:delta\");\n\t\t\tElement lowNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"low\");\n\t\t\tlowNode.setAttribute(UNIT, unit);\n\n\t\t\tElement highNode = hqmfXmlProcessor.getOriginalDoc().createElement(\"high\");\n\t\t\thighNode.setAttribute(UNIT, unit);\n\n\t\t\tif (operatorType.startsWith(\"Greater Than\")) {\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.removeAttribute(UNIT);\n\t\t\t\thighNode.setAttribute(NULL_FLAVOR, \"PINF\");\n\t\t\t\tif (\"Greater Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\t}\n\t\t\t} else if (\"Equal To\".equals(operatorType)) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, quantity);\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t} else if (operatorType.startsWith(\"Less Than\")) {\n\t\t\t\tdeltaNode.setAttribute(\"lowClosed\", TRUE);\n\t\t\t\tlowNode.setAttribute(VALUE, \"0\");\n\t\t\t\thighNode.setAttribute(VALUE, quantity);\n\t\t\t\tif (\"Less Than or Equal To\".equals(operatorType)) {\n\t\t\t\t\tdeltaNode.setAttribute(\"highClosed\", TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdeltaNode.appendChild(lowNode);\n\t\t\tdeltaNode.appendChild(highNode);\n\t\t\ttemporalInfoNode.appendChild(deltaNode);\n\t\t}\n\t\ttemporalInfoNode.setAttribute(\"precisionUnit\", precisionUnit);\n\t\ttemporallyRelatedInfoNode.appendChild(temporalInfoNode);\n\t\treturn temporallyRelatedInfoNode;\n\t}", "private static Document generateXmlFile(LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName) throws ParserConfigurationException\r\n {\r\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n Document doc = docBuilder.newDocument();\r\n \r\n Date date = new Date();\r\n long time = date.getTime();\r\n Timestamp ts = new Timestamp(time);\r\n \r\n //Nodo Radice export_results\r\n Element export_results = doc.createElement(\"export_results\");\r\n export_results.setAttribute(\"date\", \"\"+ts);\r\n doc.appendChild(export_results);\r\n \r\n //Figlo del nodo radice export_results\r\n Element graph = doc.createElement(\"graph\");\r\n graph.setAttribute(\"name\", graphName);\r\n export_results.appendChild(graph);\r\n \r\n //Popolo iterando sulla mappa i nodi interni del TAG graph\r\n for(String mapKey : inputData.keySet())\r\n {\r\n //System.out.println(\"Key: \" + mapKey + \" - - Value: \" + inputData.get(mapKey));\r\n \r\n Element singleElementInGraph = doc.createElement(elementInGraph);\r\n singleElementInGraph.setTextContent(Integer.toString(inputData.get(mapKey)));\r\n singleElementInGraph.setAttribute(\"type\", mapKey);\r\n graph.appendChild(singleElementInGraph);\r\n }\r\n return doc;\r\n }", "protected static void writeXML(String path, String ID, String abs,String cls) {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder;\r\n try {\r\n dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.newDocument();\r\n //add elements to Document\r\n Element rootElement =doc.createElement(\"Data\");\r\n //append root element to document\r\n doc.appendChild(rootElement);\r\n\r\n rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls));\r\n //for output to file, console\r\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n Transformer transformer = transformerFactory.newTransformer();\r\n //for pretty print\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n\r\n //write to console or file\r\n StreamResult console = new StreamResult(System.out);\r\n StreamResult file = new StreamResult(new File(path+\"\"+ID+\".xml\"));\r\n\r\n //write data\r\n transformer.transform(source, console);\r\n transformer.transform(source, file);\r\n //System.out.println(\"DONE\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "private void loadFile() {\n String xmlContent = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><atomic-mass-table mass-units=\\\"u\\\" abundance-units=\\\"Mole Fraction\\\"><entry symbol=\\\"H\\\" atomic-number=\\\"1\\\"> <natural-abundance> <mass value=\\\"1.00794\\\" error=\\\"0.00007\\\" /> <isotope mass-number=\\\"1\\\"> <mass value=\\\"1.0078250319\\\" error=\\\"0.00000000006\\\" /> <abundance value=\\\"0.999885\\\" error=\\\"0.000070\\\" /> </isotope> <isotope mass-number=\\\"2\\\"> <mass value=\\\"2.0141017779\\\" error=\\\"0.0000000006\\\" /> <abundance value=\\\"0.000115\\\" error=\\\"0.000070\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"He\\\" atomic-number=\\\"2\\\"> <natural-abundance> <mass value=\\\"4.002602\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"3.0160293094\\\" error=\\\"0.0000000012\\\" /> <abundance value=\\\"0.00000134\\\" error=\\\"0.00000003\\\" /> </isotope> <isotope mass-number=\\\"4\\\"> <mass value=\\\"4.0026032497\\\" error=\\\"0.0000000015\\\" /> <abundance value=\\\"0.99999866\\\" error=\\\"0.00000003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Li\\\" atomic-number=\\\"3\\\"> <natural-abundance> <mass value=\\\"6.9421\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"3\\\"> <mass value=\\\"6.0151223\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.0759\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"7\\\"> <mass value=\\\"7.0160041\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.9241\\\" error=\\\"0.0004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Be\\\" atomic-number=\\\"4\\\"> <natural-abundance> <mass value=\\\"9.012182\\\" error=\\\"0.000003\\\" /> <isotope mass-number=\\\"9\\\"> <mass value=\\\"9.0121822\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"B\\\" atomic-number=\\\"5\\\"> <natural-abundance> <mass value=\\\"10.881\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"10\\\"> <mass value=\\\"10.0129371\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.199\\\" error=\\\"0.007\\\" /> </isotope> <isotope mass-number=\\\"11\\\"> <mass value=\\\"11.0093055\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.801\\\" error=\\\"0.007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"C\\\" atomic-number=\\\"6\\\"> <natural-abundance> <mass value=\\\"12.0107\\\" error=\\\"0.0008\\\" /> <isotope mass-number=\\\"12\\\"> <mass value=\\\"12\\\" error=\\\"0\\\" /> <abundance value=\\\"0.9893\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"13\\\"> <mass value=\\\"13.003354838\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.0107\\\" error=\\\"0.0008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"N\\\" atomic-number=\\\"7\\\"> <natural-abundance> <mass value=\\\"14.0067\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"14\\\"> <mass value=\\\"14.0030740074\\\" error=\\\"0.0000000018\\\" /> <abundance value=\\\"0.99636\\\" error=\\\"0.00020\\\" /> </isotope> <isotope mass-number=\\\"15\\\"> <mass value=\\\"15.000108973\\\" error=\\\"0.000000012\\\" /> <abundance value=\\\"0.00364\\\" error=\\\"0.00020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"O\\\" atomic-number=\\\"8\\\"> <natural-abundance> <mass value=\\\"15.9994\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"16\\\"> <mass value=\\\"15.9949146223\\\" error=\\\"0.0000000025\\\" /> <abundance value=\\\"0.99759\\\" error=\\\"0.00016\\\" /> </isotope> <isotope mass-number=\\\"17\\\"> <mass value=\\\"16.99913150\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.00038\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"18\\\"> <mass value=\\\"17.9991604\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.00205\\\" error=\\\"0.00014\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"F\\\" atomic-number=\\\"9\\\"> <natural-abundance> <mass value=\\\"18.9984032\\\" error=\\\"0.0000005\\\" /> <isotope mass-number=\\\"19\\\"> <mass value=\\\"18.99840320\\\" error=\\\"0.00000007\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ne\\\" atomic-number=\\\"10\\\"> <natural-abundance> <mass value=\\\"20.1797\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"20\\\"> <mass value=\\\"19.992440176\\\" error=\\\"0.000000003\\\" /> <abundance value=\\\"0.9048\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"21\\\"> <mass value=\\\"20.99384674\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.0027\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"22\\\"> <mass value=\\\"21.99138550\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0925\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Na\\\" atomic-number=\\\"11\\\"> <natural-abundance> <mass value=\\\"22.989770\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"23\\\"> <mass value=\\\"22.98976966\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mg\\\" atomic-number=\\\"12\\\"> <natural-abundance> <mass value=\\\"24.3050\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"24\\\"> <mass value=\\\"23.98504187\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.7899\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"25\\\"> <mass value=\\\"24.98583700\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1000\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"26\\\"> <mass value=\\\"25.98259300\\\" error=\\\"0.00000026\\\" /> <abundance value=\\\"0.1101\\\" error=\\\"0.0003\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Al\\\" atomic-number=\\\"13\\\"> <natural-abundance> <mass value=\\\"26.981538\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"27\\\"> <mass value=\\\"26.98153841\\\" error=\\\"0.00000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Si\\\" atomic-number=\\\"14\\\"> <natural-abundance> <mass value=\\\"28.0855\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"28\\\"> <mass value=\\\"27.97692649\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.92223\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"29\\\"> <mass value=\\\"28.97649468\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.04685\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"30\\\"> <mass value=\\\"29.97377018\\\" error=\\\"0.00000022\\\" /> <abundance value=\\\"0.03092\\\" error=\\\"0.00011\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"P\\\" atomic-number=\\\"15\\\"> <natural-abundance> <mass value=\\\"30.973761\\\" error=\\\"0.000002\\\" /> <isotope mass-number=\\\"31\\\"> <mass value=\\\"30.97376149\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"S\\\" atomic-number=\\\"16\\\"> <natural-abundance> <mass value=\\\"32.065\\\" error=\\\"0.005\\\" /> <isotope mass-number=\\\"32\\\"> <mass value=\\\"31.97207073\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.9499\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"33\\\"> <mass value=\\\"32.97145854\\\" error=\\\"0.00000015\\\" /> <abundance value=\\\"0.0075\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"34\\\"> <mass value=\\\"33.96786687\\\" error=\\\"0.00000014\\\" /> <abundance value=\\\"0.0425\\\" error=\\\"0.0024\\\" /> </isotope> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96708088\\\" error=\\\"0.00000025\\\" /> <abundance value=\\\"0.0001\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cl\\\" atomic-number=\\\"17\\\"> <natural-abundance> <mass value=\\\"35.453\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"35\\\"> <mass value=\\\"34.96885271\\\" error=\\\"0.00000004\\\" /> <abundance value=\\\"0.7576\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"37\\\"> <mass value=\\\"36.96590260\\\" error=\\\"0.00000005\\\" /> <abundance value=\\\"0.2424\\\" error=\\\"0.0010\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ar\\\" atomic-number=\\\"18\\\"> <natural-abundance> <mass value=\\\"39.948\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"36\\\"> <mass value=\\\"35.96754626\\\" error=\\\"0.00000027\\\" /> <abundance value=\\\"0.0003365\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"38\\\"> <mass value=\\\"37.9627322\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.000632\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.962383124\\\" error=\\\"0.000000005\\\" /> <abundance value=\\\"0.996003\\\" error=\\\"0.000030\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"K\\\" atomic-number=\\\"19\\\"> <natural-abundance> <mass value=\\\"39.0983\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"39\\\"> <mass value=\\\"38.9637069\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.932581\\\" error=\\\"0.000044\\\" /> </isotope> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.96399867\\\" error=\\\"0.00000029\\\" /> <abundance value=\\\"0.000117\\\" error=\\\"0.000001\\\" /> </isotope> <isotope mass-number=\\\"41\\\"> <mass value=\\\"40.96182597\\\" error=\\\"0.00000028\\\" /> <abundance value=\\\"0.067302\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ca\\\" atomic-number=\\\"20\\\"> <natural-abundance> <mass value=\\\"40.078\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"40\\\"> <mass value=\\\"39.9625912\\\" error=\\\"0.0000003\\\" /> <abundance value=\\\"0.96941\\\" error=\\\"0.00156\\\" /> </isotope> <isotope mass-number=\\\"42\\\"> <mass value=\\\"41.9586183\\\" error=\\\"0.0000004\\\" /> <abundance value=\\\"0.00647\\\" error=\\\"0.00023\\\" /> </isotope> <isotope mass-number=\\\"43\\\"> <mass value=\\\"42.9587668\\\" error=\\\"0.0000005\\\" /> <abundance value=\\\"0.00135\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"44\\\"> <mass value=\\\"43.9554811\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.02086\\\" error=\\\"0.00110\\\" /> </isotope> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9536927\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.00004\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.952533\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00187\\\" error=\\\"0.00021\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sc\\\" atomic-number=\\\"21\\\"> <natural-abundance> <mass value=\\\"44.955910\\\" error=\\\"0.000008\\\" /> <isotope mass-number=\\\"45\\\"> <mass value=\\\"44.9559102\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ti\\\" atomic-number=\\\"22\\\"> <natural-abundance> <mass value=\\\"47.867\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"46\\\"> <mass value=\\\"45.9526295\\\" error=\\\"0.0000012\\\" /> <abundance value=\\\"0.0825\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"47\\\"> <mass value=\\\"46.9517637\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0744\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"48\\\"> <mass value=\\\"47.9479470\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.7372\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"49\\\"> <mass value=\\\"48.9478707\\\" error=\\\"0.0000010\\\" /> <abundance value=\\\"0.0541\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"V\\\" atomic-number=\\\"23\\\"> <natural-abundance> <mass value=\\\"50.9415\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9471627\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.00250\\\" error=\\\"0.00004\\\" /> </isotope> <isotope mass-number=\\\"51\\\"> <mass value=\\\"50.9439635\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.99750\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cr\\\" atomic-number=\\\"24\\\"> <natural-abundance> <mass value=\\\"51.9961\\\" error=\\\"0.0006\\\" /> <isotope mass-number=\\\"50\\\"> <mass value=\\\"49.9460495\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.04345\\\" error=\\\"0.00013\\\" /> </isotope> <isotope mass-number=\\\"52\\\"> <mass value=\\\"51.9405115\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.83789\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"53\\\"> <mass value=\\\"52.9406534\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.09501\\\" error=\\\"0.00017\\\" /> </isotope> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.938846\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02365\\\" error=\\\"0.00007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mn\\\" atomic-number=\\\"25\\\"> <natural-abundance> <mass value=\\\"54.938049\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"55\\\"> <mass value=\\\"54.9380493\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Fe\\\" atomic-number=\\\"26\\\"> <natural-abundance> <mass value=\\\"55.845\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"54\\\"> <mass value=\\\"53.9396147\\\" error=\\\"0.0000014\\\" /> <abundance value=\\\"0.05845\\\" error=\\\"0.00035\\\" /> </isotope> <isotope mass-number=\\\"56\\\"> <mass value=\\\"55.9349418\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.91754\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"57\\\"> <mass value=\\\"56.9353983\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.02119\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9332801\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.00282\\\" error=\\\"0.00004\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Co\\\" atomic-number=\\\"27\\\"> <natural-abundance> <mass value=\\\"58.933200\\\" error=\\\"0.000009\\\" /> <isotope mass-number=\\\"59\\\"> <mass value=\\\"59.9331999\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ni\\\" atomic-number=\\\"28\\\"> <natural-abundance> <mass value=\\\"58.6934\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"58\\\"> <mass value=\\\"57.9353477\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.680769\\\" error=\\\"0.000089\\\" /> </isotope> <isotope mass-number=\\\"60\\\"> <mass value=\\\"59.9307903\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.262231\\\" error=\\\"0.000077\\\" /> </isotope> <isotope mass-number=\\\"61\\\"> <mass value=\\\"60.9310601\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.011399\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"62\\\"> <mass value=\\\"61.9283484\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0036345\\\" error=\\\"0.000017\\\" /> </isotope> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9279692\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.009256\\\" error=\\\"0.000009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cu\\\" atomic-number=\\\"29\\\"> <natural-abundance> <mass value=\\\"63.546\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"63\\\"> <mass value=\\\"62.9296007\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.6915\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"65\\\"> <mass value=\\\"64.9277938\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3085\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zn\\\" atomic-number=\\\"30\\\"> <natural-abundance> <mass value=\\\"65.409\\\" error=\\\"0.004\\\" /> <isotope mass-number=\\\"64\\\"> <mass value=\\\"63.9291461\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.48268\\\" error=\\\"0.00321\\\" /> </isotope> <isotope mass-number=\\\"66\\\"> <mass value=\\\"65.9260364\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.27975\\\" error=\\\"0.00077\\\" /> </isotope> <isotope mass-number=\\\"67\\\"> <mass value=\\\"66.9271305\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.04102\\\" error=\\\"0.00021\\\" /> </isotope> <isotope mass-number=\\\"68\\\"> <mass value=\\\"67.9248473\\\" error=\\\"0.0000017\\\" /> <abundance value=\\\"0.19024\\\" error=\\\"0.00123\\\" /> </isotope> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.925325\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00631\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ga\\\" atomic-number=\\\"31\\\"> <natural-abundance> <mass value=\\\"69.723\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"69\\\"> <mass value=\\\"68.925581\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.60108\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"71\\\"> <mass value=\\\"70.9247073\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.39892\\\" error=\\\"0.00009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ge\\\" atomic-number=\\\"32\\\"> <natural-abundance> <mass value=\\\"72.64\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"70\\\"> <mass value=\\\"69.9242500\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.2038\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"72\\\"> <mass value=\\\"71.9220763\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2731\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"73\\\"> <mass value=\\\"72.9234595\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0776\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9211784\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.3672\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9214029\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0783\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"As\\\" atomic-number=\\\"33\\\"> <natural-abundance> <mass value=\\\"74.92160\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"75\\\"> <mass value=\\\"74.9215966\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Se\\\" atomic-number=\\\"34\\\"> <natural-abundance> <mass value=\\\"78.96\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"74\\\"> <mass value=\\\"73.9224767\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"76\\\"> <mass value=\\\"75.9192143\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0937\\\" error=\\\"0.0029\\\" /> </isotope> <isotope mass-number=\\\"77\\\"> <mass value=\\\"76.9199148\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0763\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.9173097\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.2377\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.9165221\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.4961\\\" error=\\\"0.0041\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9167003\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.0873\\\" error=\\\"0.0022\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Br\\\" atomic-number=\\\"35\\\"> <natural-abundance> <mass value=\\\"79.904\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"79\\\"> <mass value=\\\"78.9183379\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.5069\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"81\\\"> <mass value=\\\"80.916291\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4931\\\" error=\\\"0.0007\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Kr\\\" atomic-number=\\\"36\\\"> <natural-abundance> <mass value=\\\"83.798\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"78\\\"> <mass value=\\\"77.920388\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00355\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"80\\\"> <mass value=\\\"79.916379\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.02286\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"82\\\"> <mass value=\\\"81.9134850\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.11593\\\" error=\\\"0.00031\\\" /> </isotope> <isotope mass-number=\\\"83\\\"> <mass value=\\\"82.914137\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11500\\\" error=\\\"0.00019\\\" /> </isotope> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.911508\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.56987\\\" error=\\\"0.00015\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.910615\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.17279\\\" error=\\\"0.00041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rb\\\" atomic-number=\\\"37\\\"> <natural-abundance> <mass value=\\\"85.4678\\\" error=\\\"0.0003\\\" /> <isotope mass-number=\\\"85\\\"> <mass value=\\\"84.9117924\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.7217\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9091858\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.2783\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sr\\\" atomic-number=\\\"38\\\"> <natural-abundance> <mass value=\\\"87.62\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"84\\\"> <mass value=\\\"83.913426\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0056\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"86\\\"> <mass value=\\\"85.9092647\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0986\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"87\\\"> <mass value=\\\"86.9088816\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.0700\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"88\\\"> <mass value=\\\"87.9056167\\\" error=\\\"0.0000025\\\" /> <abundance value=\\\"0.8258\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Y\\\" atomic-number=\\\"39\\\"> <natural-abundance> <mass value=\\\"88.90585\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"89\\\"> <mass value=\\\"88.9058485\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Zr\\\" atomic-number=\\\"40\\\"> <natural-abundance> <mass value=\\\"91.224\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"90\\\"> <mass value=\\\"89.9047022\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"0.5145\\\" error=\\\"0.0040\\\" /> </isotope> <isotope mass-number=\\\"91\\\"> <mass value=\\\"90.9056434\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1122\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.9050386\\\" error=\\\"0.0000023\\\" /> <abundance value=\\\"0.1715\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9063144\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.1738\\\" error=\\\"0.0028\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.908275\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0280\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nb\\\" atomic-number=\\\"41\\\"> <natural-abundance> <mass value=\\\"92.90638\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"93\\\"> <mass value=\\\"92.9063762\\\" error=\\\"0.0000024\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Mo\\\" atomic-number=\\\"42\\\"> <natural-abundance> <mass value=\\\"95.94\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"92\\\"> <mass value=\\\"91.906810\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.1477\\\" error=\\\"0.0031\\\" /> </isotope> <isotope mass-number=\\\"94\\\"> <mass value=\\\"93.9050867\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0923\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"95\\\"> <mass value=\\\"94.9058406\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1590\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.9046780\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1668\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"97\\\"> <mass value=\\\"96.9030201\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0956\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.9054069\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.2419\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.907476\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0967\\\" error=\\\"0.0020\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ru\\\" atomic-number=\\\"44\\\"> <natural-abundance> <mass value=\\\"101.07\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"96\\\"> <mass value=\\\"95.907604\\\" error=\\\"0.000009\\\" /> <abundance value=\\\"0.0554\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"98\\\"> <mass value=\\\"97.905287\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.0187\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"99\\\"> <mass value=\\\"98.9059385\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\".01276\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"100\\\"> <mass value=\\\"99.9042189\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1260\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"101\\\"> <mass value=\\\"100.9055815\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.1706\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.9043488\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.3155\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.905430\\\" error=\\\".01862\\\" /> <abundance value=\\\"0.1862\\\" error=\\\"0.0027\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Rh\\\" atomic-number=\\\"45\\\"> <natural-abundance> <mass value=\\\"1025.90550\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"103\\\"> <mass value=\\\"102.905504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pd\\\" atomic-number=\\\"46\\\"> <natural-abundance> <mass value=\\\"106.42\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"102\\\"> <mass value=\\\"101.905607\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0102\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"104\\\"> <mass value=\\\"103.904034\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.1114\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"105\\\"> <mass value=\\\"104.905083\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2233\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.903484\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.2733\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.903895\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.2646\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.905153\\\" error=\\\"0.000012\\\" /> <abundance value=\\\"0.1172\\\" error=\\\"0.0009\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ag\\\" atomic-number=\\\"47\\\"> <natural-abundance> <mass value=\\\"107.8682\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"107\\\"> <mass value=\\\"106.905093\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.51839\\\" error=\\\"0.00008\\\" /> </isotope> <isotope mass-number=\\\"109\\\"> <mass value=\\\"108.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.48161\\\" error=\\\"0.00008\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cd\\\" atomic-number=\\\"48\\\"> <natural-abundance> <mass value=\\\"112.411\\\" error=\\\"0.008\\\" /> <isotope mass-number=\\\"106\\\"> <mass value=\\\"105.906458\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0125\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"108\\\"> <mass value=\\\"107.904183\\\" error=\\\"0.000006\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"110\\\"> <mass value=\\\"109.903006\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1249\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"111\\\"> <mass value=\\\"110.904182\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1280\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.9027577\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2413\\\" error=\\\"0.0021\\\" /> </isotope> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.9044014\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1222\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.9033586\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.2873\\\" error=\\\"0.0042\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.904756\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0749\\\" error=\\\"0.0018\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"In\\\" atomic-number=\\\"49\\\"> <natural-abundance> <mass value=\\\"114.818\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"113\\\"> <mass value=\\\"112.904062\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0429\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903879\\\" error=\\\"0.000040\\\" /> <abundance value=\\\"0.9571\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sn\\\" atomic-number=\\\"50\\\"> <natural-abundance> <mass value=\\\"118.710\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"112\\\"> <mass value=\\\"111.904822\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0097\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"114\\\"> <mass value=\\\"113.902783\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0066\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"115\\\"> <mass value=\\\"114.903347\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0034\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"116\\\"> <mass value=\\\"115.901745\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1454\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"117\\\"> <mass value=\\\"116.902955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0768\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"118\\\"> <mass value=\\\"117.901608\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2422\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"119\\\"> <mass value=\\\"118.903311\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0859\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.9021985\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3258\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9034411\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0463\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9052745\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.0579\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sb\\\" atomic-number=\\\"51\\\"> <natural-abundance> <mass value=\\\"121.760\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"121\\\"> <mass value=\\\"120.9038222\\\" error=\\\"0.0000026\\\" /> <abundance value=\\\"0.5721\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042160\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.4279\\\" error=\\\"0.0005\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Te\\\" atomic-number=\\\"52\\\"> <natural-abundance> <mass value=\\\"127.60\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"120\\\"> <mass value=\\\"119.904026\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.0009\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"122\\\"> <mass value=\\\"121.9030558\\\" error=\\\"0.0000029\\\" /> <abundance value=\\\"0.0255\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"123\\\"> <mass value=\\\"122.9042711\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0089\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9028188\\\" error=\\\"0.0000016\\\" /> <abundance value=\\\"0.0474\\\" error=\\\"0.0014\\\" /> </isotope> <isotope mass-number=\\\"125\\\"> <mass value=\\\"124.9044241\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.0707\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.9033049\\\" error=\\\"0.0000020\\\" /> <abundance value=\\\"0.1884\\\" error=\\\"0.0025\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9044615\\\" error=\\\"0.0000019\\\" /> <abundance value=\\\"0.3174\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9062229\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.3408\\\" error=\\\"0.0062\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"I\\\" atomic-number=\\\"53\\\"> <natural-abundance> <mass value=\\\"126.90447\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"127\\\"> <mass value=\\\"126.904468\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Xe\\\" atomic-number=\\\"54\\\"> <natural-abundance> <mass value=\\\"131.293\\\" error=\\\"0.006\\\" /> <isotope mass-number=\\\"124\\\"> <mass value=\\\"123.9058954\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.000952\\\" error=\\\"0.000003\\\" /> </isotope> <isotope mass-number=\\\"126\\\"> <mass value=\\\"125.904268\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.000890\\\" error=\\\"0.000002\\\" /> </isotope> <isotope mass-number=\\\"128\\\"> <mass value=\\\"127.9035305\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.019102\\\" error=\\\"0.000008\\\" /> </isotope> <isotope mass-number=\\\"129\\\"> <mass value=\\\"128.9047799\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.264006\\\" error=\\\"0.000082\\\" /> </isotope> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.9035089\\\" error=\\\"0.0000011\\\" /> <abundance value=\\\"0.040710\\\" error=\\\"0.000013\\\" /> </isotope> <isotope mass-number=\\\"131\\\"> <mass value=\\\"130.9050828\\\" error=\\\"0.0000018\\\" /> <abundance value=\\\"0.212324\\\" error=\\\"0.000030\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.9041546\\\" error=\\\"0.0000015\\\" /> <abundance value=\\\"0.269086\\\" error=\\\"0.000033\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.9053945\\\" error=\\\"0.0000009\\\" /> <abundance value=\\\"0.104357\\\" error=\\\"0.000021\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907220\\\" error=\\\"0.000008\\\" /> <abundance value=\\\"0.088573\\\" error=\\\"0.000044\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Cs\\\" atomic-number=\\\"55\\\"> <natural-abundance> <mass value=\\\"132.90545\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"133\\\"> <mass value=\\\"132.905447\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ba\\\" atomic-number=\\\"56\\\"> <natural-abundance> <mass value=\\\"137.327\\\" error=\\\"0.007\\\" /> <isotope mass-number=\\\"130\\\"> <mass value=\\\"129.906311\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00106\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"132\\\"> <mass value=\\\"131.905056\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00101\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"134\\\"> <mass value=\\\"133.904504\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02417\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"135\\\"> <mass value=\\\"134.905684\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.000003\\\" error=\\\"0.00012\\\" /> </isotope> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.904571\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.07854\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"137\\\"> <mass value=\\\"136.905822\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.11232\\\" error=\\\"0.00024\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905242\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.71698\\\" error=\\\"0.00042\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"La\\\" atomic-number=\\\"57\\\"> <natural-abundance> <mass value=\\\"138.9055\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.907108\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00090\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"139\\\"> <mass value=\\\"138.906349\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.99910\\\" error=\\\"0.00001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ce\\\" atomic-number=\\\"58\\\"> <natural-abundance> <mass value=\\\"140.116\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"136\\\"> <mass value=\\\"135.907140\\\" error=\\\"0.000050\\\" /> <abundance value=\\\"0.00185\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"138\\\"> <mass value=\\\"137.905986\\\" error=\\\"0.000011\\\" /> <abundance value=\\\"0.00251\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"140\\\"> <mass value=\\\"139.905\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.88450\\\" error=\\\"0.00051\\\" /> </isotope> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.909241\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.11114\\\" error=\\\"0.00051\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pr\\\" atomic-number=\\\"59\\\"> <natural-abundance> <mass value=\\\"140.90765\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"141\\\"> <mass value=\\\"140.907648\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Nd\\\" atomic-number=\\\"60\\\"> <natural-abundance> <mass value=\\\"144.24\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"142\\\"> <mass value=\\\"141.907719\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.272\\\" error=\\\"0.005\\\" /> </isotope> <isotope mass-number=\\\"143\\\"> <mass value=\\\"142.909810\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.122\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.910083\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.238\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"145\\\"> <mass value=\\\"144.912569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.083\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"146\\\"> <mass value=\\\"145.913113\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.172\\\" error=\\\"0.003\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.916889\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.057\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.920887\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.056\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Sm\\\" atomic-number=\\\"62\\\"> <natural-abundance> <mass value=\\\"150.36\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"144\\\"> <mass value=\\\"143.911996\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0307\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"147\\\"> <mass value=\\\"146.914894\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1499\\\" error=\\\"0.0018\\\" /> </isotope> <isotope mass-number=\\\"148\\\"> <mass value=\\\"147.914818\\\" error=\\\"0.1124\\\" /> <abundance value=\\\"0.1124\\\" error=\\\"0.0010\\\" /> </isotope> <isotope mass-number=\\\"149\\\"> <mass value=\\\"148.917180\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1382\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"150\\\"> <mass value=\\\"149.917272\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0738\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919729\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2675\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.922206\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2275\\\" error=\\\"0.0029\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Eu\\\" atomic-number=\\\"63\\\"> <natural-abundance> <mass value=\\\"151.964\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"151\\\"> <mass value=\\\"150.919846\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.4781\\\" error=\\\"0.0006\\\" /> </isotope> <isotope mass-number=\\\"153\\\"> <mass value=\\\"152.921227\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.5219\\\" error=\\\"0.0006\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Gd\\\" atomic-number=\\\"64\\\"> <natural-abundance> <mass value=\\\"157.25\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"152\\\"> <mass value=\\\"151.919789\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0020\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"154\\\"> <mass value=\\\"153.920862\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0218\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"155\\\"> <mass value=\\\"154.922619\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1480\\\" error=\\\"0.0012\\\" /> </isotope> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.922120\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2047\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"157\\\"> <mass value=\\\"156.923957\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1565\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924101\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2484\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.927051\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2186\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tb\\\" atomic-number=\\\"65\\\"> <natural-abundance> <mass value=\\\"158.92534\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"159\\\"> <mass value=\\\"158.925343\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Dy\\\" atomic-number=\\\"66\\\"> <natural-abundance> <mass value=\\\"162.500\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"156\\\"> <mass value=\\\"155.924278\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00056\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"158\\\"> <mass value=\\\"157.924405\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00095\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"160\\\"> <mass value=\\\"159.925194\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.02329\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"161\\\"> <mass value=\\\"160.926930\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.18889\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.926795\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25475\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"163\\\"> <mass value=\\\"162.928728\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.24896\\\" error=\\\"0.00042\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929171\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.28260\\\" error=\\\"0.00054\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ho\\\" atomic-number=\\\"67\\\"> <natural-abundance> <mass value=\\\"164.93032\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"165\\\"> <mass value=\\\"164.930319\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Er\\\" atomic-number=\\\"68\\\"> <natural-abundance> <mass value=\\\"167.259\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"162\\\"> <mass value=\\\"161.928775\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00139\\\" error=\\\"0.00005\\\" /> </isotope> <isotope mass-number=\\\"164\\\"> <mass value=\\\"163.929197\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.01601\\\" error=\\\"0.00003\\\" /> </isotope> <isotope mass-number=\\\"166\\\"> <mass value=\\\"165.930290\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33503\\\" error=\\\"0.00036\\\" /> </isotope> <isotope mass-number=\\\"167\\\"> <mass value=\\\"166.932046\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.22869\\\" error=\\\"0.00009\\\" /> </isotope> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.932368\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.26978\\\" error=\\\"0.00018\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.935461\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.14910\\\" error=\\\"0.00036\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tm\\\" atomic-number=\\\"69\\\"> <natural-abundance> <mass value=\\\"168.93421\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"169\\\"> <mass value=\\\"168.934211\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Yb\\\" atomic-number=\\\"70\\\"> <natural-abundance> <mass value=\\\"173.04\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"168\\\"> <mass value=\\\"167.933895\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0013\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"170\\\"> <mass value=\\\"169.934759\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0304\\\" error=\\\"0.0015\\\" /> </isotope> <isotope mass-number=\\\"171\\\"> <mass value=\\\"170.936323\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1428\\\" error=\\\"0.0057\\\" /> </isotope> <isotope mass-number=\\\"172\\\"> <mass value=\\\"171.936378\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2183\\\" error=\\\"0.0067\\\" /> </isotope> <isotope mass-number=\\\"173\\\"> <mass value=\\\"172.938207\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1613\\\" error=\\\"0.0027\\\" /> </isotope> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.938858\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3183\\\" error=\\\"0.0092\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.942569\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1276\\\" error=\\\"0.0041\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Lu\\\" atomic-number=\\\"71\\\"> <natural-abundance> <mass value=\\\"174.967\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"175\\\"> <mass value=\\\"174.9407682\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.9741\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.9426827\\\" error=\\\"0.0000028\\\" /> <abundance value=\\\"0.0259\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hf\\\" atomic-number=\\\"72\\\"> <natural-abundance> <mass value=\\\"178.49\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"174\\\"> <mass value=\\\"173.940042\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0016\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"176\\\"> <mass value=\\\"175.941403\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0526\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"177\\\"> <mass value=\\\"176.9432204\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1860\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"178\\\"> <mass value=\\\"177.9436981\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.2728\\\" error=\\\"0.0007\\\" /> </isotope> <isotope mass-number=\\\"179\\\"> <mass value=\\\"178.9488154\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.1362\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.9465488\\\" error=\\\"0.0000027\\\" /> <abundance value=\\\"0.3508\\\" error=\\\"0.0016\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ta\\\" atomic-number=\\\"73\\\"> <natural-abundance> <mass value=\\\"180.9479\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.947466\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.00012\\\" error=\\\"0.00002\\\" /> </isotope> <isotope mass-number=\\\"181\\\"> <mass value=\\\"180.947996\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.99988\\\" error=\\\"0.00002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"W\\\" atomic-number=\\\"74\\\"> <natural-abundance> <mass value=\\\"183.84\\\" error=\\\"0.01\\\" /> <isotope mass-number=\\\"180\\\"> <mass value=\\\"179.946706\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.0012\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"182\\\"> <mass value=\\\"181.948205\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.265\\\" error=\\\"0.0016\\\" /> </isotope> <isotope mass-number=\\\"183\\\"> <mass value=\\\"182.9502242\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1431\\\" error=\\\"0.0004\\\" /> </isotope> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.9509323\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.3064\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.954362\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2843\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Re\\\" atomic-number=\\\"75\\\"> <natural-abundance> <mass value=\\\"186.207\\\" error=\\\"0.001\\\" /> <isotope mass-number=\\\"185\\\"> <mass value=\\\"184.952955\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.3740\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557505\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.6260\\\" error=\\\"0.0002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Os\\\" atomic-number=\\\"76\\\"> <natural-abundance> <mass value=\\\"190.23\\\" error=\\\"0.03\\\" /> <isotope mass-number=\\\"184\\\"> <mass value=\\\"183.952491\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0002\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"186\\\"> <mass value=\\\"185.953838\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0159\\\" error=\\\"0.0003\\\" /> </isotope> <isotope mass-number=\\\"187\\\"> <mass value=\\\"186.9557476\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.0196\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"188\\\"> <mass value=\\\"187.9558357\\\" error=\\\"0.0000030\\\" /> <abundance value=\\\"0.1324\\\" error=\\\"0.0008\\\" /> </isotope> <isotope mass-number=\\\"189\\\"> <mass value=\\\"188.958145\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1615\\\" error=\\\"0.0005\\\" /> </isotope> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.958445\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2626\\\" error=\\\"0.0002\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961479\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.4078\\\" error=\\\"0.0019\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Ir\\\" atomic-number=\\\"77\\\"> <natural-abundance> <mass value=\\\"192.217\\\" error=\\\"0.003\\\" /> <isotope mass-number=\\\"191\\\"> <mass value=\\\"190.960591\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.373\\\" error=\\\"0.002\\\" /> </isotope> <isotope mass-number=\\\"193\\\"> <mass value=\\\"192.962923\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.627\\\" error=\\\"0.002\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pt\\\" atomic-number=\\\"78\\\"> <natural-abundance> <mass value=\\\"195.078\\\" error=\\\"0.002\\\" /> <isotope mass-number=\\\"190\\\"> <mass value=\\\"189.959930\\\" error=\\\"0.000007\\\" /> <abundance value=\\\"0.00014\\\" error=\\\"0.00001\\\" /> </isotope> <isotope mass-number=\\\"192\\\"> <mass value=\\\"191.961035\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.00782\\\" error=\\\"0.00007\\\" /> </isotope> <isotope mass-number=\\\"194\\\"> <mass value=\\\"193.962663\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.32967\\\" error=\\\"0.00099\\\" /> </isotope> <isotope mass-number=\\\"195\\\"> <mass value=\\\"194.964774\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.33832\\\" error=\\\"0.00010\\\" /> </isotope> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.964934\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.25242\\\" error=\\\"0.00041\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.967875\\\" error=\\\"0.000005\\\" /> <abundance value=\\\"0.07163\\\" error=\\\"0.00055\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Au\\\" atomic-number=\\\"79\\\"> <natural-abundance> <mass value=\\\"196.96655\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"197\\\"> <mass value=\\\"196.966551\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Hg\\\" atomic-number=\\\"80\\\"> <natural-abundance> <mass value=\\\"200.59\\\" error=\\\"0.02\\\" /> <isotope mass-number=\\\"196\\\"> <mass value=\\\"195.965814\\\" error=\\\"0.000004\\\" /> <abundance value=\\\"0.0015\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"198\\\"> <mass value=\\\"197.966752\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0997\\\" error=\\\"0.0020\\\" /> </isotope> <isotope mass-number=\\\"199\\\"> <mass value=\\\"198.968262\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1687\\\" error=\\\"0.0022\\\" /> </isotope> <isotope mass-number=\\\"200\\\"> <mass value=\\\"199.968309\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2310\\\" error=\\\"0.0019\\\" /> </isotope> <isotope mass-number=\\\"201\\\"> <mass value=\\\"200.970285\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.1318\\\" error=\\\"0.0009\\\" /> </isotope> <isotope mass-number=\\\"202\\\"> <mass value=\\\"201.970625\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2986\\\" error=\\\"0.0026\\\" /> </isotope> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973475\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.0687\\\" error=\\\"0.0015\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Tl\\\" atomic-number=\\\"81\\\"> <natural-abundance> <mass value=\\\"204.3833\\\" error=\\\"0.0002\\\" /> <isotope mass-number=\\\"203\\\"> <mass value=\\\"202.972329\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.2952\\\" error=\\\"0.0001\\\" /> </isotope> <isotope mass-number=\\\"205\\\"> <mass value=\\\"204.974412\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.7048\\\" error=\\\"0.0001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pb\\\" atomic-number=\\\"82\\\"> <natural-abundance> <mass value=\\\"207.2\\\" error=\\\"0.1\\\" /> <isotope mass-number=\\\"204\\\"> <mass value=\\\"203.973028\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.014\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"206\\\"> <mass value=\\\"205.974449\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.241\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"207\\\"> <mass value=\\\"206.975880\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.221\\\" error=\\\"0.001\\\" /> </isotope> <isotope mass-number=\\\"208\\\"> <mass value=\\\"207.976636\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"0.524\\\" error=\\\"0.001\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Bi\\\" atomic-number=\\\"83\\\"> <natural-abundance> <mass value=\\\"208.98038\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"209\\\"> <mass value=\\\"208.980384\\\" error=\\\"0.000003\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Th\\\" atomic-number=\\\"90\\\"> <natural-abundance> <mass value=\\\"232.0381\\\" error=\\\"0.0001\\\" /> <isotope mass-number=\\\"232\\\"> <mass value=\\\"232.0380495\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"Pa\\\" atomic-number=\\\"91\\\"> <natural-abundance> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <isotope mass-number=\\\"231\\\"> <mass value=\\\"231.03588\\\" error=\\\"0.00002\\\" /> <abundance value=\\\"1\\\" error=\\\"0\\\" /> </isotope> </natural-abundance> </entry><entry symbol=\\\"U\\\" atomic-number=\\\"92\\\"> <natural-abundance> <mass value=\\\"238.02891\\\" error=\\\"0.00003\\\" /> <isotope mass-number=\\\"234\\\"> <mass value=\\\"234.0409447\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.000054\\\" error=\\\"0.000005\\\" /> </isotope> <isotope mass-number=\\\"235\\\"> <mass value=\\\"235.0439222\\\" error=\\\"0.0000021\\\" /> <abundance value=\\\"0.007204\\\" error=\\\"0.000006\\\" /> </isotope> <isotope mass-number=\\\"238\\\"> <mass value=\\\"238.0507835\\\" error=\\\"0.0000022\\\" /> <abundance value=\\\"0.992742\\\" error=\\\"0.000010\\\" /> </isotope> </natural-abundance> </entry></atomic-mass-table>\";\n try {\n// this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);\n this.document = XMLParser.parse(xmlContent);\n } catch (Exception e) {\n throw new RuntimeException(\"Error reading atomic_system.xml.\");\n }\n\n NodeList nodes = document.getElementsByTagName(\"entry\");\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n String symbol = node.getAttributes().getNamedItem(\"symbol\").getNodeValue();\n\n entries.put(symbol, new Entry(node));\n }\n }", "public Element convertToXML(Document document) {\n\t\tElement drillTag = document.createElement(XMLConstants.DRILL);\n\t\t\n\t\t//add the tempo changes\n\t\tSet<Integer> tempoKeys = tempoHashMap.keySet();\n\t\tIterator<Integer> tempoIterator = tempoKeys.iterator();\n\t\twhile (tempoIterator.hasNext()) {\n\t\t\t//get the measure number\n\t\t\tInteger measureNumber = tempoIterator.next();\n\t\t\t\n\t\t\t//create the tempo change parent\n\t\t\tElement tempoChangeTag = document.createElement(XMLConstants.TEMPO_CHANGE);\n\t\t\tdrillTag.appendChild(tempoChangeTag);\n\t\t\t\n\t\t\t//create the measure number child\n\t\t\tElement measureNumberTag = document.createElement(XMLConstants.MEASURE_NUMBER);\n\t\t\ttempoChangeTag.appendChild(measureNumberTag);\n\t\t\t\n\t\t\t//give the measure tag a value\n\t\t\tText measureNumberText = document.createTextNode(measureNumber.toString());\n\t\t\tmeasureNumberTag.appendChild(measureNumberText);\n\t\t\t\n\t\t\t//create the tempo child\n\t\t\tElement tempoTag = document.createElement(XMLConstants.TEMPO);\n\t\t\ttempoChangeTag.appendChild(tempoTag);\n\t\t\t\n\t\t\t//give the tempo tag a value\n\t\t\tText tempoText = document.createTextNode(tempoHashMap.get(measureNumber).toString());\n\t\t\ttempoTag.appendChild(tempoText);\n\t\t}\n\t\t\n\t\t//add the counts per measure changes\n\t\tSet<Integer> countsKeys = countsHashMap.keySet();\n\t\tIterator<Integer> countsIterator = countsKeys.iterator();\n\t\twhile (countsIterator.hasNext()) {\n\t\t\t//get the measure number\n\t\t\tInteger measureNumber = countsIterator.next();\n\t\t\t\n\t\t\t//create the counts per measure change change parent\n\t\t\tElement countsChangeTag = document.createElement(XMLConstants.COUNT_PER_MEASURE_CHANGE);\n\t\t\tdrillTag.appendChild(countsChangeTag);\n\t\t\t\n\t\t\t//create the measure number child\n\t\t\tElement measureNumberTag = document.createElement(XMLConstants.MEASURE_NUMBER);\n\t\t\tcountsChangeTag.appendChild(measureNumberTag);\n\t\t\t\n\t\t\t//give the measure tag a value\n\t\t\tText measureNumberText = document.createTextNode(measureNumber.toString());\n\t\t\tmeasureNumberTag.appendChild(measureNumberText);\n\t\t\t\n\t\t\t//create the counts per measure child\n\t\t\tElement countsTag = document.createElement(XMLConstants.COUNT_PER_MEASURE);\n\t\t\tcountsChangeTag.appendChild(countsTag);\n\t\t\t\n\t\t\t//give the counts per measuretag a value\n\t\t\tText countsText = document.createTextNode(countsHashMap.get(measureNumber).toString());\n\t\t\tcountsTag.appendChild(countsText);\n\t\t}\n\t\t\n\t\t//add the moves to the xml document\n\t\tfor (int i = 0; i < moves.size(); i++) {\n\t\t\tElement moveElement = moves.get(i).convertToXML(document, i);\n\t\t\tdrillTag.appendChild(moveElement);\n\t\t}\n\t\t\n\t\treturn drillTag;\n\t}", "public void transformToSecondXml();", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public static void main(List<String> header, List<String> items, Integer itemCount, String folder) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd' 'HH:mm:ss.SSS\");\n String nowDate =sdf.format(new Date());\n\n ///Calculate a ship date (2 days from current?)\n Date date = new Date();\n long twoDaysFromNowTime = date.getTime();\n twoDaysFromNowTime = twoDaysFromNowTime +\n (1000 * 60 * 60 * 24 * 2);\n Date twoDaysFromNow = new Date(twoDaysFromNowTime);\n String twoDate =sdf.format(twoDaysFromNow);\n\n // Create a random number for Tracking reference\n long randomnumber = System.currentTimeMillis();\n String trkRef = String.valueOf(randomnumber);\n trkRef = (\"TRKNO\" +trkRef);\n\n for(int i = 0; i < header.size(); i++) {\n System.out.println(\"itemCount from XML \" +itemCount);\n }\n\n try {\n\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n // root elements **FIXED VALUE**\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Update_WCS_OrderStatus\");\n doc.appendChild(rootElement);\n\n // Control **CONTROL NODE**\n Element control = doc.createElement(\"ControlArea\");\n rootElement.appendChild(control);\n\n // verb **FIXED VALUE**\n Element verb = doc.createElement(\"Verb\");\n verb.appendChild(doc.createTextNode(\"Update\"));\n control.appendChild(verb);\n\n // noun **FIXED VALUE**\n Element noun = doc.createElement(\"Noun\");\n noun.appendChild(doc.createTextNode(\"WCS_OrderStatus\"));\n control.appendChild(noun);\n\n // DataArea **CONTROL NODE**\n Element dataarea = doc.createElement(\"DataArea\");\n dataarea.appendChild(doc.createTextNode(\"\"));\n rootElement.appendChild(dataarea);\n\n // Order Status **CONTROL NODE**\n Element orderstatus = doc.createElement(\"OrderStatus\");\n orderstatus.appendChild(doc.createTextNode(\"\"));\n dataarea.appendChild(orderstatus);\n\n//** Order Status Header elements **/\n // Order Status Header **CONTROL NODE**\n Element orderstatusheader = doc.createElement(\"OrderStatusHeader\");\n orderstatusheader.appendChild(doc.createTextNode(\"\"));\n orderstatus.appendChild(orderstatusheader);\n\n /** Order Number **DYNAMIC VALUE**\n **/\n Element ordernumber = doc.createElement(\"OrderNumber\");\n ordernumber.appendChild(doc.createTextNode(header.get(0)));\n orderstatusheader.appendChild(ordernumber);\n ordernumber.setAttribute(\"type\", \"ByWCS\");\n\n /** Total Header Pricing\n * (Currency) **DYNAMIC VALUES**\n **/\n Element totalpriceinfoheader = doc.createElement(\"TotalPriceInfo\");\n orderstatusheader.appendChild(totalpriceinfoheader);\n totalpriceinfoheader.setAttribute(\"currency\", (header.get(1)));\n\n /** Total Net Price **DYNAMIC VALUES**\n **/\n Element totalnetpriceheader = doc.createElement(\"TotalNetPrice\");\n totalnetpriceheader.appendChild(doc.createTextNode(header.get(2)));\n totalpriceinfoheader.appendChild(totalnetpriceheader);\n\n /** Total Ship Price **DYNAMIC VALUES**\n **/\n Element totalshippingpriceheader = doc.createElement(\"TotalShippingPrice\");\n totalshippingpriceheader.appendChild(doc.createTextNode(header.get(3)));\n totalpriceinfoheader.appendChild(totalshippingpriceheader);\n\n /** Total Selling Price **DYNAMIC VALUES**\n **/\n Element totalsellingpriceheader = doc.createElement(\"TotalSellingPrice\");\n totalsellingpriceheader.appendChild(doc.createTextNode(header.get(4))); totalpriceinfoheader.appendChild(totalsellingpriceheader);\n\n // Order Status **FIXED VALUE**\n Element headerstatus = doc.createElement(\"Status\");\n headerstatus.appendChild(doc.createTextNode(\"S\"));\n orderstatusheader.appendChild(headerstatus);\n\n // Order Date **RUNTIME VARIABLE**\n Element placeddate = doc.createElement(\"PlacedDate\");\n placeddate.appendChild(doc.createTextNode(nowDate));\n orderstatusheader.appendChild(placeddate);\n\n // The 4 Blank customer fields ** FIXED **/\n Element cf1 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf1);\n Element cf2 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf2);\n Element cf3 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf3);\n Element cf4 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf4);\n\n//** Order Status Item elements **/\n int itemArrayCount = 0;\n for (int i = 0; i < itemCount; i++) {\n // Order Status Item **CONTROL NODE**\n Element orderstatusitem = doc.createElement(\"OrderStatusItem\");\n orderstatusitem.appendChild(doc.createTextNode(\"\"));\n orderstatus.appendChild(orderstatusitem);\n\n // Item Number WCS Value that cannot be got at. Fixed to '9999999' for now.\n Element itemnumber = doc.createElement(\"ItemNumber\");\n itemnumber.appendChild(doc.createTextNode(items.get(0 + itemArrayCount)));\n orderstatusitem.appendChild(itemnumber);\n itemnumber.setAttribute(\"type\", \"ByWCS\");\n\n /** Product Number By Merchant (SKU) **DYNAMIC VALUES**\n **/\n Element productnumberbymerchant = doc.createElement(\"ProductNumberByMerchant\");\n productnumberbymerchant.appendChild(doc.createTextNode(items.get(1 + itemArrayCount)));\n orderstatusitem.appendChild(productnumberbymerchant);\n\n // Quantity Info **CONTROL NODE**\n Element quantityinfo = doc.createElement(\"QuantityInfo\");\n orderstatusitem.appendChild(quantityinfo);\n\n /** Shipped Quantity **DYNAMIC VALUES**\n **/\n Element shippedquantity = doc.createElement(\"ShippedQuantity\");\n String itemQty = String.valueOf(items.get(2 + itemArrayCount).split(\"\\\\.\")[0]);\n shippedquantity.appendChild(doc.createTextNode(itemQty));\n quantityinfo.appendChild(shippedquantity);\n\n /** Total Item Pricing\n * (Currency) **DYNAMIC VALUE**\n **/\n Element totalpriceinfoitem = doc.createElement(\"TotalPriceInfo\");\n orderstatusitem.appendChild(totalpriceinfoitem);\n totalpriceinfoitem.setAttribute(\"currency\", (header.get(1 )));\n\n /** Item Price **DYNAMIC VALUE**\n **/\n Element totalnetpriceitem = doc.createElement(\"TotalNetPrice\");\n totalnetpriceitem.appendChild(doc.createTextNode(items.get(3 + itemArrayCount)));\n totalpriceinfoitem.appendChild(totalnetpriceitem);\n\n // Shipping Price **FIXED VALUE**\n Element totalshippingpriceitem = doc.createElement(\"TotalShippingPrice\");\n totalshippingpriceitem.appendChild(doc.createTextNode(\"0.00\"));\n totalpriceinfoitem.appendChild(totalshippingpriceitem);\n\n /** Item Price **DYNAMIC VALUE**\n **/\n Element totalsellingpriceitem = doc.createElement(\"TotalSellingPrice\");\n totalsellingpriceitem.appendChild(doc.createTextNode(items.get(3 + itemArrayCount)));\n totalpriceinfoitem.appendChild(totalsellingpriceitem);\n\n // Item status **FIXED VALUE**\n Element itemstatus = doc.createElement(\"Status\");\n itemstatus.appendChild(doc.createTextNode(\"S\"));\n orderstatusitem.appendChild(itemstatus);\n\n // Shipping Info **CONTROL NODE**\n Element shippinginfo = doc.createElement(\"ShippingInfo\");\n orderstatusitem.appendChild(shippinginfo);\n\n // Ship Date **RUN TIME VARIABLE**\n Element shippeddate = doc.createElement(\"ActualShipDate\");\n shippeddate.appendChild(doc.createTextNode(twoDate));\n shippinginfo.appendChild(shippeddate);\n\n // Ship Date **RUN TIME VARIABLE**\n Element trackingreference = doc.createElement(\"TrackingReference\");\n trackingreference.appendChild(doc.createTextNode(trkRef));\n orderstatusitem.appendChild(trackingreference);\n\n // Carrier **FIXED VALUE**\n Element carreier = doc.createElement(\"Carrier\");\n carreier.appendChild(doc.createTextNode(\"PNT\"));\n orderstatusitem.appendChild(carreier);\n itemArrayCount = (i+1) * 4;\n }\n\n // write the content into xml file\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Update_WCS_OrderStatus_30.dtd\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"7\");\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(new File(\"Q:/Testing/Results/\" +folder+ \"/OR03_\"+header.get(0) +\".xml\"));\n\n // Output to console for testing\n //StreamResult result = new StreamResult(System.out);\n\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n }", "@Parameters({ \"Test\", \"env\", \"Parallel\" })\n\t@Test\n\tpublic void createXMLfile(String Test, String env, @Optional(\"false\") Boolean parallel) throws IOException {\n\n\t\tExcel_Handling excel = new Excel_Handling();\n\t\tTimestamp timestamp = new Timestamp(System.currentTimeMillis());\n Instant instant = timestamp.toInstant();\n \n String timeStampString = instant.toString();\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\t//SimpleDateFormat formatter = new SimpleDateFormat(\"ddMMyyyyHHmm\"); \n\t\t//Date date = new Date(); \n\t\tFile dataSheet = null;\n\t\tFile dataSheetResult = null;\n\t\tString nameReport = null;\n\t\t\n\t\tnameReport = env+Test+\".html\";\n\t\t//nameReport = env+Test+formatter.format(date)+\".html\";\n\t\t\t\t\n\t\tif (Test.equalsIgnoreCase(\"RegressionIBM\")) {\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_Regression_IBM.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_RegressionIBM_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"RegressionBP\")) {\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_Regression_BP.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Regression_BP_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"SanityBP\")) {\n\t\t\tSystem.out.println(\"SanityBP reader done!\");\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_SanityBP.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Sanity_ResultBP.xlsx\").getFile());\n\t\t\tnameReport = \"SanityBPParallel.html\";\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"SanityIBM\")) {\n\t\t\tSystem.out.println(\"SanityIBM reader done!\");\n\t\t\tdataSheet = new File(classLoader.getResource(\"Datasheet_SanityIBM.xlsx\").getFile());\n\t\t\tdataSheetResult = new File(classLoader.getResource(\"Datasheet_Sanity_ResultIBM.xlsx\").getFile());\n\t\t\tnameReport = \"SanityIBMParallel.html\";\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_IBM\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_IBM.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_IBM_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_BP\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_BP.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_BP_Result.xlsx\").getFile());\n\t\t}\n\t\tif (Test.equalsIgnoreCase(\"Legal_Min\"))\n\t\t{\n\t\t\t dataSheet = new File(classLoader.getResource(\"Datasheet_Legal_Min.xlsx\").getFile());\n\t\t\t dataSheetResult = new File(classLoader.getResource(\"Datasheet_Legal_Min_Result.xlsx\").getFile());\n\t\t}\n\t\ttry {\n\t\t\texcel.ExcelReader(dataSheet.getAbsolutePath(), \"Data\", dataSheetResult.getAbsolutePath(), \"Data\");\n\t\t\texcel.getExcelDataAll(\"Data\", \"Execute\", \"Y\", \"TC_ID\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"excel reader done!\");\n\t\tSystem.out.println(\"test env is \" + env);\n\n\t\tMap<String, HashMap<String, String>> map = Excel_Handling.TestData;\n\t\t// creation of the testng xml based on parameters/data\n\t\tTestNG testNG = new TestNG();\n\t\tReport_Setup.getInstance();\n\t\tReport_Setup.setReportName(nameReport);\n\t\t\n\t\tXmlSuite suite = new XmlSuite();\n\t\tif (parallel) {\n\t\t\tsuite.setParallel(ParallelMode.TESTS);\n\t\t}\n\t\tfor (String key : map.keySet()) {\n\t\t\tFile configFile = new File(classLoader.getResource(\"Config.xml\").getFile());\n\t\t\tSystem.out.println(\"configFile:: \" + configFile.getAbsolutePath());\n\t\t\tfinal Common_Functions commonFunctions = new Common_Functions();\n\t\t\tsuite.setName(commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), \"Regression_Suite_Name\"));\n\t\t\tXmlTest test = new XmlTest(suite);\n\t\t\ttest.setName(key);\n\t\t\ttest.setPreserveOrder(\"true\");\n\t\t\ttest.addParameter(\"browserType\", Excel_Handling.Get_Data(key, \"Browser_Type\"));\n\t\t\ttest.addParameter(\"tcID\", key);\n\t\t\ttest.addParameter(\"ENV\", env);\n\t\t\ttest.addParameter(\"appURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), \"AppUrl\"));\n\t\t\ttest.addParameter(\"IBMURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"IBM\"));\n\t\t\ttest.addParameter(\"PCSURL\",commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"BPDirectPCS\"));\n\t\t\ttest.addParameter(\"MySAURL\", commonFunctions.GetXMLTagValue(configFile.getAbsolutePath(), env + \"MySA\"));\n\t\t\ttest.addParameter(\"Timestamp\", timeStampString);\n\t\t\tXmlClass testClass = new XmlClass();\n\n\t\t\tif (Test.equalsIgnoreCase(\"RegressionIBM\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.RegressionIBM.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"RegressionBP\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.RegressionBP.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"SanityBP\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Sanity.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"SanityIBM\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Sanity.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_IBM\"))\t{\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_BP\")) { \n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\tif (Test.equalsIgnoreCase(\"Legal_Min\")) {\n\t\t\t\ttestClass.setName(\"com.ibm.stax.Tests.Legal.\" + Excel_Handling.Get_Data(key, \"Class_Name\"));\n\t\t\t}\n\t\t\ttest.setXmlClasses(Arrays.asList(new XmlClass[] { testClass }));\n\t\t}\n\t\tList<String> suites = new ArrayList<String>();\n\t\tfinal File f1 = new File(Create_TestNGXML.class.getProtectionDomain().getCodeSource().getLocation().getPath());\n\t\tSystem.out.println(\"f1:: \" + f1.getAbsolutePath());\n\t\tFile f = new File(\".\\\\testNG.xml\");\n\t\tf.createNewFile();\n\t\tFileWriter fw = new FileWriter(f.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(suite.toXml());\n\t\tbw.close();\n\t\tsuites.add(f.getPath());\n\t\ttestNG.setTestSuites(suites);\n\t\ttestNG.run();\n\t\tf.delete();\n\t\tReport_Setup.flush();\n\n\t}", "public static void main(String[]args){\n XMLOutputter out = new XMLOutputter();\n SAXBuilder sax = new SAXBuilder();\n\n //Objekte die gepseichert werden sollen\n Car car = new Car(\"CR-MD-5\",\"16.05.1998\",4,4,4);\n Car car2 = new Car(\"UL-M-5\",\"11.03.2002\",10,2,5);\n\n\n Element rootEle = new Element(\"cars\");\n Document doc = new Document(rootEle);\n\n //hinzufuegen des ersten autos\n Element carEle = new Element(\"car\");\n carEle.setAttribute(new Attribute(\"car\",\"1\"));\n carEle.addContent(new Element(\"licenseplate\").setText(car.getLicensePlate()));\n carEle.addContent(new Element(\"productiondate\").setText(car.getProductionDate()));\n carEle.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car.getNumberPassengers())));\n carEle.addContent(new Element(\"numberwheels\").setText(Integer.toString(car.getNumberWheels())));\n carEle.addContent(new Element(\"numberdoors\").setText(Integer.toString(car.getNumberDoors())));\n\n //hinzufuegen des zweiten autos\n Element carEle2 = new Element(\"car2\");\n carEle2.setAttribute(new Attribute(\"car2\",\"2\"));\n carEle2.addContent(new Element(\"licenseplate\").setText(car2.getLicensePlate()));\n carEle2.addContent(new Element(\"productiondate\").setText(car2.getProductionDate()));\n carEle2.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car2.getNumberPassengers())));\n carEle2.addContent(new Element(\"numberwheels\").setText(Integer.toString(car2.getNumberWheels())));\n carEle2.addContent(new Element(\"numberdoors\").setText(Integer.toString(car2.getNumberDoors())));\n\n\n doc.getRootElement().addContent(carEle);\n doc.getRootElement().addContent(carEle2);\n\n //Einstellen des Formates auf gut lesbares, eingeruecktes Format\n out.setFormat(Format.getPrettyFormat());\n //Versuche in xml Datei zu schreiben\n try {\n out.output(doc, new FileWriter(\"SaveCar.xml\"));\n } catch (IOException e) {\n System.out.println(\"Error opening File\");\n }\n\n\n //Einlesen\n\n File input = new File(\"SaveCar.xml\");\n Document inputDoc = null;\n //Versuche aus xml Datei zu lesen und Document zu instanziieren\n try {\n inputDoc = (Document) sax.build(input);\n } catch (JDOMException e) {\n System.out.println(\"An Error occured\");\n } catch (IOException e) {\n System.out.print(\"Error opening File\");\n }\n\n //Liste von Elementen der jeweiligen Autos\n List<Element> listCar = inputDoc.getRootElement().getChildren(\"car\");\n List<Element> listCar2 = inputDoc.getRootElement().getChildren(\"car2\");\n\n //Ausgabe der Objekte auf der Konsole (manuell)\n printXML(listCar);\n System.out.println();\n printXML(listCar2);\n\n //Erstellen der abgespeicherten Objekte\n Car savedCar1 = createObj(listCar);\n Car savedCar2 = createObj(listCar2);\n\n System.out.println();\n System.out.println(savedCar1);\n System.out.println();\n System.out.println(savedCar2);\n\n}", "private void addAnalysisSummary()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_summary\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n// start.addAttribute(\"xmlns\",\"\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n String tagName = mimicXpress ? \"xpressratio_summary\" : \"q3ratio_summary\";\r\n start = new SimpleStartElement(tagName);\r\n start.addAttribute(\"version\", mimicXpress ? \"0.0\" : Q3.VERSION);\r\n start.addAttribute(\"author\", Q3.AUTHOR);\r\n\r\n // ???? Must ensure format of multiples is compatible with TPP\r\n StringBuilder residues = new StringBuilder();\r\n StringBuilder specs = new StringBuilder();\r\n boolean first = true;\r\n for (IsotopicLabel label : labels.values())\r\n {\r\n residues.append(label.getResidue());\r\n if (first)\r\n first = false;\r\n else\r\n specs.append(' ');\r\n specs.append(label.getResidue());\r\n specs.append(',');\r\n specs.append(String.format(\"%f\", label.getMassDiff()));\r\n }\r\n\r\n start.addAttribute(\"labeled_residues\", residues.toString());\r\n start.addAttribute(\"massdiff\", specs.toString());\r\n\r\n start.addAttribute(\"massTol\", mimicXpress ? \"0.75\" : \".1\");\r\n\r\n if (mimicXpress)\r\n {\r\n start.addAttribute(\"same_scan_range\", \"Y\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n }\r\n\r\n add(start);\r\n\r\n end = new SimpleEndElement(tagName);\r\n add(end);\r\n\r\n addNewline();\r\n\r\n end = new SimpleEndElement(\"analysis_summary\");\r\n add(end);\r\n }", "@Test\n public void testSerializeXMLObject() {\n //Test to see if serialization is succesful for default. NOTE THIS PATH MUST BE CHANGED FOR EVERY USER!!\n //This is done in this way, without using the read operation to ensure a problem with read does not affect the serialization test.\n System.out.println(\"Testing MeasuredRatioModel's serializeXMLObject(String filename)\");\n String filename= System.getProperty(\"user.dir\");\n filename=filename.concat(File.separator);\n filename=filename.concat(\"test_SerializeXMLObject_MeasuredRatioModel\");\n \n MeasuredRatioModel instance = new MeasuredRatioModel();\n MeasuredRatioModel myValueModel = null;\n //Write file to disk\n instance.serializeXMLObject(filename);\n //Read back\n try{\n XStream xstream = instance.getXStreamReader();\n boolean isValidOrAirplaneMode = instance.validateXML(filename);\n if (isValidOrAirplaneMode) {\n BufferedReader reader = URIHelper.getBufferedReader(filename);\n try {\n myValueModel = (MeasuredRatioModel) xstream.fromXML(reader);\n } catch (ConversionException e) {\n throw new ETException(null, e.getMessage());\n }\n }\n }\n catch(java.io.FileNotFoundException | org.earthtime.exceptions.ETException e){\n System.out.println(e);\n }\n String expResult=instance.getXStreamWriter().toXML(instance);\n String result=instance.getXStreamWriter().toXML(myValueModel);\n assertEquals(expResult,result);\n \n //Tests if serialization works for specified ValueModels\n instance=new MeasuredRatioModel(\"r207_339\",new BigDecimal(\"12.34567890\"),\"PCT\",new BigDecimal(\".9876543210\"),true,true); \n myValueModel = null; \n //Write file to disk\n instance.serializeXMLObject(filename);\n //Read back\n try{\n XStream xstream = instance.getXStreamReader();\n boolean isValidOrAirplaneMode = instance.validateXML(filename);\n if (isValidOrAirplaneMode) {\n BufferedReader reader = URIHelper.getBufferedReader(filename);\n try {\n myValueModel = (MeasuredRatioModel) xstream.fromXML(reader);\n } catch (ConversionException e) {\n throw new ETException(null, e.getMessage());\n }\n }\n }\n catch(FileNotFoundException | ETException e){\n System.out.println(e);\n }\n expResult=instance.getXStreamWriter().toXML(instance);\n result=instance.getXStreamWriter().toXML(myValueModel);\n assertEquals(expResult,result);\n }", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "public synchronized void outputRule() throws IOException\n{\n File f1 = for_program.getUniverse().getBaseDirectory();\n File f2 = new File(f1,RULE_FILE);\n FileWriter fw = new FileWriter(f2,true);\n IvyXmlWriter xw = new IvyXmlWriter(fw);\n\n xw.begin(\"RULE\");\n xw.field(\"WHEN\",at_time);\n xw.field(\"WHENS\",new Date(at_time).toString());\n\n xw.begin(\"WORLD\");\n for (Map.Entry<UpodParameter,Object> ent : from_world.getParameters().entrySet()) {\n UpodParameter pnm = ent.getKey();\n Object pvl = ent.getValue();\n if (pvl == null) continue;\n xw.begin(\"PARAM\");\n xw.field(\"NAME\",pnm.getName());\n xw.field(\"TYPE\",pvl.getClass().toString());\n xw.cdata(pvl.toString());\n xw.end(\"PARAM\");\n }\n xw.end(\"WORLD\");\n\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : sensor_values.entrySet()) {\n UpodDevice us = ent.getKey();\n xw.begin(\"SENSOR\");\n xw.field(\"NAME\",us.getName());\n xw.field(\"ID\",us.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"SENSOR\");\n }\n for (Map.Entry<UpodDevice,Map<UpodParameter,Object>> ent : entity_values.entrySet()) {\n UpodDevice ue = ent.getKey();\n xw.begin(\"ENTITY\");\n xw.field(\"NAME\",ue.getName());\n xw.field(\"ID\",ue.getUID());\n for (Map.Entry<UpodParameter,Object> pent : ent.getValue().entrySet()) {\n\t xw.begin(\"PARAM\");\n\t xw.field(\"NAME\",pent.getKey().getName());\n\t xw.cdata(pent.getValue().toString());\n\t xw.end(\"PARAM\");\n }\n xw.end(\"ENTITY\");\n }\n\n for (CalendarEvent ce : calendar_events) {\n if (ce.getStartTime() > at_time + 5*T_MINUTE) continue;\n if (ce.getEndTime() < at_time - 5*T_MINUTE) continue;\n xw.begin(\"CALENDAR\");\n xw.field(\"START\",ce.getStartTime());\n xw.field(\"STARTS\",new Date(ce.getStartTime()).toString());\n xw.field(\"END\",ce.getEndTime());\n xw.field(\"ENDS\",new Date(ce.getEndTime()).toString());\n for (Map.Entry<String,String> ent : ce.getProperties().entrySet()) {\n\t xw.begin(\"FIELD\");\n\t xw.field(\"NAME\",ent.getKey());\n\t xw.field(\"VALUE\",ent.getValue());\n\t xw.end(\"FIELD\");\n }\n xw.end(\"CALENDAR\");\n }\n xw.end(\"RULE\");\n xw.close();\n}", "@Override\n public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n\n if (qName.equals(\"its\")) {\n course = new Course();\n course.setCourse(\"its\");\n semestersList = new ArrayList<>();\n } else if(qName.equals(\"ti\")){\n course = new Course();\n course.setCourse(\"ti\");\n semestersList = new ArrayList<>();\n } else if(qName.equals(\"win\")){\n course = new Course();\n course.setCourse(\"win\");\n semestersList = new ArrayList<>();\n } else if(qName.equals(\"sem1\")){\n semester = new Semester();\n semester.setSemester(\"sem1\");\n daysList = new ArrayList<>();\n } else if(qName.equals(\"mon\")){\n day = new Day();\n day.setWeekday(Calendar.MONDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"tue\")){\n day = new Day();\n day.setWeekday(Calendar.TUESDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"wed\")){\n day = new Day();\n day.setWeekday(Calendar.WEDNESDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"thu\")){\n day = new Day();\n day.setWeekday(Calendar.THURSDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"fri\")){\n day = new Day();\n day.setWeekday(Calendar.FRIDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"sat\")){\n day = new Day();\n day.setWeekday(Calendar.SATURDAY);\n schedulesList = new ArrayList<>();\n if(attributes.getValue(\"holedayempty\").equals(\"false\")){\n day.setHoledayempty(false);\n } else {\n day.setHoledayempty(true);\n }\n\n } else if(qName.equals(\"time\")){\n schedule = new Schedule();\n schedule.setStart(attributes.getValue(\"start\"));\n schedule.setEnd(attributes.getValue(\"end\"));\n subjectsList = new ArrayList<>();\n if(attributes.getValue(\"empty\").equals(\"false\")){\n schedule.setEmpty(false);\n } else {\n schedule.setEmpty(true);\n }\n } else if(qName.equals(\"subject\")){\n subject = new Subject();\n subject.setName(attributes.getValue(\"name\"));\n subject.setProf(attributes.getValue(\"prof\"));\n subject.setRoom(attributes.getValue(\"room\"));\n subject.setGroup(attributes.getValue(\"group\"));\n }\n\n }", "public void createXMLFileForNOC(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\t//for(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\t/*Element schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);*/\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t//}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "public void generateData()\n {\n }", "public void readXML(String xml){\n\t\tint maxId = 0;\n\t\ttry {\n \tFile xmlFile = new File(xml); \n \tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n \tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n \tDocument doc = documentBuilder.parse(xmlFile); \n \tdoc.getDocumentElement().normalize();\n \tNodeList nodeList = doc.getElementsByTagName(\"node\");\n \tHashMap<Integer,Artifact> artifactTable = new HashMap<Integer, Artifact>();\n \tHashMap<Integer,Element> nodeTable = new HashMap<Integer, Element>();\n \n \tfor (int i = 0; i < nodeList.getLength(); i++) { \n \t\tNode xmlItem = nodeList.item(i);\n \t\tif (xmlItem.getNodeType() == Node.ELEMENT_NODE) { \n \t\t\tElement node = (Element) xmlItem;\n \t\t\tArtifact newNode = new Artifact(Rel.getContext());\n \t\t\tRel.addView(newNode,100,100);\n \t\t\tnewNode.setId(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent()));\n \t\t\tnewNode.setPrevWidth(100);\n \t\t\tnewNode.setPrevHeight(100);\n \t\t\tnewNode.setTag(\"node\");\n \t\t\tnewNode.setText(node.getElementsByTagName(\"label\").item(0).getTextContent());\n \t\t\tnewNode.setType(node.getElementsByTagName(\"type\").item(0).getTextContent());\n \t\t\tnewNode.setInformation(node.getElementsByTagName(\"information\").item(0).getTextContent());\n \t\t\tnewNode.setPosition(node.getElementsByTagName(\"position\").item(0).getTextContent());\n \t\t\tnewNode.setAge(Long.parseLong(node.getElementsByTagName(\"age\").item(0).getTextContent()));\n \t\t\tnewNode.setBackgroundResource(Utility.getDrawableType(newNode));\n \t\t\tif(\"\".compareTo((String) newNode.getText()) != 0){\n \t\t\t\tnewNode.matchWithText();\n \t\t\t}\n \t\t\tartifactTable.put(newNode.getId(), newNode);\n \t\t\tnodeTable.put(newNode.getId(), node);\n \t\t\tif(Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent())>maxId){\n \t\t\t\tmaxId = Integer.parseInt(node.getElementsByTagName(\"id\").item(0).getTextContent());\n \t\t\t}\n \t\t} \n \t\t\n \t}\n \t\n \t//once we created all the artifacts now we can set the fathers and sons for every node with the artifact and xmlnode tables we have filled while reading\n \tIterator it = artifactTable.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pairs = (Map.Entry)it.next();\n NodeList sonsList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"son\");\n if(sonsList != null){\n\t for (int j = 0; j < sonsList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addSon(artifactTable.get(Integer.parseInt(sonsList.item(j).getTextContent())));\n\t }\n }\n \n NodeList fathersList = nodeTable.get(pairs.getKey()).getElementsByTagName(\"father\");\n if(fathersList != null){\n\t for (int j = 0; j < fathersList.getLength(); j++) {\n\t \tartifactTable.get(pairs.getKey()).addFather(artifactTable.get(Integer.parseInt(fathersList.item(j).getTextContent())));\n\t }\n }\n \n }\n \n \n }catch(Exception e){\n \tLog.v(\"error reading xml\",e.toString());\n }\n\t\tGlobal.ID = maxId+1;\n\t}", "@Test\n public void testWriteElements() {\n Random rnd = new Random();\n ReadablePeriod ObjectToWrite = new MutablePeriod(1+rnd.nextInt(12),rnd.nextInt(60),rnd.nextInt(60),rnd.nextInt(1000));\n ReadablePeriodXMLWriter instance = new ReadablePeriodXMLWriter();\n Element tempElement = instance.writeElements(ObjectToWrite);\n ReadablePeriod result = instance.readElements(tempElement);\n assertEquals(ObjectToWrite, result);\n }", "private static void writeDimesnions() throws IOException {\r\n\t\tDate date = new Date();\r\n\t\t bw.write( \"<> a owl:Ontology ; \\n\"\r\n\t\t \t+ \" rdfs:label \\\"GeoKnow Spatical Data Qaluty DataCube Knowledge Base\\\" ;\\n\"\r\n\t\t \t+ \" dc:description \\\"This knowledgebase contains 3 different DataCubes with different dimensions and measures.\\\" .\\n\\n\"\r\n\t//-----------------------Dataset----------------------------\r\n\t\t \t+ \"#\\n #Data Set \\n # \\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds1> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\" Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd1> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds2> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd2> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\t\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds3> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd3> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\r\n //-----------------Data Cube 1 Structure Definitions-----------------------------------------\r\n\t\t\t+ \"# \\n# Data Structure Definitions \\n # \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube1\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd1/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube2\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd2/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube3\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd3/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c3> . \\n\\n\"\r\n\t\r\n\t//-----------------------Component Specifications-------------------------------------------------------------------\r\n\t\t\t+ \" # \\n #Componenet Specifications\\n #\\n \"\t\t\r\n\t\t\t//-------------DataCube1------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class \\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Coverage . \\n\\n\"\t\t\t\t\r\n\t\t\t//-------------DataCube2------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Weighted Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:WeightedCoverage . \\n\\n\"\t\r\n\t\t\t//-------------DataCube3------------------------------------\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Dataset\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Dataset . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Structuredness\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Structuredness . \\n\\n\"\t\t\t\t\r\n\t//-----------------------Dimensions, Unit and Measure ---------------------------------------------------------\t\t\r\n\t\t\t+ \"### \\n ## Dimensions, Unit, and Measure\\n##\\n\"\r\n\t\t\t+ \"gk-dim:Class a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class of a dataset\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:TimeStamp a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Time Stamp\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:Dataset a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset name\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Coverage a qb:MeasureProperty ; \\n\"\t\r\n\t\t\t+ \" rdfs:label \\\"Class Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:WeightedCoverage a qb:MeasureProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class Weighted Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Structuredness a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset Structuredness\\\"@en .\\n\\n\"\r\n\t\t\t\t );\r\n\t\t\r\n\t}", "public void generateXmlFile(IGallery gallery) {\r\n // create gallery node and page nodes for every page, subpage\r\n // and append that nodes to document object\r\n appendGallery(gallery);\r\n\r\n /*\r\n *****\r\n choose directory and file name\r\n *****\r\n */\r\n try {\r\n document.setXmlStandalone(true);\r\n xmlFile = new File(file + \".xml\");\r\n xmlFile.createNewFile();\r\n FileOutputStream outputStream = new FileOutputStream(xmlFile);\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t = tf.newTransformer();\r\n DOMSource dSource = new DOMSource(document);\r\n StreamResult sr = new StreamResult(outputStream);\r\n\r\n // set node indentation in xml\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", indent);\r\n\r\n // add doctype to xml document\r\n DOMImplementation domImpl = document.getImplementation();\r\n DocumentType docType = domImpl.createDocumentType(\"doctype\", ROOT_NODE, DTD_FILE);\r\n t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, docType.getSystemId());\r\n t.transform(dSource, sr);\r\n\r\n outputStream.flush();\r\n outputStream.close();\r\n\r\n zipGallery();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (TransformerException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected abstract String getEventChildXML();", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "public void readBoardData(Document d){\r\n \r\n Element root = d.getDocumentElement();\r\n \r\n NodeList setList = root.getElementsByTagName(\"set\");\r\n NodeList office = root.getElementsByTagName(\"office\");\r\n NodeList trailer = root.getElementsByTagName(\"trailer\");\r\n \r\n \r\n //special handling for office:\r\n \r\n //reads data from the node\r\n Node officeNode = office.item(0);\r\n Element officeElement = (Element) officeNode;\r\n String officeName = \"office\";\r\n \r\n Room officeTemp = new Room();\r\n officeTemp.name = officeName;\r\n \r\n //office area\r\n NodeList officeArea = officeElement.getElementsByTagName(\"area\");\r\n Node tempNode = officeArea.item(0);\r\n Element officeBuilder = (Element) tempNode;\r\n officeTemp.x = Integer.parseInt(officeBuilder.getAttribute(\"x\"));\r\n officeTemp.y = Integer.parseInt(officeBuilder.getAttribute(\"y\"));\r\n officeTemp.h = Integer.parseInt(officeBuilder.getAttribute(\"h\"));\r\n officeTemp.w = Integer.parseInt(officeBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n NodeList officeNeighbors = officeElement.getElementsByTagName(\"neighbor\");\r\n \r\n String[] officeNeighborList = new String[officeNeighbors.getLength()];\r\n \r\n for(int i = 0; i < officeNeighbors.getLength(); i++){\r\n Element n = (Element) officeNeighbors.item(i);\r\n String tempNeighborName = n.getAttribute(\"name\");\r\n officeNeighborList[i] = tempNeighborName;\r\n }\r\n officeTemp.neighbors = officeNeighborList;\r\n \r\n //upgrades\r\n NodeList officeUpgrades = officeElement.getElementsByTagName(\"upgrade\");\r\n \r\n Upgrade[] upgradeList = new Upgrade[officeUpgrades.getLength()];\r\n for(int k = 0; k < upgradeList.length; k++){\r\n upgradeList[k] = new Upgrade();\r\n }\r\n \r\n //put all upgrades into upgradeList\r\n for(int i = 0; i < officeUpgrades.getLength(); i++){\r\n Element n = (Element) officeUpgrades.item(i);\r\n upgradeList[i].level = Integer.parseInt(n.getAttribute(\"level\"));\r\n upgradeList[i].currency = n.getAttribute(\"currency\");\r\n upgradeList[i].amount = Integer.parseInt(n.getAttribute(\"amt\"));\r\n \r\n //upgrade area\r\n NodeList upgradeArea = n.getElementsByTagName(\"area\");\r\n tempNode = upgradeArea.item(0);\r\n Element upgradeBuilder = (Element) tempNode;\r\n upgradeList[i].x = Integer.parseInt(upgradeBuilder.getAttribute(\"x\"));\r\n upgradeList[i].y = Integer.parseInt(upgradeBuilder.getAttribute(\"y\"));\r\n upgradeList[i].h = Integer.parseInt(upgradeBuilder.getAttribute(\"h\"));\r\n upgradeList[i].w = Integer.parseInt(upgradeBuilder.getAttribute(\"w\")); \r\n }\r\n \r\n officeTemp.upgrades = upgradeList;\r\n officeTemp.doneShooting = true;\r\n Board.currentBoard[Board.currentBoardIndex++] = officeTemp;\r\n \r\n \r\n //special handling for trailer\r\n //reads data from the node\r\n Node trailerNode = trailer.item(0);\r\n \r\n Element trailerElement = (Element) trailerNode;\r\n String trailerName = \"trailer\";\r\n \r\n Room trailerTemp = new Room();\r\n trailerTemp.name = trailerName;\r\n NodeList trailerArea = trailerElement.getElementsByTagName(\"area\");\r\n \r\n //trailer area\r\n tempNode = trailerArea.item(0);\r\n Element trailerBuilder = (Element) tempNode;\r\n trailerTemp.x = Integer.parseInt(trailerBuilder.getAttribute(\"x\"));\r\n trailerTemp.y = Integer.parseInt(trailerBuilder.getAttribute(\"y\"));\r\n trailerTemp.h = Integer.parseInt(trailerBuilder.getAttribute(\"h\"));\r\n trailerTemp.w = Integer.parseInt(trailerBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n NodeList trailerNeighbors = trailerElement.getElementsByTagName(\"neighbor\");\r\n \r\n String[] trailerNeighborList = new String[trailerNeighbors.getLength()];\r\n \r\n for(int i = 0; i < trailerNeighbors.getLength(); i++){\r\n Element n = (Element) trailerNeighbors.item(i);\r\n String tempNeighborName = n.getAttribute(\"name\");\r\n trailerNeighborList[i] = tempNeighborName;\r\n }\r\n trailerTemp.doneShooting = true;\r\n trailerTemp.neighbors = trailerNeighborList;\r\n \r\n Board.currentBoard[Board.currentBoardIndex++] = trailerTemp;\r\n \r\n //handles all the sets\r\n for(int i = 0; i < setList.getLength(); i++){\r\n \r\n Room tempRoom = new Room();\r\n \r\n //reads data from the nodes\r\n Node setNode = setList.item(i);\r\n \r\n //set name\r\n String setName = setNode.getAttributes().getNamedItem(\"name\").getNodeValue();\r\n tempRoom.name = setName;\r\n \r\n Element set = (Element) setNode;\r\n NodeList neighbors = set.getElementsByTagName(\"neighbor\");\r\n NodeList takes = set.getElementsByTagName(\"take\");\r\n NodeList parts = set.getElementsByTagName(\"part\");\r\n NodeList setArea = set.getElementsByTagName(\"area\");\r\n \r\n //area\r\n tempNode = setArea.item(0);\r\n Element setBuilder = (Element) tempNode; \r\n tempRoom.x = Integer.parseInt(setBuilder.getAttribute(\"x\"));\r\n tempRoom.y = Integer.parseInt(setBuilder.getAttribute(\"y\"));\r\n tempRoom.h = Integer.parseInt(setBuilder.getAttribute(\"h\"));\r\n tempRoom.w = Integer.parseInt(setBuilder.getAttribute(\"w\"));\r\n \r\n //neighbors\r\n String[] tempNeighbors = new String[neighbors.getLength()];\r\n \r\n for(int j = 0; j < neighbors.getLength(); j++){\r\n Element n = (Element) neighbors.item(j);\r\n String tempName = n.getAttribute(\"name\");\r\n tempNeighbors[j] = tempName;\r\n }\r\n tempRoom.neighbors = tempNeighbors;\r\n \r\n //takes\r\n Take[] tempTakes = new Take[takes.getLength()];\r\n for(int k = 0; k < takes.getLength(); k++){\r\n Take tempTake = new Take();\r\n Element t = (Element) takes.item(k);\r\n int num = Integer.parseInt(t.getAttribute(\"number\"));\r\n \r\n //takes area\r\n NodeList takeArea = t.getElementsByTagName(\"area\");\r\n Node takeNode = takeArea.item(0);\r\n Element takeBuilder = (Element) takeNode;\r\n tempTake.x = Integer.parseInt(takeBuilder.getAttribute(\"x\"));\r\n tempTake.y = Integer.parseInt(takeBuilder.getAttribute(\"y\"));\r\n tempTake.h = Integer.parseInt(takeBuilder.getAttribute(\"h\"));\r\n tempTake.w = Integer.parseInt(takeBuilder.getAttribute(\"w\")); \r\n \r\n tempTakes[k] = tempTake;\r\n }\r\n tempRoom.takes = tempTakes;\r\n tempRoom.maxTakes = takes.getLength();\r\n \r\n //parts\r\n Part[] tempParts = new Part[parts.getLength()];\r\n for(int j = 0; j < parts.getLength(); j++) {\r\n Part tempPart = new Part();\r\n Element n = (Element) parts.item(j);\r\n \r\n tempPart.name = n.getAttribute(\"name\");\r\n tempPart.level = Integer.parseInt(n.getAttribute(\"level\"));\r\n tempPart.line = n.getElementsByTagName(\"line\").item(0).getTextContent();\r\n tempPart.onCard = false;\r\n tempPart.isTaken = false;\r\n \r\n //part area\r\n NodeList partArea = n.getElementsByTagName(\"area\");\r\n Node partNode = partArea.item(0);\r\n Element partBuilder = (Element) partNode;\r\n \r\n tempPart.x = Integer.parseInt(partBuilder.getAttribute(\"x\"));\r\n tempPart.y = Integer.parseInt(partBuilder.getAttribute(\"y\"));\r\n tempPart.h = Integer.parseInt(partBuilder.getAttribute(\"h\"));\r\n tempPart.w = Integer.parseInt(partBuilder.getAttribute(\"w\"));\r\n \r\n tempParts[j] = tempPart;\r\n }\r\n tempRoom.parts = tempParts;\r\n Board.currentBoard[Board.currentBoardIndex++] = tempRoom;\r\n }\r\n }", "void setDuration(org.apache.xmlbeans.GDuration duration);", "private TimeSeries createEURTimeSeries(String WellID, String lang) {\n int count = 0;\n String precipitation = \"\";\n if(lang.equals(\"EN\")){\n precipitation = precipitation_en;\n }else{\n precipitation = precipitation_fr;\n }\n TimeSeries t1 = new TimeSeries(precipitation + \" (mm)\");\n //System.out.println (t1.getMaximumItemCount()); \n Hour begin = new Hour( 1, 1, 1, 2005);\n Hour end = new Hour(23, 31, 12, 2012);\n String endStr = end.toString();\n String str = begin.toString();\n \n for(Hour h1 = begin; !str.equals(endStr) ; h1 = (Hour) h1.next()){\n Second s = new Second(0, 0, h1.getHour(), h1.getDayOfMonth(), h1.getMonth(), h1.getYear());\n t1.addOrUpdate(s, new Double(Double.NaN)); \n str = h1.toString();\n }\n \n try {\n // Open the file that is the first \n // command line parameter\n FileInputStream fstream = new FileInputStream(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + WellID + \".csv\");\n // Get the object of DataInputStream\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n //Read File Line By Line\n int i = 0;\n while ((strLine = br.readLine()) != null) {\n if(i>0){ \n String [] temp = strLine.split(\",\");\n //System.out.println (i);\n String [] dateTimeAM = (temp[2]).split(\" \"); //08/20/2009 10:35:00 AM\n \n String [] dates = (dateTimeAM[0]).split(\"/\"); //6/10/2009\n int month = Integer.parseInt(dates[0]);\n int day = Integer.parseInt(dates[1]);\n int year = Integer.parseInt(dates[2]);\n //System.out.println (i);\n int hour = 0;\n int minute = 0;\n int second = 0; \n if (dateTimeAM.length > 1) {\n String [] temp3 = (dateTimeAM[1]).split(\":\"); //10:35:00\n hour = Integer.parseInt(temp3[0]);\n minute = Integer.parseInt(temp3[1]);\n second = Integer.parseInt(temp3[2]);\n //08/20/2009 10:35:00 AM\n if ((dateTimeAM[2]).equals(\"PM\")) {\n if (hour < 12) {\n hour = hour + 12;\n }\n }\n if ((dateTimeAM[2]).equals(\"AM\") && (hour == 12)) {\n hour = 0;\n }\n }\n Second s = new Second(second, minute, hour, day, month, year);\n //System.out.println(strLine);\n //System.out.println(year + \", \" + month + \", \" + day + \", \" + hour + \", \" + minute + \", \" + second);\n //Hour h = new Hour(hour, day, month, year);\n Double d = new Double(Double.NaN);\n //System.out.println(temp[2]);\n if (temp.length > 2){\n d = Double.parseDouble(temp[3]);// - depth;\n count ++;\n }\n t1.addOrUpdate(s, d);\n }\n i = i + 1;\n }\n in.close();\n \n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n \n return t1;\n }", "public static void _generateStatistics() {\n\t\ttry {\n\t\t\t// Setup info\n\t\t\tPrintStream stats = new PrintStream(new File (_statLogFileName + \".txt\"));\n\n\t\t\tScanner scan = new Scanner(new File(_logFileName+\".txt\"));\n\t\t\twhile (scan.hasNext(SETUP.toString())) {\n\t\t\t\t// Append setup info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tstats.append(\"\\n\");\n\n\t\t\twhile (scan.hasNext(DETAILS.toString()) || scan.hasNext(RUN.toString())) {\n\t\t\t\t// Throw detailed info away\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\t// Append post-run info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tscan.close();\n\t\t\tstats.append(\"\\n\");\n\n\t\t\t// Perf4J info\n\t\t\tReader reader = new FileReader(_logFileName+\".txt\");\n\t\t\tLogParser parser = new LogParser(reader, stats, null, 10800000, true, new GroupedTimingStatisticsTextFormatter());\n\t\t\tparser.parseLog();\n\t\t\tstats.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createXMLFileForCertificate(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\tfor(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t//\tStudentResult setudentResult = new\n\t\t\t\t\n\t\t\t\tElement exam = doc.createElement(\"exam\");\n\t\t\t\texam.appendChild(doc.createTextNode((student.getStudentResultList().get(0).getExam()!=null?student.getStudentResultList().get(0).getExam():\"--------\")));\n\t\t\t\tstudentList.appendChild(exam);\n\t\t\t}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException, TransformerException {\n\t\t\n\t\tString path = args[0]; //\"/home/pehlivanz/PWA/topics.xml\";\n\t\tString output = args[1];\n\t\tFile fXmlFile = new File(path);\n\t\t\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument docoriginal = dBuilder.parse(fXmlFile);\n\t\t\n\t\tdocoriginal.getDocumentElement().normalize();\n\t\t\n\t\t// PREPARE NEW DOCUMENT\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\tDocument docNEW = docBuilder.newDocument();\n\t\tElement rootElement = docNEW.createElement(\"Topics\");\n\t\tdocNEW.appendChild(rootElement);\n\t\t\n\t\tNodeList nList = docoriginal.getElementsByTagName(\"topic\");\n\t\tNode nNode;\n\t\tElement eElement;\n\t\t\n\t\tElement newelement;\n\t\tString query;\n\t\tString datestart;\n\t\tString dateend;\n\t\tElement tempelement;\n\t\tfor (int temp = 0; temp < nList.getLength(); temp++) {\n\t\t\t \n\t\t\ttempelement = docNEW.createElement(\"top\");\n\t\t\t\n\t\t\tnNode = (Node) nList.item(temp);\n\t \n\t\t\n\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t \n\t\t\t\teElement = (Element) nNode;\n\t \n\t\t\t\tnewelement = docNEW.createElement(\"num\");\n\t\t\t\tnewelement.appendChild(docNEW.createTextNode(\"Number:\" + eElement.getAttribute(\"number\")));\n\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\n\t\t\t\tquery = eElement.getElementsByTagName(\"query\").item(0).getTextContent();\n\t\t\t\t//System.out.print(\"\\\"\"+query+\"\\\",\");\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tdatestart = eElement.getElementsByTagName(\"start\").item(0).getTextContent();\n\t\t\t\t\tdateend = eElement.getElementsByTagName(\"end\").item(0).getTextContent();\n\t\t\t\t\t\n\t\t\t\t\tquery = query.trim() +\"@\" + convertDateToTimeCronon(datestart) + \"_\" + convertDateToTimeCronon(dateend);\n\t\t\t\t\tSystem.out.println(query);\n\t\t\t\t\n\t\t\t\t// to filter topics without date I did it here\n\t\t\t\t\tnewelement = docNEW.createElement(\"title\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode( query));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"desc\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(1).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"narr\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\trootElement.appendChild(tempelement);\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"NO Date\");\n\t\t\t\t\t\n\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\t\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\tDOMSource source = new DOMSource(docNEW);\n\t\tStreamResult result = new StreamResult(new File(output));\n \n\t\t// Output to console for testing\n\t\t// StreamResult result = new StreamResult(System.out);\n \n\t\ttransformer.transform(source, result);\n \n\t\tSystem.out.println(\"File saved!\");\n\t\t\n\t}", "public void CreatFileXML(HashMap<String, List<Detail>> wordMap, String fileName ) throws ParserConfigurationException, TransformerException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.newDocument();\n\t\t\n\t\t//root element\n\t\tElement rootElement = doc.createElement(\"Words\");\n\t\tdoc.appendChild(rootElement);\n\t\t\n\t\tSet<String> keyset = wordMap.keySet();\n\t\tfor(String key : keyset) {\n\t\t\t\n\t\t\t// Load List of detail from HashMap\n\t\t\tList<Detail> values = wordMap.get(key);\n\t\t\t\n\t\t\tfor (Detail detail : values) {\n\t\t\t\n\t\t\t\t//LexicalEntry element\n\t\t\t\tElement LexicalEntry = doc.createElement(\"LexicalEntry\");\n\t\t\t\trootElement.appendChild(LexicalEntry);\n\t\t\t\t\n\t\t\t\t//HeadWord element\n\t\t\t\tElement HeadWord = doc.createElement(\"HeadWord\");\n\t\t\t\tHeadWord.appendChild(doc.createTextNode(key));\n\t\t\t\tLexicalEntry.appendChild(HeadWord);\n\t\t\t\t\n\t\t\t\t//Detail element\n\t\t\t\tElement Detail = doc.createElement(\"Detail\");\n\t\t\t\t\n\t\t\t\t// WordType element\n\t\t\t\tElement WordType = doc.createElement(\"WordType\");\n\t\t\t\tWordType.appendChild(doc.createTextNode(detail.getTypeWord()));\n\t\t\t\t\n\t\t\t\t// CateWord element\n\t\t\t\tElement CateWord = doc.createElement(\"CateWord\");\n\t\t\t\tCateWord.appendChild(doc.createTextNode(detail.getCateWord()));\n\t\t\t\t\n\t\t\t\t// SubCateWord element\n\t\t\t\tElement SubCateWord = doc.createElement(\"SubCateWord\");\n\t\t\t\tSubCateWord.appendChild(doc.createTextNode(detail.getSubCateWord()));\n\t\t\t\t\n\t\t\t\t// VerbPattern element\n\t\t\t\tElement VerbPattern = doc.createElement(\"VerbPattern\");\n\t\t\t\tVerbPattern.appendChild(doc.createTextNode(detail.getVerbPattern()));\n\t\t\t\t\n\t\t\t\t// CateMean element\n\t\t\t\tElement CateMean = doc.createElement(\"CateMean\");\n\t\t\t\tCateMean.appendChild(doc.createTextNode(detail.getCateMean()));\n\t\t\t\t\n\t\t\t\t// Definition element\n\t\t\t\tElement Definition = doc.createElement(\"Definition\");\n\t\t\t\tDefinition.appendChild(doc.createTextNode(detail.getDefinition()));\n\t\t\t\t\n\t\t\t\t// Example element\n\t\t\t\tElement Example = doc.createElement(\"Example\");\n\t\t\t\tExample.appendChild(doc.createTextNode(detail.getExample()));\n\t\t\t\t\n\t\t\t\t// Put in Detail Element\n\t\t\t\tDetail.appendChild(WordType);\n\t\t\t\tDetail.appendChild(CateWord);\n\t\t\t\tDetail.appendChild(SubCateWord);\n\t\t\t\tDetail.appendChild(VerbPattern);\n\t\t\t\tDetail.appendChild(CateMean);\n\t\t\t\tDetail.appendChild(Definition);\n\t\t\t\tDetail.appendChild(Example);\n\t\t\t\t\n\t\t\t\t// Add Detail into LexicalEntry\n\t\t\t\tLexicalEntry.appendChild(Detail);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write the content into xml file\n\t\tTransformerFactory tfmFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = tfmFactory.newTransformer();\n\t\tDOMSource source = new DOMSource(doc);\n\t\tStreamResult result = new StreamResult(new File(\"F://GitHUB/ReadXML/data/\" + fileName));\n\t\ttransformer.transform(source, result);\n\t\t\n//\t\t// output testing\n//\t\tStreamResult consoleResult = new StreamResult(System.out);\n// transformer.transform(source, consoleResult);\n\t}", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "private static void writeDates(XMLStreamWriter w, RepositoryConnection con, IRI uri)\n\t\tthrows XMLStreamException {\n\t\ttry (RepositoryResult<Statement> res = con.getStatements(uri, DCTERMS.TEMPORAL, null)) {\n\t\t\twhile (res.hasNext()) {\n\t\t\t\tValue v = res.next().getObject();\n\t\t\t\tif (v instanceof IRI) {\n\t\t\t\t\tIRI date = (IRI) v;\n\t\t\t\t\tw.writeStartElement(\"dct:temporal\");\n\t\t\t\t\tw.writeStartElement(\"dct:PeriodOfTime\");\n\t\t\t\t\twriteLiterals(w, con, date, DCAT.START_DATE, \"dcat:startDate\");\n\t\t\t\t\twriteLiterals(w, con, date, DCAT.END_DATE, \"dcat:endDate\");\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t\tw.writeEndElement();\n\t\t\t\t} else {\n\t\t\t\t\tLOG.error(\"Not a date IRI {}\", v.stringValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public static void parseXML(String filename) {\n SAXBuilder builder = new SAXBuilder();\n \n //reading XML document\n Document xml = null;\n try {\n xml = builder.build(new File(filename));\n } catch (JDOMException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n //getting root element from XML document\n Element root = xml.getRootElement();\n if (root != null)\n {\n\t Element queryNode = root.getChild(\"query\");\n\t if (queryNode != null)\n\t {\n\t\t Element rcNode = queryNode.getChild(\"recentchanges\");\n\t\t \n\t\t List<Element> rcList = rcNode.getChildren();\n\t\t \n\t\t \n\t\t \n\t\t //Iterating over all childs in XML\n\t\t Iterator<Element> itr = rcList.iterator();\n\t\t while(itr.hasNext()){\n\t\t \tElement rc = itr.next();\n\t\t \tString user = rc.getAttributeValue(\"user\");\n\t\t \tString userId = rc.getAttributeValue(\"userid\");\n\t\t \tString pageId = rc.getAttributeValue(\"pageid\");\n\t\t \tString title = rc.getAttributeValue(\"title\");\n\t\t \tString timestamp = rc.getAttributeValue(\"timestamp\");\n\t\t \tString comments = rc.getAttributeValue(\"comment\");\n\t\t \tString type = rc.getAttributeValue(\"type\");\n\t\t \tString oldRevId = rc.getAttributeValue(\"old_revid\");\n\t\t \tString newRevId = rc.getAttributeValue(\"revid\");\n\t\t \tString recentChangeId = rc.getAttributeValue(\"rcid\");\n\t\t \t\n\t\t// \t //reading attribute from Element using JDOM\n\t\t// System.out.println(\"User: \" + user + \" | User_ID: \" + userId + \" | Page_ID: \" + pageId + \n\t\t// \t\t\" | Title: \" + title + \" | Timestamp: \" + timestamp + \" | Recent_Change_ID: \" + recentChangeId + \" | Old_Rev_ID: \" + oldRevId + \n\t\t// \t\t\" | New_Rev_ID: \" + newRevId + \" | Type: \" + type); \n\t\t \t\n\t\t \ttry {\n\t\t\t\t\t\tcluster.writeWikiResults(user, userId, timestamp, pageId, title, recentChangeId, oldRevId, newRevId, type);\n\t\t\t\t\t\t System.out.println(count++);\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t }\n\t }\n } \n }", "private void ProcessTemporalDefinition(SimpleNode treeRoot) throws TSQL2TranslateException {\n SimpleNode node;\n String nodeType;\n\n /*\n\t\t * There can be validtime and transaction time definitions\n */\n for (int i = 0; i < treeRoot.jjtGetNumChildren(); i++) {\n node = ((SimpleNode) treeRoot.jjtGetChild(i));\n nodeType = node.toString();\n\n if (null != nodeType) switch (nodeType) {\n case \"TransactionDefinition\":\n _tableInfo.setTransactionTimeSupport(STATE);\n // add transaction times columns\n _tableContentDefinition += Settings.TransactionTimeStartColumnName + \" \" + Settings.TransactionTimeColumnType + \",\\n\"\n + Settings.TransactionTimeEndColumnName + \" \" + Settings.TransactionTimeColumnType + \",\\n\";\n /*\n * Set vacuuming point to current time by default.\n * It can be changed in VACCUM definition later.\n */\n _tableInfo.setVacuumCutOff(Utils.getCurrentTime());\n // add transaction time column to primary key to ensure uniqueness\n if (!_keys.isEmpty()) {\n _keys.add(Settings.TransactionTimeStartColumnName);\n _keys.add(Settings.TransactionTimeEndColumnName);\n } break;\n case \"ValidStateDefinition\":\n _tableInfo.setValidTimeSupport(STATE);\n // add valid times columns\n _tableContentDefinition += Settings.ValidTimeStartColumnName + \" \" + Settings.ValidTimeColumnType + \",\\n\"\n + Settings.ValidTimeEndColumnName + \" \" + Settings.ValidTimeColumnType + \",\\n\";\n // add valid time column to primary key to ensure uniqueness\n if (!_keys.isEmpty()) {\n _keys.add(Settings.ValidTimeStartColumnName);\n _keys.add(Settings.ValidTimeEndColumnName);\n } // get scale if defined\n if ((node.jjtGetNumChildren() > 0) && (\"DateTimeScale\".equals(node.jjtGetChild(0).toString()))) {\n try {\n _tableInfo.setValidTimeScale(DateTimeScale.valueOf(SimpleNodeCompatibility.getValue((SimpleNode) node.jjtGetChild(0))));\n }\n catch (IllegalArgumentException e) {\n throw new TSQL2TranslateException(\"Invalid valid-time scale specified.\");\n }\n } break;\n case \"ValidEventDefinition\":\n _tableInfo.setValidTimeSupport(EVENT);\n // add valid times columns\n _tableContentDefinition += Settings.ValidTimeStartColumnName + \" \" + Settings.ValidTimeColumnType + \",\\n\";\n // add valid time column to primary key to ensure uniqueness\n if (!_keys.isEmpty()) {\n _keys.add(Settings.ValidTimeStartColumnName);\n } // get scale if defined\n if ((node.jjtGetNumChildren() > 0) && (\"DateTimeScale\".equals(node.jjtGetChild(0).toString()))) {\n try {\n _tableInfo.setValidTimeScale(DateTimeScale.valueOf(SimpleNodeCompatibility.getValue((SimpleNode) node.jjtGetChild(0))));\n }\n catch (IllegalArgumentException e) {\n throw new TSQL2TranslateException(\"Invalid valid-time scale specified.\");\n }\n } break;\n }\n }\n }", "public void writeXML(Vehicle vehicle_a, Vehicle vehicle_b){\n\n //writing encoding and xml file version\n\n XMLOutputFactory xmlof = null;\n XMLStreamWriter xmlw = null;\n\n try{\n\n xmlof = XMLOutputFactory.newInstance();\n xmlw = xmlof.createXMLStreamWriter(new FileOutputStream(FILE_NAME), \"utf-8\");\n xmlw.writeStartDocument(\"utf-8\", \"1.0\");\n\n } catch (Exception e){\n\n System.out.println(\"Error: \");\n System.out.println(e.getMessage());\n\n }\n\n //writing information\n\n try {\n xmlw.writeStartElement(\"routes\");\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_a.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_a.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_a.getTouched_cities().size()));\n\n\n\n for(int i=0; i<vehicle_a.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_a.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_a.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_b.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_b.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_b.getTouched_cities().size()));\n\n for(int i=0; i<vehicle_b.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_b.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_b.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n //tag \"routes\" close\n xmlw.writeEndElement();\n\n //closing document\n xmlw.writeEndDocument();\n\n //eptying buffer and writing the document\n xmlw.flush();\n\n //closing document and resources used\n xmlw.close();\n\n //Creation of a clone-file but indented\n try {\n indentFile();\n }catch (Exception e){\n System.err.println(e);\n }\n\n }\n catch (Exception e){\n System.out.println(\"Writing error: \");\n System.out.println(e.getMessage());\n }\n }", "public static void addToXML(CD c)\n\t\t\tthrows TransformerException, FileNotFoundException, SAXException, IOException {\n\t\ttry {\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement;\n\t\t\tString filePath = \"src/Part2_Ex3/CD.xml\";\n\t\t\tFile xmlFile = new File(filePath);\n\n\t\t\tif (xmlFile.isFile()) {\n\t\t\t\tdoc = docBuilder.parse(new FileInputStream(xmlFile));\n\t\t\t\tdoc.getDocumentElement().normalize();\n\t\t\t\trootElement = doc.getDocumentElement();\n\t\t\t} else {\n\t\t\t\trootElement = doc.createElement(\"CDs\");\n\t\t\t\tdoc.appendChild(rootElement);\n\t\t\t}\n\n\t\t\tElement cd = doc.createElement(\"CD\");\n\t\t\trootElement.appendChild(cd);\n\n\t\t\t// id element\n\t\t\tElement id = doc.createElement(\"id\");\n\t\t\tid.appendChild(doc.createTextNode(Integer.toString(c.getId())));\n\t\t\tcd.appendChild(id);\n\t\t\t\n\t\t\t// name\n\t\t\tElement name = doc.createElement(\"name\");\n\t\t\tname.appendChild(doc.createTextNode(c.getName()));\n\t\t\tcd.appendChild(name);\n\n\t\t\t//singer\n\t\t\tElement singer = doc.createElement(\"singer\");\n\t\t\tsinger.appendChild((doc.createTextNode(c.getSinger())));\n\t\t\tcd.appendChild(singer);\n\n\t\t\t// number songs\n\t\t\tElement numbersongs = doc.createElement(\"numbersongs\");\n\t\t\tnumbersongs.appendChild(doc.createTextNode(Integer.toString(c.getNumOfSong())));\n\t\t\tcd.appendChild(numbersongs);\n\t\t\t\n\t\t\t// price\n\t\t\tElement price = doc.createElement(\"price\");\n\t\t\tprice.appendChild(doc.createTextNode(Double.toString(c.getPrice())));\n\t\t\tcd.appendChild(price);\n\t\t\t\n\t\t\t// write the content into xml file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(xmlFile);\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tSystem.out.println(\"Add completed !\");\n\n\t\t} catch (ParserConfigurationException pce) {\n\t\t\tSystem.out.println(\"Cannot insert new CD. Error: \" + pce.getMessage());\n\t\t}\n\t}", "public Zufallsgenerator(){//der arbeitskonstruktor, der alles setzt\n\t\t\n\t\tfile=\"Zwischenstand.txt\";\n\t\tint x=Gamepanel.Spielfeld.length;//hol die spielfeld-länge\n\n\t\tString ausgabe=\"\";\n\t\tausgabe+=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\";\n\t\tausgabe+=\"\\n\";\n\t\t\n\t\tausgabe+=\"<level>\";\n\t\tausgabe+=\"\\n\";\n\t\ttry{\n\t\tFile schreiber=new File(file);\n\t\tFileWriter fwriter=new FileWriter(schreiber);\n\t\t\n\t\t/**\n\t\t * Die Methode muss mehrmals verwendet werden, da sonst der String oft schnell zu groß wird\n\t\t */\n\t\tfor(int k=0;k<ausgabe.length();k++){\n\t\t\tchar c=ausgabe.charAt(k);\n\t\t\tif(c=='\\n')\n\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\telse fwriter.write(c);\n\t\t}\n\t\tausgabe=\"\";\n\t\tdouble ran;\n\t\t\n\t\tfor(int i=0;i<x;i++){//methode aus dem schreibe_xml\n\t\t\t\n\t\t\tfor(int j=0;j<x;j++){\t\t\t\t\n\t\t\t\tausgabe+=(\"\\t<Feld>\");\n\t\t\t\tausgabe+=\"\\n\";\n\t\t\t\tausgabe+=(\"\\t\\t<Typ>\");\n\t\t\t\t\n\t\t\t\tif(i == 0 || i == 14 || j == 0 || j == 14){\n\t\t\t\t\tausgabe+=\"unzerstoerbar\";\n\t\t\t\t} else if((i == 1 && j == 1) || (i == 1 && j == 2) || (i == 2 && j == 1) || (i == 13 && j == 13)\n\t\t\t\t\t\t|| (i == 13 && j == 12) || (i == 12 && j == 13)) {\n\t\t\t\t\tausgabe+=\"Weg\";\n\t\t\t\t} else if(i == 7 && j == 7){\n\t\t\t\t\tausgabe +=\"Ausgang\";\n\t\t\t\t} else {\n\t\t\t\t\tran = (int) (Math.random()*3);\n\t\t\t\t\tif(ran == 0) ausgabe += \"Weg\";\n\t\t\t\t\tif(ran == 1) ausgabe += \"zerstoerbar\";\n\t\t\t\t\tif(ran == 2) ausgabe += \"zerstoerbar\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tausgabe+=(\"</Typ>\");\n\t\t\t\tausgabe+=\"\\n\";\n\t\t\t\tausgabe+=(\"\\t\\t<Position><X>\"+j+\"</X><Y>\"+i+\"</Y></Position>\\n\");\n\t\t\t\tausgabe+=(\"\\t</Feld>\\n\");\n\t\n\t\t\t}\n\t\t\t\tfor(int k=0;k<ausgabe.length();k++){\n\t\t\t\t\tchar c=ausgabe.charAt(k);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\t\tausgabe=\"\";\n\t\t\t}\n\n\t\t\tausgabe+=\"\\n\\t<Spieler1>\";\t\t\t\n\t\t\tausgabe+=\"\\n\\t\\t<X>\"+40+\"</X>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Y>\"+40+\"</Y>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzBomb>\"+1+\"</AnzBomb>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzLeben>\"+1+\"</AnzLeben>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Handschuh>\"+false+\" </Handschuh>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Kicker>\"+false+ \"</Kicker>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Speed>\"+0.0000275+\"</Speed>\"; \n\t\t\tausgabe+=\"\\n\\t\\t<BombReichweite>\"+2+\"</BombReichweite>\";\n\t\t\tausgabe +=\"\\n\\t</Spieler1>\";\n\t\t\t\n\t\t\tausgabe+=\"\\n\\t<Spieler2>\";\t\t\t\n\t\t\tausgabe+=\"\\n\\t\\t<X>\"+520+\"</X>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Y>\"+520+\"</Y>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzBomb>\"+1+\"</AnzBomb>\";\n\t\t\tausgabe+=\"\\n\\t\\t<AnzLeben>\"+1+\"</AnzLeben>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Handschuh>\"+false+\" </Handschuh>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Kicker>\"+false+ \"</Kicker>\";\n\t\t\tausgabe+=\"\\n\\t\\t<Speed>\"+0.0000275+\"</Speed>\"; \n\t\t\tausgabe+=\"\\n\\t\\t<BombReichweite>\"+2+\"</BombReichweite>\";\n\t\t\tausgabe +=\"\\n\\t</Spieler2>\";\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<ausgabe.length();i++){\n\t\t\t\t\tchar c=ausgabe.charAt(i);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\tausgabe+=\"\\n\\n\\n</level>\";\n\t\t\t\tfor(int i=0;i<ausgabe.length();i++){\n\t\t\t\t\tchar c=ausgabe.charAt(i);\n\t\t\t\t\tif(c=='\\n')\n\t\t\t\t\t\tfwriter.append( System.getProperty(\"line.separator\") );\n\t\t\t\t\telse fwriter.write(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\tfwriter.flush();\n\t\t\t\tfwriter.close();\n\t\t} catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t\n\t\t}\n\t\t\n\t}", "public static ArrayList<APIAppointment> GetAppointmentsFromSampleData(String nodeFilePath, String nodePath) {\n ArrayList<APIAppointment> API_Appointments = new ArrayList<APIAppointment>();\n\n try {\n // Get the SAXReader object \n SAXReader reader = new SAXReader();\n // Get the xml document object by sax reader. \n Document document = reader.read(nodeFilePath);\n List<Node> nodes = document.selectNodes(nodePath);\n\n // Read all the node inside xpath nodes and print the value of each \n for (Node node : nodes) {\n\n APIAppointment API_Appointment = new APIAppointment();\n API_Appointment.setAltID(\"\".equals(node.valueOf(\"AltID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"AltID\"), \"\".getClass(),\n node.valueOf(\"AltID\")));\n API_Appointment.setAttendees(\"\".equals(node.valueOf(\"Attendees\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Attendees\"), \"\".getClass(),\n node.valueOf(\"Attendees\")));\n API_Appointment.setEnd(\"\".equals(node.valueOf(\"End\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"End\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(API_Helper.ConvertLocalTimeToUTC(node.valueOf(\"End\")))));\n API_Appointment.setEventOrMeeting(\"\".equals(node.valueOf(\"EventOrMeeting\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"EventOrMeeting\"), APIEnumEventOrMeeting.class,\n APIEnumEventOrMeeting.valueOf(APIEnumEventOrMeeting.fromValue(node.valueOf(\"EventOrMeeting\")).toString())));\n API_Appointment.setGWMeetingID(\"\".equals(node.valueOf(\"GW_MeetingID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"GWMeetingID\"), \"\".getClass(),\n node.valueOf(\"GW_MeetingID\")));\n API_Appointment.setIsPrivate(\"\".equals(node.valueOf(\"IsPrivate\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"IsPrivate\"), Boolean.class,\n Boolean.parseBoolean(node.valueOf(\"IsPrivate\"))));\n API_Appointment.setLastModified(\"\".equals(node.valueOf(\"LastModified\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"LastModified\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(node.valueOf(\"LastModified\"))));\n API_Appointment.setLocation(\"\".equals(node.valueOf(\"Location\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Location\"), \"\".getClass(),\n node.valueOf(\"Location\")));\n API_Appointment.setMeetingComment(\"\".equals(node.valueOf(\"MeetingComment\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingComment\"), \"\".getClass(),\n node.valueOf(\"MeetingComment\")));\n API_Appointment.setMeetingSubject(\"\".equals(node.valueOf(\"MeetingSubject\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingSubject\"), \"\".getClass(),\n node.valueOf(\"MeetingSubject\")));\n API_Appointment.setMeetingType(\"\".equals(node.valueOf(\"MeetingType\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingType\"), APIEnumMeetingType.class,\n APIEnumMeetingType.valueOf(APIEnumMeetingType.fromValue(node.valueOf(\"MeetingType\")).toString())));\n API_Appointment.setNotifyAction(\"\".equals(node.valueOf(\"NotifyAction\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"NotifyAction\"), APIEnumPushNotifyAction.class,\n APIEnumPushNotifyAction.valueOf(APIEnumPushNotifyAction.fromValue(node.valueOf(\"NotifyAction\")).toString())));\n API_Appointment.setOrganizer(\"\".equals(node.valueOf(\"Organizer\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Organizer\"), \"\".getClass(),\n node.valueOf(\"Organizer\")));\n API_Appointment.setRRule(\"\".equals(node.valueOf(\"RRule\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RRule\"), \"\".getClass(),\n node.valueOf(\"RRule\")));\n API_Appointment.setRVMeetingID(\"\".equals(node.valueOf(\"RV_MeetingID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RVMeetingID\"), \"\".getClass(),\n node.valueOf(\"RV_MeetingID\")));\n API_Appointment.setRoomID(\"\".equals(node.valueOf(\"RoomID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RoomID\"), \"\".getClass(),\n node.valueOf(\"RoomID\")));\n API_Appointment.setStart(\"\".equals(node.valueOf(\"Start\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Start\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(API_Helper.ConvertLocalTimeToUTC(node.valueOf(\"Start\")))));\n\n API_Appointment.setActions(GetActionsListFromNodeList(node));\n API_Appointment.setPreset(GetPresetFromNodeList(node));\n API_Appointment.setRolesForMeeting(GetRolesForMeetingsListFromNodeList(node));\n\n API_Appointments.add(API_Appointment);\n }\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return API_Appointments;\n }", "public static ExaminationType_type1 parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n ExaminationType_type1 object = null;\n // initialize a hash map to keep values\n java.util.Map attributeMap = new java.util.HashMap();\n java.util.List extraAttributeList = new java.util.ArrayList<org.apache.axiom.om.OMAttribute>();\n \n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n while(!reader.isEndElement()) {\n if (reader.isStartElement() || reader.hasText()){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n throw new org.apache.axis2.databinding.ADBException(\"The element: \"+\"ExaminationType_type0\" +\" cannot be null\");\n }\n \n\n java.lang.String content = reader.getElementText();\n \n if (content.indexOf(\":\") > 0) {\n // this seems to be a Qname so find the namespace and send\n prefix = content.substring(0, content.indexOf(\":\"));\n namespaceuri = reader.getNamespaceURI(prefix);\n object = ExaminationType_type1.Factory.fromString(content,namespaceuri);\n } else {\n // this seems to be not a qname send and empty namespace incase of it is\n // check is done in fromString method\n object = ExaminationType_type1.Factory.fromString(content,\"\");\n }\n \n \n } else {\n reader.next();\n } \n } // end of while loop\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public CommandProcessXML(String filePath){\n _xmlFile = new File(filePath);\n _dbFactory = DocumentBuilderFactory.newInstance();\n }", "public void test_fn_current_date_15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-15.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private void createFiles(CodeGeneratorConfiguration config,\n \t\t\tString pathPrefix, ProgressFunction progressFunction,\n \t\t\tlong schemaElements, long currentCount, long interval)\n \t\t\tthrows GraphIOException {\n \t\tGraphCodeGenerator graphCodeGenerator = new GraphCodeGenerator(\n \t\t\t\tgraphClass, packagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, name,\n \t\t\t\tconfig);\n \t\tgraphCodeGenerator.createFiles(pathPrefix);\n \n \t\tfor (VertexClass vertexClass : graphClass.getVertexClasses()) {\n \t\t\tVertexCodeGenerator codeGen = new VertexCodeGenerator(vertexClass,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\tcodeGen.createFiles(pathPrefix);\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tfor (EdgeClass edgeClass : graphClass.getEdgeClasses()) {\n \t\t\tCodeGenerator codeGen = new EdgeCodeGenerator(edgeClass,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\tcodeGen.createFiles(pathPrefix);\n \n \t\t\tif (!edgeClass.isAbstract()) {\n \t\t\t\tcodeGen = new ReversedEdgeCodeGenerator(edgeClass,\n \t\t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\t\tcodeGen.createFiles(pathPrefix);\n \t\t\t}\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t// build records and enums\n \t\tfor (Domain domain : getRecordDomains()) {\n \t\t\t// also generate an abstract class for Records\n \t\t\tCodeGenerator rcode = new RecordCodeGenerator(\n \t\t\t\t\t(RecordDomain) domain, packagePrefix,\n \t\t\t\t\tGRAPH_IMPLEMENTATION_PACKAGE, config);\n \t\t\trcode.createFiles(pathPrefix);\n \t\t\tif (progressFunction != null) {\n \t\t\t\tschemaElements++;\n \t\t\t\tcurrentCount++;\n \t\t\t\tif (currentCount == interval) {\n \t\t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\t\tcurrentCount = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tfor (Domain domain : getEnumDomains()) {\n \t\t\tCodeGenerator ecode = new EnumCodeGenerator((EnumDomain) domain,\n \t\t\t\t\tpackagePrefix, GRAPH_IMPLEMENTATION_PACKAGE);\n \t\t\tecode.createFiles(pathPrefix);\n \t\t}\n \t\tif (progressFunction != null) {\n \t\t\tschemaElements++;\n \t\t\tcurrentCount++;\n \t\t\tif (currentCount == interval) {\n \t\t\t\tprogressFunction.progress(schemaElements);\n \t\t\t\tcurrentCount = 0;\n \t\t\t}\n \t\t}\n \t}", "public static ExaminationType_type0 parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n ExaminationType_type0 object = null;\n // initialize a hash map to keep values\n java.util.Map attributeMap = new java.util.HashMap();\n java.util.List extraAttributeList = new java.util.ArrayList<org.apache.axiom.om.OMAttribute>();\n \n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n while(!reader.isEndElement()) {\n if (reader.isStartElement() || reader.hasText()){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n throw new org.apache.axis2.databinding.ADBException(\"The element: \"+\"ExaminationType_type0\" +\" cannot be null\");\n }\n \n\n java.lang.String content = reader.getElementText();\n \n if (content.indexOf(\":\") > 0) {\n // this seems to be a Qname so find the namespace and send\n prefix = content.substring(0, content.indexOf(\":\"));\n namespaceuri = reader.getNamespaceURI(prefix);\n object = ExaminationType_type0.Factory.fromString(content,namespaceuri);\n } else {\n // this seems to be not a qname send and empty namespace incase of it is\n // check is done in fromString method\n object = ExaminationType_type0.Factory.fromString(content,\"\");\n }\n \n \n } else {\n reader.next();\n } \n } // end of while loop\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void toMoDXSingleSpeedsFile(String fileName) throws IOException {\n // This method prints all the DXSinglsSpeeds objects in the output file.\n\n // define the header of the output file\n // Date date = new Date();\n String fileHeader = \"within Buildings.Fluid.HeatExchangers.DXCoils.Data;\"\n + \"\\n\"\n\n\n + \"package SingleSpeed \\\"Performance data for SingleSpeed DXCoils\\\"\"\n + \"\\n\"\n + \" extends Modelica.Icons.MaterialPropertiesPackage;\\n\"\n + \" annotation(\\n preferredView=\" + \"\\\"\" + \"info\" + \"\\\"\"\n + \",\\n Documentation(info=\\\"<html>\\n<p>\\n\"\n + \"Package with performance data for DX coils.\"\n + \"\\n</p>\\n</html>\\\",\\n\"\n + \" revisions=\\\"<html>\\n\"\n + \"<p>\\nGenerated on \"\n + getDateTime()\n + \" by \"\n + \"tsnouidui.\"\n + \"\\n</p>\\n</html>\\\"));\"\n + \"\\n\"\n\n + \" \"\n + \"record Generic \\\"Generic data record for SingleSpeed DXCoils\\\"\"\n + \"\\n\"\n + \" \"\n + \"extends Buildings.Fluid.HeatExchangers.DXCoils.Data.Generic.DXCoil(final nSta=1);\"\n + \"\\n\"\n + \"annotation(\\n\"\n + \"defaultComponentName=\\\"datCoi\\\",\\n\"\n \t\t+ \"defaultComponentPrefixes=\\\"parameter\\\",\\n\"\n + \"Documentation(info=\\\"<html>\"\n + \"\\n<p>\\n\"\n + \"This record is used as a template for performance data\"\n + \"\\n\"\n + \"for SingleSpeed DXCoils\"\n + \"\\n\"\n + \"<a href=\"\n + \"\\\\\"\n + \"\\\"Buildings.Fluid.HeatExchangers.DXCoils.SingleSpeed\"\n + \"\\\\\"\n + \"\\\">\"\n + \"\\n\"\n + \"Buildings.Fluid.HeatExchangers.DXCoils.SingleSpeed</a>.\"\n + \"\\n</p>\\n\"\n + \"</html>\\\", revisions=\\\"<html>\"\n + \"\\n\"\n + \"<ul>\"\n + \"\\n\"\n + \"<li>\"\n + \"\\n\"\n + \"November 20, 2012 by Thierry S. Nouidui:<br/>\"\n + \"\\n\"\n + \"First implementation.\"\n + \"\\n\"\n + \"</li>\"\n + \"\\n\"\n + \"</ul>\"\n + \"\\n\"\n + \"</html>\\\"));\"\n + \"\\n\"\n + \" end Generic;\"\n + \"\\n\" + \"\\n\";\n\n // store the recorded DXSingleSpeed in a string array\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXSingleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXSingleSpeedsStrings = removeDuplicates(recordedDXSingleSpeedsStrings);\n\n if (rmDuplicatesRecordedDXSingleSpeedsStrings.size() != dxSingleSpeeds\n .size()) {\n System.out\n .println(\"the input file has duplicated DXSingleSpeeds. These duplicates will be automatically removed and listed in the .txt output files\");\n }\n\n // concatenate the cleaned recorded DXSingleSpeeds in a string\n String cleanRecordedDXSingleSpeeds = \"\";\n\n for (Iterator<String> itr = rmDuplicatesRecordedDXSingleSpeedsStrings\n .iterator(); itr.hasNext();) {\n cleanRecordedDXSingleSpeeds += itr.next() + \"\\n\";\n }\n\n // define the footer of the output file\n String fileFooter = \"end SingleSpeed;\";\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n // Some E+ fields have string such as Lennox SCA240H4B Stage 1&2.\n // The & sign needs to be converted to &amp; as it is inside an html section.\n cleanRecordedDXSingleSpeeds = cleanRecordedDXSingleSpeeds.replaceAll(\"&\", \"&amp;\");\n fw.write(fileHeader + cleanRecordedDXSingleSpeeds + fileFooter);\n fw.close();\n }", "public void test_fn_current_date_5() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-5.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-5.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "String createXMLStructure(String szTimeStamp,\n\t\t\tString szUniqueTransactionCode, String szCurrencyCode,\n\t\t\tString szAmount, String szCreditCardNumber, String szValidityMonth,\n\t\t\tString szValidityYear, String szCVVCode, String szBankCountryCode,\n\t\t\tString szBankName, String szCardHolderName, String szCardHolderMail) {\n\n\t\tszTimeStamp = new SimpleDateFormat(\"ddMMyyHHmmss\").format(Calendar\n\t\t\t\t.getInstance().getTime());\n\t\tszUniqueTransactionCode = getMd5Hash(\n\t\t\t\tString.valueOf(System.currentTimeMillis())).substring(0, 20);\n\n\t\tString xmlData = \"<PaymentRequest>\\r\\n\"\n\t\t\t\t+ \" <version>8.0</version>\\r\\n\" + \" <timeStamp>\"\n\t\t\t\t+ szTimeStamp\n\t\t\t\t+ \"</timeStamp>\\r\\n\"\n\t\t\t\t+ \" <merchantID>215</merchantID>\\r\\n\"\n\t\t\t\t+ \" <uniqueTransactionCode>\"\n\t\t\t\t+ szUniqueTransactionCode\n\t\t\t\t+ \"</uniqueTransactionCode>\\r\\n\"\n\t\t\t\t+ \" <desc>Hotel Trip Booking</desc>\\r\\n\"\n\t\t\t\t+ \" <amt>\"\n\t\t\t\t+ szAmount\n\t\t\t\t+ \"</amt>\\r\\n\"\n\t\t\t\t+ \" <currencyCode>\"\n\t\t\t\t+ 764\n\t\t\t\t+ \"</currencyCode>\\r\\n\"\n\t\t\t\t+ \" <pan>\"\n\t\t\t\t+ szCreditCardNumber\n\t\t\t\t+ \"</pan>\\r\\n\"\n\t\t\t\t+ \" <expiry>\\r\\n\"\n\t\t\t\t+ \" <month>\"\n\t\t\t\t+ szValidityMonth\n\t\t\t\t+ \"</month>\\r\\n\"\n\t\t\t\t+ \" <year>\"\n\t\t\t\t+ szValidityYear\n\t\t\t\t+ \"</year>\\r\\n\"\n\t\t\t\t+ \" </expiry>\\r\\n\"\n\t\t\t\t// + \" <storeCardUniqueID></storeCardUniqueID>\\r\\n\"\n\t\t\t\t+ \" <securityCode>\"\n\t\t\t\t+ szCVVCode\n\t\t\t\t+ \"</securityCode>\\r\\n\"\n\t\t\t\t+ \" <clientIP>46.137.157.1</clientIP>\\r\\n\"\n\t\t\t\t+ \" <panCountry>\"\n\t\t\t\t+ szBankCountryCode\n\t\t\t\t+ \"</panCountry>\\r\\n\"\n\t\t\t\t+ \" <panBank>\"\n\t\t\t\t+ Utils.EncodeXML(szBankName)\n\t\t\t\t+ \"</panBank>\\r\\n\"\n\t\t\t\t+ \" <cardholderName>\"\n\t\t\t\t+ Utils.EncodeXML(szCardHolderName)\n\t\t\t\t+ \"</cardholderName>\\r\\n\"\n\t\t\t\t+ \" <cardholderEmail>\"\n\t\t\t\t+ Utils.EncodeXML(szCardHolderMail)\n\t\t\t\t+ \"</cardholderEmail>\\r\\n\"\n\t\t\t\t+ \" <payCategoryID></payCategoryID>\\r\\n\"\n\t\t\t\t+ \" <userDefined1></userDefined1>\\r\\n\"\n\t\t\t\t+ \" <userDefined2></userDefined2>\\r\\n\"\n\t\t\t\t+ \" <userDefined3></userDefined3>\\r\\n\"\n\t\t\t\t+ \" <userDefined4></userDefined4>\\r\\n\"\n\t\t\t\t+ \" <userDefined5></userDefined5>\\r\\n\"\n\t\t\t\t+ \" <storeCard>N</storeCard>\\r\\n\"\n\t\t\t\t+ \" <ippTransaction>N</ippTransaction>\\r\\n\"\n\t\t\t\t+ \" <installmentPeriod>3</installmentPeriod>\\r\\n\"\n\t\t\t\t+ \" <interestType>C</interestType>\\r\\n\"\n\t\t\t\t+ \" <recurring>N</recurring>\\r\\n\"\n\t\t\t\t+ \" <invoicePrefix></invoicePrefix>\\r\\n\"\n\t\t\t\t+ \" <recurringAmount></recurringAmount>\\r\\n\"\n\t\t\t\t+ \" <allowAccumulate></allowAccumulate>\\r\\n\"\n\t\t\t\t+ \" <maxAccumulateAmt>\\r\\n\"\n\t\t\t\t+ \" </maxAccumulateAmt>\\r\\n\"\n\t\t\t\t+ \" <recurringInterval></recurringInterval>\\r\\n\"\n\t\t\t\t+ \" <recurringCount></recurringCount>\\r\\n\"\n\t\t\t\t+ \" <chargeNextDate></chargeNextDate>\\r\\n\"\n\t\t\t\t+ \" <hashValue></hashValue>\\r\\n\" + \"</PaymentRequest>\";\n\n\t\tString szSignature = \"merchantID\" + \"uniqueTransactionCode\" + \"amt\";\n\t\tszSignature = \"215\" + szUniqueTransactionCode + szAmount;\n\n\t\tLog.e(\"TravellerDetailsTabActivity\", \"XML Data:: \" + xmlData);\n\n\t\treturn xmlData;\n\t}", "@Override\n public void makeOutPutData(File file) {\n\n prepareHtmlDataList();\n\n PrintWriter pw = null;\n int cnt = 0;\n\n try {\n pw = new PrintWriter(new FileOutputStream(file, true));\n\n pw.println(\"******************** MainData info ********************\");\n pw.println(\"startLoggingTime : \"\n + ALTHelper\n .DateToString(ALTHelper\n .getTimeStartedBefore(1000)));\n pw.println(\"endLoggingTime : \"\n + ALTHelper\n .DateToString(ALTHelper\n .getTimeLaunched()));\n\n pw.println(\"\");\n\n pw.println(\"******************** Launched info ********************\");\n\n // should implement\n\n pw.println(\"\");\n\n pw.println(\"******************** gc info (top5) sorted by total_time ********************\");\n\n // -----------------------\n\n pw.println(String.format(\"%-20s\", \"time\")\n + String.format(\"%-10s\", \"PID\")\n + String.format(\"%-15s\", \"GC_cause\")\n + String.format(\"%-12s\", \"freedObject\")\n + String.format(\"%-10s\", \"freedByte\")\n + String.format(\"%-13s\", \"freedLObject\")\n + String.format(\"%-11s\", \"freedLByte\")\n + String.format(\"%-13s\", \"percent_free\")\n + String.format(\"%-18s\", \"current_heap_size\")\n + String.format(\"%-13s\", \"total_memory\")\n + String.format(\"%-11s\", \"pause_time\")\n + String.format(\"%-11s\", \"Total_time\"));\n\n ArrayList<GCData> totalTimeList = (ArrayList<GCData>)getGCDataList()\n .clone();\n Collections.sort(totalTimeList, new GCDataComparator(\n GCDataComparator.DataSortType.TOTAL_TIME));\n\n for (GCData gc : totalTimeList) {\n\n if (cnt >= 5)\n break;\n\n pw.println(String.format(\"%-20s\",\n ALTHelper.DateToString(gc.valutOfdate))\n + String.format(\"%-10s\", gc.PID)\n + String.format(\"%-15s\", gc.GC_cause)\n + String.format(\"%-12s\", gc.freedObject)\n + String.format(\"%-10s\", gc.freedByte)\n + String.format(\"%-13s\", gc.freedLObject)\n + String.format(\"%-11s\", gc.freedLByte)\n + String.format(\"%-13s\", gc.percent_free)\n + String.format(\"%-18s\", gc.current_heap_size)\n + String.format(\"%-13s\", gc.total_memory)\n + String.format(\"%-11s\", gc.pause_time)\n + String.format(\"%-11s\", gc.Total_time));\n cnt++;\n }\n\n pw.println(\"\");\n\n // -----------------------\n\n pw.println(\"******************** gc info sorted by date ********************\");\n\n pw.println(String.format(\"GC Total count : %5s\", getGCDataList()\n .size() + \" times\"));\n\n pw.println(String.format(\"%-20s\", \"time\")\n + String.format(\"%-10s\", \"processName\")\n + String.format(\"%-15s\", \"GC_cause\")\n + String.format(\"%-12s\", \"freedObject\")\n + String.format(\"%-10s\", \"freedByte\")\n + String.format(\"%-13s\", \"freedLObject\")\n + String.format(\"%-11s\", \"freedLByte\")\n + String.format(\"%-13s\", \"percent_free\")\n + String.format(\"%-18s\", \"current_heap_size\")\n + String.format(\"%-13s\", \"total_memory\")\n + String.format(\"%-11s\", \"pause_time\")\n + String.format(\"%-11s\", \"Total_time\"));\n\n for (GCData gc : getGCDataList()) {\n pw.println(String.format(\"%-20s\",\n ALTHelper.DateToString(gc.valutOfdate))\n + String.format(\"%-10s\", gc.PID)\n + String.format(\"%-15s\", gc.GC_cause)\n + String.format(\"%-12s\", gc.freedObject)\n + String.format(\"%-10s\", gc.freedByte)\n + String.format(\"%-13s\", gc.freedLObject)\n + String.format(\"%-11s\", gc.freedLByte)\n + String.format(\"%-13s\", gc.percent_free)\n + String.format(\"%-18s\", gc.current_heap_size)\n + String.format(\"%-13s\", gc.total_memory)\n + String.format(\"%-11s\", gc.pause_time)\n + String.format(\"%-11s\", gc.Total_time));\n }\n pw.println(\"\");\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } finally {\n if (pw != null)\n pw.close();\n }\n }", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "static void parseIt() {\n try {\n long start = System.nanoTime();\n int[] modes = {DET_MODE, SUM_MODE, DOUBLES_MODE};\n String[] filePaths = {\"\\\\catalogue_products.xml\", \"\\\\products_to_categories.xml\", \"\\\\doubles.xml\"};\n HashMap<String, String[]> update = buildUpdateMap(remainderFile);\n window.putLog(\"-------------------------------------\\n\" + updateNodes(offerNodes, update) +\n \"\\nФайлы для загрузки:\");\n for (int i = 0; i < filePaths.length; i++) {\n // Define location for output file\n File outputFile = new File(workingDirectory.getParent() + filePaths[i]);\n pushDocumentToFile(outputFile, modes[i]);\n printFileInfo(outputFile);\n }\n window.putLog(\"-------------------------------------\\nВсего обработано уникальных записей: \" +\n offerNodes.size());\n long time = (System.nanoTime() - start) / 1000000;\n window.putLog(\"Завершено без ошибок за \" + time + \" мс.\");\n offerNodes = null;\n //window.workshop.setParseButtonDisabled();\n } catch (TransformerException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \" (\" + e.getException() + \")\\n\\t\" + e.getMessageAndLocation()));\n } catch (ParserConfigurationException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getLocalizedMessage()));\n } catch (SAXException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(\"SAXexception: \" + e.getMessage()));\n\n } catch (IOException e) {\n reportException(Thread.currentThread(),\n new RuntimeException(e.getCause() + \"\\n\\t\" + e.getMessage() + \". \" + e.getStackTrace()[0]));\n }\n }", "private static String generateXML(String userName, String hash,\n String userID, String ipAddress, String paymentToolNumber,\n String expDate, String cvc, String orderID, String amount,\n String currency) {\n\n try {\n // Create instance of DocumentBuilderFactory\n DocumentBuilderFactory factory = DocumentBuilderFactory\n .newInstance();\n // Get the DocumentBuilder\n DocumentBuilder docBuilder = factory.newDocumentBuilder();\n // Create blank DOM Document\n Document doc = docBuilder.newDocument();\n\n Element root = doc.createElement(\"GVPSRequest\");\n doc.appendChild(root);\n\n Element Mode = doc.createElement(\"Mode\");\n Mode.appendChild(doc.createTextNode(\"PROD\"));\n root.appendChild(Mode);\n\n Element Version = doc.createElement(\"Version\");\n Version.appendChild(doc.createTextNode(\"v0.01\"));\n root.appendChild(Version);\n\n Element Terminal = doc.createElement(\"Terminal\");\n root.appendChild(Terminal);\n\n Element ProvUserID = doc.createElement(\"ProvUserID\");\n // ProvUserID.appendChild(doc.createTextNode(userName));\n ProvUserID.appendChild(doc.createTextNode(\"PROVAUT\"));\n Terminal.appendChild(ProvUserID);\n\n Element HashData_ = doc.createElement(\"HashData\");\n HashData_.appendChild(doc.createTextNode(hash));\n Terminal.appendChild(HashData_);\n\n Element UserID = doc.createElement(\"UserID\");\n UserID.appendChild(doc.createTextNode(\"deneme\"));\n Terminal.appendChild(UserID);\n\n Element ID = doc.createElement(\"ID\");\n ID.appendChild(doc.createTextNode(\"10000039\"));\n Terminal.appendChild(ID);\n\n Element MerchantID = doc.createElement(\"MerchantID\");\n MerchantID.appendChild(doc.createTextNode(userID));\n Terminal.appendChild(MerchantID);\n\n Element Customer = doc.createElement(\"Customer\");\n root.appendChild(Customer);\n\n Element IPAddress = doc.createElement(\"IPAddress\");\n IPAddress.appendChild(doc.createTextNode(ipAddress));\n Customer.appendChild(IPAddress);\n\n Element EmailAddress = doc.createElement(\"EmailAddress\");\n EmailAddress.appendChild(doc.createTextNode(\"aa@b.com\"));\n Customer.appendChild(EmailAddress);\n\n Element Card = doc.createElement(\"Card\");\n root.appendChild(Card);\n\n Element Number = doc.createElement(\"Number\");\n Number.appendChild(doc.createTextNode(paymentToolNumber));\n Card.appendChild(Number);\n\n Element ExpireDate = doc.createElement(\"ExpireDate\");\n ExpireDate.appendChild(doc.createTextNode(\"1212\"));\n Card.appendChild(ExpireDate);\n\n Element CVV2 = doc.createElement(\"CVV2\");\n CVV2.appendChild(doc.createTextNode(cvc));\n Card.appendChild(CVV2);\n\n Element Order = doc.createElement(\"Order\");\n root.appendChild(Order);\n\n Element OrderID = doc.createElement(\"OrderID\");\n OrderID.appendChild(doc.createTextNode(orderID));\n Order.appendChild(OrderID);\n\n Element GroupID = doc.createElement(\"GroupID\");\n GroupID.appendChild(doc.createTextNode(\"\"));\n Order.appendChild(GroupID);\n\n\t\t\t/*\n * Element Description=doc.createElement(\"Description\");\n\t\t\t * Description.appendChild(doc.createTextNode(\"\"));\n\t\t\t * Order.appendChild(Description);\n\t\t\t */\n\n Element Transaction = doc.createElement(\"Transaction\");\n root.appendChild(Transaction);\n\n Element Type = doc.createElement(\"Type\");\n Type.appendChild(doc.createTextNode(\"sales\"));\n Transaction.appendChild(Type);\n\n Element InstallmentCnt = doc.createElement(\"InstallmentCnt\");\n InstallmentCnt.appendChild(doc.createTextNode(\"\"));\n Transaction.appendChild(InstallmentCnt);\n\n Element Amount = doc.createElement(\"Amount\");\n Amount.appendChild(doc.createTextNode(amount));\n Transaction.appendChild(Amount);\n\n Element CurrencyCode = doc.createElement(\"CurrencyCode\");\n CurrencyCode.appendChild(doc.createTextNode(currency));\n Transaction.appendChild(CurrencyCode);\n\n Element CardholderPresentCode = doc\n .createElement(\"CardholderPresentCode\");\n CardholderPresentCode.appendChild(doc.createTextNode(\"0\"));\n Transaction.appendChild(CardholderPresentCode);\n\n Element MotoInd = doc.createElement(\"MotoInd\");\n MotoInd.appendChild(doc.createTextNode(\"N\"));\n Transaction.appendChild(MotoInd);\n\n // Convert dom to String\n TransformerFactory tranFactory = TransformerFactory.newInstance();\n Transformer aTransformer = tranFactory.newTransformer();\n StringWriter buffer = new StringWriter();\n aTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,\n \"yes\");\n aTransformer\n .transform(new DOMSource(doc), new StreamResult(buffer));\n return buffer.toString();\n\n } catch (Exception e) {\n return null;\n }\n\n }", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "protected abstract void toXml(PrintWriter result);", "private void createData() {\n//\n// tour = new Tour();\n// tour.setTitle(\"Death Valley\");\n// tour.setDescription(\"A tour to Death Valley\");\n// tour.setPrice(900);\n// tour.setImage(\"death_valley\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n//\n// tour = new Tour();\n// tour.setTitle(\"San Francisco\");\n// tour.setDescription(\"A tour to San Francisco\");\n// tour.setPrice(1200);\n// tour.setImage(\"san_francisco\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n\n ToursPullParser parser = new ToursPullParser();\n tours = parser.parseXML(this);\n\n for (Tour tour : tours) {\n dataSource.create(tour);\n }\n\n }", "@Override \n\t public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { \n\t \n\t\t //String val = atts.getValue(\"val\");\n\t\t //Log.d(\"startElement\", localName + \" : \" + val);\n\t\t \n\t\t if(localName.equalsIgnoreCase(AlarmItemContent.TAG)){\n\t\t\t\n\t\t\t AlarmItemContent vo = new AlarmItemContent();\n\t\t\t \n\t\t\t //if(atts.getValue(AlarmItemContent.prtPosition) != null)\n\t\t\t\t vo.setPosition( ++position ); // atts.getValue(AlarmItemContent.prtPosition)\n\t\t\t vo.setState(atts.getValue(AlarmItemContent.prtState)); // ALARMSTATETYPE_E_ON\n\t\t\t vo.setTime(atts.getValue(AlarmItemContent.prtTime));\n\t\t\t vo.setUri(atts.getValue(AlarmItemContent.prtURI));\n\t\t\t vo.setMetaData(atts.getValue(AlarmItemContent.prtMetaData));\n\t\t\t vo.setVolume(Integer.parseInt(atts.getValue(AlarmItemContent.prtVolume)));\n\t\t\t vo.setFreaquency(atts.getValue(AlarmItemContent.prtFrequency)); // ALARMFREQUENCYTYPE_E_ONCE\n\t\t\t \n\t\t\t _data.add(vo);\n\t\t\t \n\t\t } \n\t\t \n\t }", "public void test_fn_current_date_17() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-17.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-17.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private void collectContextDataCreatContextSituation()\n\t\t\tthrows NumberFormatException, InterruptedException {\n\n\t\twhile (isTransmissionStarted) {\n\t\t\tVector<ContextElement> contextElements = new Vector<>();\n\n\t\t\tm_CASMediator = getCASMediator();\n\n\t\t\t// create the time context element\n\t\t\tContextElement contextElement = new ContextElement();\n\t\t\tcontextElement.setContexttype(\"timecontext\");\n\t\t\tTimeContextElement timeContextElement = new TimeContextElement();\n\t\t\tDate date = new Date();\n\t\t\tTime time = new Time();\n\t\t\ttimeContextElement.setDate(date);\n\t\t\ttimeContextElement.setTime(time);\n\t\t\ttimeContextElement.setContextid(Integer\n\t\t\t\t\t.parseInt(m_timeContextContextIdText.getText()));\n\t\t\tdate.setDay(Integer.parseInt(m_timeContextDateDayText.getText()));\n\t\t\tdate.setMonth(Integer.parseInt(m_timeContextDateMonthText.getText()));\n\t\t\tdate.setYear(Integer.parseInt(m_timeContextDateYearText.getText()));\n\t\t\ttime.setHour(Integer.parseInt(m_timeContextTimeHourText.getText()));\n\t\t\ttime.setMinutes(Integer.parseInt(m_timeContextTimeMinutesText\n\t\t\t\t\t.getText()));\n\t\t\ttime.setSeconds(Integer.parseInt(m_timeContextTimeSecondsText\n\t\t\t\t\t.getText()));\n\t\t\ttime.setAMPM(m_timeContextDayRadio.isSelected() ? \"DAY\" : \"NIGHT\");\n\t\t\tcontextElement.setTimeContextElement(timeContextElement);\n\t\t\tcontextElements.addElement(contextElement);\n\n\t\t\t// create the position context\n\t\t\tcontextElement = new ContextElement();\n\t\t\tcontextElement.setContexttype(\"locationcontext\");\n\t\t\tLocationContextElement locationContextElement = new LocationContextElement();\n\t\t\tPhysicalLocation physicalLocation = new PhysicalLocation();\n\t\t\tGeographicalLocation geographicalLocation = new GeographicalLocation();\n\t\t\tlocationContextElement.setContextid(Integer\n\t\t\t\t\t.parseInt(m_positionContextContextIDText.getText()));\n\t\t\tlocationContextElement.setPhysicalLocation(physicalLocation);\n\t\t\tlocationContextElement\n\t\t\t\t\t.setGeographicalLocation(geographicalLocation);\n\t\t\tphysicalLocation\n\t\t\t\t\t.setCountry(m_positionContextPhysicalLocationCountryText\n\t\t\t\t\t\t\t.getText());\n\t\t\tphysicalLocation\n\t\t\t\t\t.setState(m_positionContextPhysicalLocationStateText\n\t\t\t\t\t\t\t.getText());\n\t\t\tphysicalLocation.setCity(m_positionContextPhysicalLocationCityText\n\t\t\t\t\t.getText());\n\t\t\tphysicalLocation.setPincode(Integer\n\t\t\t\t\t.parseInt(m_positionContextPhysicalLocationPincodeText\n\t\t\t\t\t\t\t.getText()));\n\t\t\tgeographicalLocation\n\t\t\t\t\t.setAltitude(Float\n\t\t\t\t\t\t\t.parseFloat(m_positionContextGeographicalLocationAltitudeText\n\t\t\t\t\t\t\t\t\t.getText()));\n\t\t\tgeographicalLocation\n\t\t\t\t\t.setLatitude(Double\n\t\t\t\t\t\t\t.parseDouble(m_positionContextGeographicalLocationLatitudeText\n\t\t\t\t\t\t\t\t\t.getText()));\n\t\t\tgeographicalLocation\n\t\t\t\t\t.setLongitude(Double\n\t\t\t\t\t\t\t.parseDouble(m_positionContextGeographicalLocationLongitudeText\n\t\t\t\t\t\t\t\t\t.getText()));\n\t\t\tcontextElement.setLocationContextElement(locationContextElement);\n\t\t\tcontextElements.addElement(contextElement);\n\n\t\t\t// get the User context\n\t\t\tcontextElement = new ContextElement();\n\t\t\tcontextElement.setContexttype(\"usercontext\");\n\t\t\tUserContextElement userContextElement = new UserContextElement();\n\t\t\tUserProfile userProfile = new UserProfile();\n\t\t\tHealth health = new Health();\n\t\t\tuserContextElement.setContextid(m_userContextContextIDText\n\t\t\t\t\t.getText());\n\t\t\tuserContextElement.setHealth(health);\n\t\t\tuserContextElement.setUserProfile(userProfile);\n\t\t\tuserProfile\n\t\t\t\t\t.setAge(Integer.parseInt(m_userContextAgeText.getText()));\n\t\t\tuserProfile\n\t\t\t\t\t.setMaritalStatus(m_userContextRadioSingle.isSelected() ? \"Single\"\n\t\t\t\t\t\t\t: \"Married\");\n\t\t\tuserProfile.setSex(m_userContextRadioMale.isSelected() ? \"Male\"\n\t\t\t\t\t: \"Female\");\n\t\t\tuserProfile.setNationality(m_userContextRadioNationalityAustrian\n\t\t\t\t\t.isSelected() ? \"Austrian\" : \"Other\");\n\t\t\thealth.setBloodPressure(m_userContextHealthBloodPressure.getText());\n\t\t\thealth.setHeartRate(m_userContextHealthHeartRate.getText());\n\t\t\thealth.setVoiceTone(m_userContextHealthVoiceTone.getText());\n\t\t\tcontextElement.setUserContextElement(userContextElement);\n\t\t\tcontextElements.addElement(contextElement);\n\n\t\t\t// get the device context\n\t\t\tcontextElement = new ContextElement();\n\t\t\tcontextElement.setContexttype(\"devicecontext\");\n\t\t\tDeviceContextElement deviceContextElement = new DeviceContextElement();\n\t\t\tDevice device = new Device();\n\t\t\tSoftware software = new Software();\n\t\t\tdeviceContextElement.setContextid(Integer\n\t\t\t\t\t.parseInt(m_deviceContextContextIDText.getText()));\n\t\t\tdeviceContextElement.setDevice(device);\n\t\t\tdeviceContextElement.setSoftware(software);\n\t\t\tdevice.setAudio(m_deviceContextAudioRadioYes.isSelected());\n\t\t\tdevice.setBatteryPercentage(m_deviceContextBatteryPercentageSlider\n\t\t\t\t\t.getValue());\n\t\t\tdevice.setMemory(Integer.parseInt(m_deviceContextMemoryText\n\t\t\t\t\t.getText()));\n\t\t\tsoftware.setOperatingsystem(m_deviceContextOperatingSyste.getText());\n\t\t\tsoftware.setVersion(Float.parseFloat(m_deviceOperatingSystemVersion\n\t\t\t\t\t.getText()));\n\t\t\tcontextElement.setDeviceContextElement(deviceContextElement);\n\t\t\tcontextElements.addElement(contextElement);\n\n\t\t\t// get the temperature context\n\t\t\tcontextElement = new ContextElement();\n\t\t\tcontextElement.setContexttype(\"temperaturecontext\");\n\t\t\tTemperatureContextElement temperatureContextElement = new TemperatureContextElement();\n\t\t\tCurrentTemperature currentTemperature = new CurrentTemperature();\n\t\t\tcurrentTemperature.setTemperaturevalue(Integer\n\t\t\t\t\t.parseInt(m_temperatureText.getText()));\n\t\t\ttemperatureContextElement.setCurrentTemperature(currentTemperature);\n\t\t\ttemperatureContextElement.setContextid(501);\n\t\t\tcontextElement\n\t\t\t\t\t.setTemperatureContextElement(temperatureContextElement);\n\t\t\tcontextElements.addElement(contextElement);\n\n\t\t\t// put the context elements in context situation\n\t\t\tm_contextSituation.setContextElements(contextElements);\n\n\t\t\t// communicate the context situation\n\t\t\tm_CASMediator.communicateContextSituation(m_contextSituation);\n\n\t\t\t// communicating context situation every 9 seconds\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Context Situation will be updated in \"\n\t\t\t\t\t\t\t+ m_transmissionFrequencySecondsText.getText()\n\t\t\t\t\t\t\t+ \" seconds\");\n\n\t\t\tThread.sleep(Integer.parseInt(m_transmissionFrequencySecondsText\n\t\t\t\t\t.getText()) * 1000);\n\t\t}\n\n\t}", "public void test_fn_current_date_11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-11.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (StaticError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (DynamicError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } \n \n }", "public void test_fn_current_date_18() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-18.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-18.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_6() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-6.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-6.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertNotNull(actual);\n //assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_16() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-16.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-16.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-1.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertTrue(\"XPath Result Error \" + xqFile + \":\", actual.compareTo(expectedResult) >= 0);\n \n \n }" ]
[ "0.6097975", "0.58662665", "0.5705996", "0.5677416", "0.5671592", "0.55771023", "0.554689", "0.552843", "0.5505448", "0.5501678", "0.54999477", "0.54934967", "0.54904145", "0.5447269", "0.53982186", "0.53775465", "0.5357681", "0.5356965", "0.5316835", "0.53037703", "0.52919775", "0.52539665", "0.5236341", "0.5231733", "0.5218898", "0.52087384", "0.52032906", "0.51871413", "0.5179532", "0.5136188", "0.5127846", "0.5121067", "0.511292", "0.51100165", "0.5094226", "0.50864947", "0.50714755", "0.50714755", "0.50714755", "0.50648695", "0.5054248", "0.5044449", "0.50421816", "0.5038774", "0.502933", "0.5024486", "0.5020161", "0.5014911", "0.49785927", "0.49748203", "0.49503198", "0.49398896", "0.49260843", "0.4923563", "0.49005234", "0.48995465", "0.48986152", "0.48817167", "0.4876453", "0.48643517", "0.48588774", "0.48571014", "0.48569417", "0.48560706", "0.4849695", "0.4837229", "0.4836948", "0.48278877", "0.48168525", "0.48112455", "0.48109248", "0.48086688", "0.48065326", "0.4790935", "0.4789677", "0.4781922", "0.47788435", "0.47754472", "0.4775178", "0.4773739", "0.47737154", "0.47664493", "0.47624972", "0.47622976", "0.4762071", "0.4758541", "0.47582114", "0.47574472", "0.47550976", "0.47550973", "0.4750185", "0.4748115", "0.47411874", "0.47392103", "0.47381932", "0.47375932", "0.472486", "0.47248265", "0.47192144", "0.4718283" ]
0.62731534
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View layout = inflater.inflate(R.layout.fragment_explore, container, false); PlantasInit(getContext()); rv = layout.findViewById(R.id.homerv); rv.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayout.VERTICAL,false)); return layout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
============================================================================== Called when the activity is first created. ==============================================================================
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); strCPU = (TextView)findViewById(R.id.cpu_string); strMEM = (TextView)findViewById(R.id.mem_string); strIO = (TextView)findViewById(R.id.io_string); strGraphics = (TextView)findViewById(R.id.graphics_string); mHandler.removeCallbacks(mUpdateTimeTask); mHandler.postDelayed(mUpdateTimeTask, 100); ShowSplashScreen(); cpuProgress = (ProgressBar) findViewById(R.id.cpu_progress); memProgress = (ProgressBar) findViewById(R.id.mem_progress); ioProgress = (ProgressBar) findViewById(R.id.io_progress); graphicsProgress = (ProgressBar) findViewById(R.id.graphics_progress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "protected void onCreate() {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "public void onCreate() {\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tRemoteUtil.getInstance().addActivity(this);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n AppManager.getAppManager().addActivity(this);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "protected void onFirstUse() {}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tact = this;\n\t}", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tact = this;\n\t}", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\n\t\tpublic void onCreate(Bundle savedInstanceState)\n\t\t\t{\n\t\t\t\tsuper.onCreate(savedInstanceState);\n\t\t\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "public void onCreate();", "public void onCreate();" ]
[ "0.73816615", "0.73552513", "0.73357034", "0.7303058", "0.7214181", "0.7214181", "0.72135156", "0.7199216", "0.7199216", "0.7199216", "0.7199216", "0.7199216", "0.7199216", "0.719518", "0.719518", "0.71840173", "0.715226", "0.7150968", "0.7149334", "0.71411365", "0.71411365", "0.7123958", "0.7086534", "0.7086272", "0.7086272", "0.7074477", "0.7074477", "0.7027377", "0.7026791", "0.7026791", "0.702194", "0.7008894", "0.69245875", "0.69206023", "0.69039685", "0.68664074", "0.6840738", "0.68337774", "0.6832708", "0.6829876", "0.6824414", "0.6822998", "0.68210286", "0.68112713", "0.6794037", "0.6791084", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6784155", "0.6780934", "0.6761434", "0.6757855", "0.6751401", "0.674837", "0.6746516", "0.6743077", "0.6740313", "0.6738266", "0.673559", "0.6731168", "0.6730551", "0.67292047", "0.6725383", "0.6723876", "0.67233914", "0.67233914", "0.67084", "0.6708196", "0.6698472", "0.6698472", "0.6698472", "0.6698472", "0.6698472", "0.6694988", "0.6691585", "0.6689061", "0.6679538", "0.6679538", "0.6679538", "0.6679538", "0.6673406", "0.6673406", "0.6672557", "0.6672557", "0.66684043", "0.6667528", "0.6667422", "0.6658829", "0.6655053", "0.664137", "0.664137" ]
0.0
-1
Runs through recurring times checking if new transaction need to be added
public void CheckRecurring() { // Set up variables ArrayList<Recurring> recurringlist; Recurring recurring; Transaction transaction; long currentime; int id; String name; double amount; String category; long startdate; long nextdate; int timetype; int numofunit; int repeats; int counter; // Load all recurring objects into arraylist dbHandler.OpenDatabase(); recurringlist = dbHandler.getAllRecurring(); // cycle through arraylist for (int i = 0; i < recurringlist.size(); i++) { currentime = dateHandler.currentTimeMilli(); recurring = recurringlist.get(i); nextdate = recurring.getNextDate(); if (recurring.getCounter() < 1){ break; } // if nextdate < current date if (currentime > nextdate){ // add transaction (with recurring id different) transaction = transferringObjects.RecurringToTransaction(recurring); dbHandler.addTransaction(transaction); // reduce counter by 1 counter = recurring.getCounter() - 1; recurring.setCounter(counter); // update nextdate timetype = recurring.getTimeType(); numofunit = recurring.getNumofUnit(); nextdate = dateHandler.nextDate(timetype,numofunit,nextdate); recurring.setNextDate(nextdate); dbHandler.editRecurring(recurring); // recheck this recurring object i--; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkNewTrans(JsonObject block){\n \tJsonArray transactions = block.get(\"Transactions\").getAsJsonArray();\n \tint N = transactions.size();\n \tfor (int i=0; i<N; i++) {\n \t\tJsonObject Tx = transactions.get(i).getAsJsonObject();\n \t\tif (TxPool_used.contains(Tx))\n \t\t\treturn false;\n }\n return true;\n }", "public void grantTickets(){\n //45mins\n if (tempTime >= 10){\n addTicket();\n }\n tempTime = 0;\n }", "private void assertUpdateRecurringTasks(Task tryUpdate, TaskOccurrence nextTaskOccurrence, final int numOfOccurrences) {\n assertEquals(\"The following daily task should have been created\", tryUpdate.getTaskDateComponent().size(), numOfOccurrences);\n assertEquals(\"Daily task should match in task occurrence\", tryUpdate.getLastAppendedComponent(), nextTaskOccurrence);\n }", "private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }", "boolean hasTransactionChangesPending() {\n// System.out.println(transaction_mod_list);\n return transaction_mod_list.size() > 0;\n }", "@Scheduled(fixedRate = 60_000)\n public void checkEventTime() {\n isTimeService.findAll().forEach(event -> {\n if (event.getSchedulledTime().isBefore(LocalDateTime.now())) {\n this.producer.sendReachTimeMessage(new IsTime(event.getMessageId()));\n this.isTimeService.deleteById(event.getSchedulledId());\n }\n });\n// log.info(\"Schedulled time check.\");\n }", "public void checkAddTrackDay() {\n int hour = this.timeTrankiManager.getHour();\n int minute = this.timeTrankiManager.getMinute();\n\n if (hour == 9 && minute == 00) {\n this.trackListFinal.addTrackDay(1);\n }\n }", "@Override\n\tboolean allow() {\n\t\tlong curTime = System.currentTimeMillis()/1000 * 1000;\n\t\tlong boundary = curTime - 1000;\n\t\tsynchronized (log) {\n\t\t\t//1. Remove old ones before the lower boundary\n\t\t\twhile (!log.isEmpty() && log.element() <= boundary) {\n\t\t\t\tlog.poll();\n\t\t\t}\n\t\t\t//2. Add / log the new time\n\t\t\tlog.add(curTime);\n\t\t\tboolean allow = log.size() <= maxReqPerUnitTime;\n\t\t\tSystem.out.println(curTime + \", log size = \" + log.size()+\", allow=\"+allow);\n\t\t\treturn allow;\n\t\t}\n\t}", "public void checkAddTrack() {\n this.trackList.sort();\n int time = this.timeTrankiManager.getTrackTimeOfNext();\n Date dateCorruent = this.timeTrankiManager.getTime();\n\n if (time > 0) {\n Track trackIndicated = this.trackList.getTracklessTime(time);\n if (trackIndicated != null) {\n this.trackListFinal.addTrack(dateCorruent, trackIndicated);\n this.trackList.removeTrack(trackIndicated);\n this.timeTrankiManager.addMinute(trackIndicated.getTime());\n } else {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n this.trackListFinal.addEmpityEspace();\n resetTimeTrackingManager();\n }\n \n } else if (time == -1) {\n this.trackListFinal.addTrack(dateCorruent, \"Lunch\");\n this.timeTrankiManager.addMinute(60);\n } else if (time == -2) {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n this.trackListFinal.addEmpityEspace();\n resetTimeTrackingManager();\n } else {\n this.trackListFinal.addTrack(dateCorruent, \"Networking Event\");\n resetTimeTrackingManager();\n }\n }", "public void testSaveTableByTimeWithTxTemplateInService() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 3\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing2();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableServiceFailing());\n\t}", "boolean hasTransactionDateTime();", "public boolean process() {\n\t\t// waits 5 milliseconds(simulates a slow task, such as accessing a remote system)\n\t\ttry {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// error every 10 transactions\n\t\tboolean success = id % 10 != 0;\n\t\tlogger.debug(\"Transaction processed: \" + id + \"; Result: \" + success);\n\t\treturn success;\n\t}", "@Test\n void checkBidAddedAfterSubscribeBidding(){\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,1,2950,1);\n boolean added=false;\n for (Bid b:store.getBids()\n ) {\n if(b.getProductID()==1&&b.getUserID()==NofetID&&b.getPrice()==2950&&b.getQuantity()==1){\n added=true;\n }\n }\n assertTrue(added);\n }", "public void checkExpiration(){\n //Will grab the time from the timer and compare it to the job expiration\n //Then will grab each jobID that is expired\n //Will then add it to a String array\n //then remove all those jobs in the String array\n //return true if found\n\n for(int i=0; i < jobs.size(); i++){\n currentJob = jobs.get(i);\n if(currentJob.getExpData().compareTo(JobSystemCoordinator.timer.getCurrentDate())==0){\n currentJob.setStatus(\"EXPIRED\");\n }\n }\n }", "void addTransaction(Transaction transaction, long timestamp) throws TransactionNotInRangeException;", "public static boolean insertReserveTimeList(List<ReserveTime> reserveTimes){\n\t\tConnection connection = DBConnection.getConnection();\n\t\tfor(ReserveTime reserveTime : reserveTimes) {\n\t\t\tif(!executeInsertUpdate(reserveTime, insertCommand, connection)) {\n\t\t\t\tDBConnection.closeConnection(connection);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tDBConnection.closeConnection(connection);\n\t\treturn true;\n\t}", "public void testSaveTableByTimeWithTxTemplateInTest() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 2\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableFailing());\n\t}", "@PostMapping(\"/saveTransaction\")\n\t@Timed\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic void saveTransaction(@Valid @RequestBody TransactionDTO transaction) {\n\t\tlog.debug(\"Called saveTransaction {}\", transaction);\n\t\ttransaction.setStatus(Status.INITIATED.name());\n\t\tTransaction tx = transactionService.saveTransaction(transaction);\n\n\t\tlog.debug(\"Tx Registered {}\", tx);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = new Date();\n\n\t\tlong Seconds = 10;\n\n\t\tTimer timer = new Timer();\n\n\t\ttimer.schedule(new TimerTask() {\n\t\t\tint counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tString comparedValue = null;\n\t\t\t\t\tString url = \"\";\n\t\t\t\t\tif (StringUtils.equals(tx.getCurrency(), \"ETH\")) {\n\t\t\t\t\t\ttransaction.setStatus(Status.CONNECTED.name());\n\t\t\t\t\t\turl = \"http://api\" + CAN_NETWORK + \"etherscan.io/api?module=account&action=txlist&address=\"\n\t\t\t\t\t\t\t\t+ ETHER_ADDRESS + \"&startblock=0&endblock=999999999&sort=asc&apikey=\" + key;\n\t\t\t\t\t\tcomparedValue = tx.getEth();\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\turl = \"http://api\" + CAN_NETWORK + \"etherscan.io/api?module=account&action=tokentx&address=\"\n\t\t\t\t\t\t\t\t+ ETHER_ADDRESS + \"&startblock=0&endblock=999999999&sort=asc&apikey=\" + key;\n\t\t\t\t\t\tcomparedValue = tx.getEth();\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(url);\n\t\t\t\t\tTransaction txDatac = transactionRepository.findOneByOrderid(transaction.getKey());\n\n\t\t\t\t\tif (StringUtils.equals(txDatac.getStatus(), Status.INITIATED.name())) {\n\t\t\t\t\t\tHttpClient client = HttpClientBuilder.create().build();\n\n\t\t\t\t\t\tif (counter == 360) {\n\t\t\t\t\t\t\tTransaction txData = transactionRepository.findOneByOrderid(tx.getOrderid());\n\t\t\t\t\t\t\ttxData.setStatus(Status.TIMEOUT.name());\n\t\t\t\t\t\t\ttransactionRepository.save(txData);\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tHttpGet request = new HttpGet(url);\n\t\t\t\t\t\tHttpResponse response = client.execute(request);\n\n\t\t\t\t\t\tSystem.out.println(\"Response Code : \" + response.getStatusLine().getStatusCode());\n\n\t\t\t\t\t\tBufferedReader rd = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(response.getEntity().getContent()));\n\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t\t\t\tresult.append(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trd.close();\n\t\t\t\t\t\trequest.abort();\n\t\t\t\t\t\tObjectMapper jsonParserClient = new ObjectMapper();\n\n\t\t\t\t\t\tEtherscan etherscan = jsonParserClient.readValue(result.toString(), Etherscan.class);\n\t\t\t\t\t\tTransaction txData = transactionRepository.findOneByOrderid(tx.getOrderid());\n\t\t\t\t\t\tfor (Result ethplorer : etherscan.getResult()) {\n\t\t\t\t\t\t\tDate longdate = new java.util.Date(Long.parseLong(ethplorer.getTimeStamp()) * 1000);\n\t\t\t\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\t\tString dateString = formatter.format(longdate);\n\t\t\t\t\t\t\tString value = String.format(\"%.6f\",\n\t\t\t\t\t\t\t\t\tDouble.parseDouble(ethplorer.getValue()) / 1000000000000000000l);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Double ---- \" + comparedValue + \" equals to \" + value);\n\t\t\t\t\t\t\tif (StringUtils.equals(compareDates(dateString, dateFormat.format(date)), \"after\")\n\t\t\t\t\t\t\t\t\t&& StringUtils.contains(value, comparedValue)) {\n\t\t\t\t\t\t\t\tlog.debug(\"Tx Processed {}\", tx.getOrderid());\n\t\t\t\t\t\t\t\tSystem.out.println(\"Tx Processed {}\");\n\t\t\t\t\t\t\t\ttxData.setStatus(Status.IDENTIFIED.name());\n\t\t\t\t\t\t\t\ttxData.setHash(ethplorer.getHash());\n\t\t\t\t\t\t\t\ttxData.setDate(dateString);\n\t\t\t\t\t\t\t\ttransactionRepository.save(txData);\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trequest.releaseConnection();\n\t\t\t\t\t}\n\n\t\t\t\t\ttxDatac = transactionRepository.findOneByOrderid(transaction.getKey());\n\n\t\t\t\t\tif (StringUtils.equals(txDatac.getStatus(), Status.IDENTIFIED.name())) {\n\t\t\t\t\t\tlog.debug(\"Called staging {}\", txDatac);\n\t\t\t\t\t\tSystem.out.println(\"Transferring\");\n\n\t\t\t\t\t\ttxDatac.setStatus(Status.AUTHENTICATED.name());\n\n\t\t\t\t\t\tWeb3j web3 = Web3j.build(new HttpService(CAN_INFURA));\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tBigInteger gasprice = web3.ethGasPrice().send().getGasPrice();\n\t\t\t\t\t\t\tSystem.out.println(\"Gas Price \" + gasprice);\n\t\t\t\t\t\t\tlog.debug(\"Gas Price {}\", gasprice);\n\t\t\t\t\t\t\tBigInteger gaslimit = BigInteger.valueOf(90000);\n\t\t\t\t\t\t\tBigDecimal value = new BigDecimal(txDatac.getAmount());\n\t\t\t\t\t\t\tCanYaCoin contract = CanYaCoin.load(CAN_CONTRACT, web3, credentials, gasprice, gaslimit);\n\n\t\t\t\t\t\t\tBigDecimal valueToMultiply = new BigDecimal(\"1000000\");\n\n\t\t\t\t\t\t\tBigDecimal s = value.multiply(valueToMultiply);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Address is \" + txDatac.getAddress());\n\t\t\t\t\t\t\tTransactionReceipt transactionReceipt = contract\n\t\t\t\t\t\t\t\t\t.transfer(txDatac.getAddress(), s.toBigInteger()).send();\n\t\t\t\t\t\t\tSystem.out.println(\"HASH \" + transactionReceipt.getTransactionHash());\n\t\t\t\t\t\t\tSystem.out.println(\"SUCCESS\");\n\t\t\t\t\t\t\ttxDatac.setStatus(Status.COMPLETE.name());\n\t\t\t\t\t\t\ttxDatac.setHashethertoaccount(transactionReceipt.getTransactionHash());\n\t\t\t\t\t\t\tlog.debug(\"CAN Sent {}\", txDatac);\n\t\t\t\t\t\t\ttransactionRepository.save(txDatac);\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t\ttxDatac.setStatus(Status.ERROR.name());\n\t\t\t\t\t\t\ttransactionRepository.save(txDatac);\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Tx Error {}\", e.getMessage());\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 0, 1000 * Seconds);\n\n\t}", "private void check() {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date date = new Date();\n Date date2 = new Date();\n\n Calendar calendar = Calendar.getInstance();\n date = calendar.getTime();\n\n // Se traen todos los miembros.\n Iterator e = memberBroker.getList(\"name\", \"ASC\");\n membersData member;\n accountsData account;\n //Calendar hoy = Calendar.getInstance();\n StringBuffer managerBody = new StringBuffer(\"\");\n StringBuffer memberBody = new StringBuffer(\"\");\n sendMail sm = new sendMail();\n\n\n while (e.hasNext()) { \n member = new membersData();\n account = new accountsData();\n member = (membersData) e.next();\n account=(accountsData) accountBroker.getData(member.getId_account());\n \n \n System.out.println(\"CHECKING (\" + member.getname() + -+member.getid() + -+member.getId_account() + \")\");\n\n //String mainURL = TMSConfigurator.getMainURL();\n String mainURL = account.getMain_url();\n managerBody = new StringBuffer(\"\");\n\n memberBody = new StringBuffer(\"\");\n\n // Se toma la fecha de hoy y la fecha de expiracion y se calcula la diferencia\n date2 = member.getExpired_date();\n long days = daysBetween(new Date(date.getTime()), new Date(date2.getTime()));\n \n if (days == 1) {\n System.out.println(\"un dia antes\");\n memberBody.append(\"Cuenta: \" + member.getname() + \"<br>\");\n memberBody.insert(0, \"La cuenta esta apunto de expirar le queda \" + days + \".<br>\");\n sm.sendCheckTasks(member.getemail_work(), memberBody.toString());\n\n managerBody.append(\"<BLOCKQUOTE>Miembro: \" + member.getname() + \"<br>\");\n managerBody.insert(0, \"La cuenta esta apunto de expirar le queda \"+days+\".<br>\");\n \n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n\n }\n if (days == 0) {\n System.out.println(\"ultimo dia\");\n memberBody.append(\"Cuenta: \" + member.getname() + \"<br>\");\n memberBody.insert(0, \"La cuenta esta apunto de expirar le queda \" + days + \".<br>\");\n sm.sendCheckTasks(member.getemail_work(), memberBody.toString());\n\n managerBody.append(\"<BLOCKQUOTE>Miembro: \" + member.getname() + \"<br>\");\n managerBody.insert(0, \"La cuenta esta apunto de expirar le queda \"+days+\".<br>\");\n \n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n }\n if (days == 7) {\n System.out.println(\"a una semana\");\n memberBody.append(\"Cuenta: \" + member.getname() + \"<br>\");\n memberBody.insert(0, \"La cuenta esta apunto de expirar le queda \" + days + \".<br>\");\n sm.sendCheckTasks(member.getemail_work(), memberBody.toString());\n\n managerBody.append(\"<BLOCKQUOTE>Miembro: \" + member.getname() + \"<br>\");\n managerBody.insert(0, \"La cuenta esta apunto de expirar le queda \"+days+\".<br>\");\n \n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n sm.sendCheckTasks(account.getEmail(),\n managerBody.toString());\n }\n /*if (hoy.getTimeInMillis() > end) {\n // Ya estas atrasado mas alla del umbral maximo permitido!!\n System.out.println(\"\\t\\t\\tAtrasada!!\");\n if (atrasadoEquipo == false) {\n // Al menos un miembro del equipo esta atrazado.\n managerBody.append(\"Proyecto: \" + proyecto.getname() + \"<br>\");\n atrasadoEquipo = true;\n }\n if (atrasado == false) {\n // Este member no estaba atrasado, se agrega el encabezado para\n // su email. \n memberBody.append(\"Proyecto: \" + proyecto.getname() + \"<br>\");\n managerBody.append(\"<BLOCKQUOTE>Miembro: \" + team.getparentMember().getname() + \"<br>\");\n }\n if (team.getparentMember().getprofile().equals(\"0\") ||\n team.getparentMember().getprofile().equals(\"1\")) {\n // Siempre el mensaje de atrazo, pero no es un usuario externo\n memberBody.append(\"<BLOCKQUOTE>Tarea (<a href='\" + mainURL + \"/tasks.do?operation=view&id=\" +\n task.getid() + \"'>\" + task.getname() + \"</a>):\\tAtrasada<br>\" +\n \"</BLOCKQUOTE>\");\n } else {\n // Se trata de un usuario del cliente\n memberBody.append(\"<BLOCKQUOTE>Tarea (<a href='\" + mainURL + \"/portalTasks.do?operation=view&id=\" +\n task.getid() + \"'>\" + task.getname() + \"</a>):\\tAtrasada<br>\" +\n \"</BLOCKQUOTE>\");\n }\n managerBody.append(\"<BLOCKQUOTE>Tarea (<a href='\" + mainURL + \"/tasks.do?operation=view&id=\" +\n task.getid() + \"'>\" + task.getname() + \"</a>):\\tAtrasada<br>\" + \"\\t Asignada a: \" +\n (task.getassigned_to() == 0 ? \"No Asignada\" : task.getparentAssigned().getname()) +\n \"</BLOCKQUOTE>\");\n // Se cambia el valor\n atrasado = true;\n } else {\n System.out.println(\"\\t\\t\\tOK!!\");\n }\n // Se le envia el email al miembro del equipo si y solo si esta atrazado\n if (atrasado) {\n // enviar correo al usuario\n memberBody.insert(0, \"Las siguientes tareas est&aacute;n atrasadas m&aacute;s all&aacute; del umbral de tolerancia permitido.<br>\");\n managerBody.append(\"</BLOCKQUOTE>\");\n sm.sendCheckTasks(team.getparentMember().getemail_work(),\n memberBody.toString());\n }\n // Si alguien del proyecto esta atrazado se envia la lista de cada member\n // al administrador\n if (atrasadoEquipo) {\n managerBody.insert(0, \"Las siguientes tareas est&aacute;n atrasadas m&aacute;s all&aacute; del umbral de tolerancia permitido.<br>\");\n sm.sendCheckTasks(proyecto.getparentOwner().getemail_work(),\n managerBody.toString());\n }\n */\n\n\n // while de miembros\n\n\n }\n }", "public static void ProcessTransaction(){\r\n\t Iterator<String> iter = masterEventsFile.iterator();\r\n\t //this uses the deletePastEvents method to delete all the past events in the masterEventsFile\r\n\t while (iter.hasNext()){\r\n\t\t String e = iter.next();\r\n\t \r\n\t //for (String e : masterEventsFile){\r\n\t\t Event CheckEvent = new Event(e);\r\n\t\t boolean pastDate = deletePastEvents(CheckEvent);\r\n\t\t if (!pastDate){\r\n\t\t\t break;\r\n\t\t } \r\n\t }\r\n\t //makes each line of the masterEventFile into an Event object for easier processing\r\n\t for (String e : masterEventsFile){\r\n\t\t Event event = new Event(e);\r\n\t\t alteredEventsFile.add(event);\r\n\t }\r\n\t //makes each line into a Transaction object for easier processing\r\n\t for (String t: mergedEventTransactionFile){\r\n\t\t Transaction transaction= new Transaction(t);\r\n\t\t allTransactions.add(transaction);\r\n\t }\r\n\t \r\n\t //Iterates through each Transaction processing them one at a time based on their id\r\n\t for (Transaction t: allTransactions){\r\n\t\t //process sell, return, create, add, delete,end\r\n\t\t if(t.id == 00){\r\n\t\t\t break;\r\n\t\t }\r\n\t\t Event changeEvent = findEvent(t.name);\r\n\t\t if (changeEvent != null){\r\n\t\t\t if (t.id == 01){\t\t\t\t\t\t//sell transaction\r\n\t\t\t\t if((changeEvent.ticket -t.ticket)<0){\r\n\t\t\t\t\t System.out.println(\"Sell transaction could not be performed, not enough tickets\"); //Contraints: no event should ever have a negative nmber of ticekts\r\n\t\t\t\t }else{\r\n\t\t\t\t\t changeEvent.ticket = changeEvent.ticket -t.ticket;\r\n\t\t\t\t }\r\n\t\t\t }else if (t.id == 02){\t\t\t\t//return transaction\r\n\t\t\t\t changeEvent.ticket =changeEvent.ticket + t.ticket;\r\n\t\t\t }else if (t.id == 04){\t\t\t\t//add transaction\r\n\t\t\t\t changeEvent.ticket += t.ticket;\t\r\n\t\t\t }else if (t.id == 05){\t\t\t\t//delete transaction\r\n\t\t\t\t changeEvent = null;\r\n\t\t\t }\r\n\t\t }else{\t\t\t\t\t\t\t\t//constraint: a new event must have a name different from all existing events\r\n\t\t\t if(t.id == 03){\t\t\t\t\t\t//create transaction\r\n\t\t\t\t Event newEvent = new Event (t.getEventLine());\r\n\t\t\t\t InsertEvent(newEvent);\t\t//constraint: <asterEventFile must be kept in ascending order by date\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t \r\n\t String newMasterEventsFile = \"\";\r\n\t String newCurrentEventsFile = \"\"\r\n\t\t\t ;\r\n\t // creates two strings in proper format for output to currenteventsFile and MasterEventsFile\r\n\t for (Event e: alteredEventsFile){\t\t\t\t\t\t\t\t//assumes correct input... constraint:every line is exactly 33 characters(plus newline)\r\n\t\t newMasterEventsFile += e.getEventLine() +\"\\n\";\r\n\t\t newCurrentEventsFile += e.getCurrentEventLine() + \"\\n\";\r\n\t }\r\n\t \r\n\t //does file output stuff\r\n\t try{\r\n\t\t endBackEnd(newMasterEventsFile, newCurrentEventsFile);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "@Test\n\tpublic void addTransaction() {\n\t\tTransaction transaction = createTransaction();\n\t\tint size = transactionService.getTransactions().size();\n\t\ttransactionService.addTransaction(transaction);\n\t\tassertTrue(\"No transaction was added.\", size < transactionService.getTransactions().size());\n\t}", "TemporalService accountingForTransmissionTime();", "public boolean insertTransactionsAndCreateAccounts(List<Transaction> transactions) {\n\t\ttry (final AutoCommittingHandle handle = new AutoCommittingHandle(dbi)) {\n\t\t\ttry {\n\t\t\t\t// fetch all existing accounts, initializing a map entry for each that contains an empty set of\n\t\t\t\t// transactions as its value\n\t\t\t\tfinal Map<Account, List<Transaction>> existingAccounts = new HashMap<>();\n\t\t\t\tfor (final Account existingAccount : getAccountsWithTransactions(handle)) {\n\t\t\t\t\texistingAccounts.put(existingAccount, new ArrayList<>());\n\t\t\t\t}\n\n\t\t\t\t// a map of new accounts to add\n\t\t\t\tfinal Map<Account, List<Transaction>> newAccounts = new HashMap<>();\n\n\t\t\t\t// sort new transactions into the map of accounts\n\t\t\t\tfor (final Transaction transaction : transactions) {\n\t\t\t\t\tfinal Optional<Account> existingAccount = existingAccounts.keySet()\n\t\t\t\t\t .stream()\n\t\t\t\t\t .filter(a -> a.getAccountNumber()\n\t\t\t\t\t .equals(transaction.getAccountNumber()))\n\t\t\t\t\t .findFirst();\n\t\t\t\t\tfinal Optional<Account> newAccount = newAccounts.keySet()\n\t\t\t\t\t .stream()\n\t\t\t\t\t .filter(a -> a.getAccountNumber()\n\t\t\t\t\t .equals(transaction.getAccountNumber()))\n\t\t\t\t\t .findFirst();\n\n\t\t\t\t\tif (!existingAccount.isPresent() && newAccount.isPresent()) {\n\t\t\t\t\t\tnewAccounts.get(newAccount.get()).add(transaction);\n\t\t\t\t\t} else if (existingAccount.isPresent() && !newAccount.isPresent()) {\n\t\t\t\t\t\texistingAccounts.get(existingAccount.get()).add(transaction);\n\t\t\t\t\t} else if (!existingAccount.isPresent() && !newAccount.isPresent()) {\n\t\t\t\t\t\tfinal List<Transaction> newTransactions = Arrays.asList(transaction);\n\t\t\t\t\t\t// TODO: can we assume account type and balance/currency? - instead, prompt user for details?\n\t\t\t\t\t\tfinal Account account = Account.newBuilder(transaction.getAccountNumber())\n\t\t\t\t\t\t .setType(AccountType.CHECKING)\n\t\t\t\t\t\t .setBalance(Money.zero(CurrencyUnit.CAD))\n\t\t\t\t\t\t .addTransactions(newTransactions)\n\t\t\t\t\t\t .build();\n\t\t\t\t\t\tnewAccounts.put(account, newTransactions);\n\t\t\t\t\t} else if (existingAccount.isPresent() && newAccount.isPresent()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Account can't exist in new and existing maps\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (final Entry<Account, List<Transaction>> entry : newAccounts.entrySet()) {\n\t\t\t\t\t// sum the transactions to compute an updated balance for the account\n\t\t\t\t\tfinal List<Money> transactionAmounts = entry.getValue()\n\t\t\t\t\t .stream()\n\t\t\t\t\t .map(Transaction::getAmount)\n\t\t\t\t\t .collect(Collectors.toList());\n\t\t\t\t\tfinal Money balance = Money.zero(entry.getKey().getBalance().getCurrencyUnit())\n\t\t\t\t\t .plus(transactionAmounts);\n\n\t\t\t\t\t// insert a copy of the account with the correct balance and list of transactions\n\t\t\t\t\tfinal Account updatedAccount = Account.newBuilder(entry.getKey())\n\t\t\t\t\t .setBalance(balance)\n\t\t\t\t\t .addTransactions(entry.getValue())\n\t\t\t\t\t .build();\n\n\t\t\t\t\tinsertAccountWithTransactions(handle, updatedAccount);\n\t\t\t\t}\n\n\t\t\t\tfor (final Entry<Account, List<Transaction>> entry : existingAccounts.entrySet()) {\n\t\t\t\t\t// sum the transactions to compute an updated balance for the account\n\t\t\t\t\tfinal List<Money> transactionAmounts = entry.getValue()\n\t\t\t\t\t .stream()\n\t\t\t\t\t .map(Transaction::getAmount)\n\t\t\t\t\t .collect(Collectors.toList());\n\t\t\t\t\tfinal Money balance = entry.getKey()\n\t\t\t\t\t .getBalance()\n\t\t\t\t\t .plus(transactionAmounts);\n\n\t\t\t\t\t// update the account with the correct balance and set of transactions\n\t\t\t\t\t// this adds the new transactions to the set of transactions already in the account\n\t\t\t\t\tfinal Account updatedAccount = Account.newBuilder(entry.getKey())\n\t\t\t\t\t .setBalance(balance)\n\t\t\t\t\t .addTransactions(entry.getValue())\n\t\t\t\t\t .build();\n\n\t\t\t\t\taccountDao.updateAccount(handle, updatedAccount);\n\t\t\t\t\ttransactionDao.insertTransactions(handle, entry.getValue());\n\t\t\t\t}\n\t\t\t} catch (final Exception ex) {\n\t\t\t\tlog.error(\"Failed to insert tranactions\", ex);\n\t\t\t\thandle.rollback();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "boolean hasExchangeTime();", "private static boolean interestAlreadyAddedThisMonth() {\n\t\tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t try {\n\t \tClass.forName(JDBCdriver.JDBC_DRIVER);\n\t \t\n\t \tconn = DriverManager.getConnection(JDBCdriver.DB_URL, JDBCdriver.USERNAME, JDBCdriver.PASSWORD);\n\t \t\n\t stmt = conn.createStatement();\n\t \t \n\t sql = \"SELECT *\" +\n\t \" FROM TRANSACTIONS T\" +\n\t \t \" WHERE T.TYPE = 'A'\";\t \n\t \n ResultSet rs = stmt.executeQuery(sql);\n \t \n \t while(rs.next()){\n \t return true;\n \t }\n \t \n \t rs.close();\n \t \n \t return false;\n\t \n\t }catch(SQLException se){\n\t //Handle errors for JDBC\n\t se.printStackTrace();\n\t }catch(Exception e){\n\t //Handle errors for Class.forName\n\t e.printStackTrace();\n\t }finally{\n\t try{\n\t if(conn!=null)\n\t conn.close();\n\t }catch(SQLException se){\n\t se.printStackTrace();\n\t }//end finally try\n\t }//end try\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isRecurring() {\n\t\treturn true;\n\t}", "public void checkOfficeActionPeriod1(){\n\n System.out.println(\"checking Office Action period 1 status for filings : \"+firstOfficeActionDuration);\n\n BaseTradeMarkApplicationService baseTradeMarkApplicationService = serviceBeanFactory.getBaseTradeMarkApplicationService();\n\n\n for(Iterator<BaseTrademarkApplication> iter = baseTradeMarkApplicationService.findAll().iterator(); iter.hasNext(); ) {\n\n BaseTrademarkApplication current = iter.next();\n if(current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"Non-Final Action Mailed\") == true){\n // check that date + duration against current time\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod()) < new Date().getTime()){\n\n System.out.println(\"Filing has expired from the office action period\");\n\n // check if office action has been completed ..\n for(Iterator<OfficeActions> iter3 = current.getOfficeActions().iterator(); iter3.hasNext(); ) {\n OfficeActions current3 = iter3.next();\n\n if(current3.isOfficeActionCompleted() == false && current.getFilingStatus().contains(\"Abandoned\") == false){\n\n // remove office action ..or set it to inactive\n // so on the dashboard. we only show actions that are active\n //\n // do the same thing. create petition object and attach it to the filing\n Petition petition = new Petition();\n petition.setParentMarkImagePath(current.getTradeMark().getTrademarkImagePath());\n petition.setStandardCharacterMark(current.isStandardTextMark());\n petition.setStandardCharacterText(current.getTradeMark().getTrademarkStandardCharacterText());\n petition.setParentMarkOwnerName(current.getPrimaryOwner().getOwnerDisplayname());\n petition.setParentSerialNumber(current.getTrademarkName());\n petition.setParentRegistrationNumber(current.getRegistrationID());\n\n petition.setActionID(String.valueOf(current3.getInternalID()));\n\n long dueDate = new Date().getTime()+current.getBlackOutPeriod()+current.getOfficeActionResponsePeriod()+current.getPetitionPeriod();\n petition.setDueDate(new Date(dueDate));\n\n\n current.setFilingStatus(\"Abandoned - Failure to Respond or Late Response\");\n petition.setOfficeActionCode(\"Abandoned - Failure to Respond or Late Response\");\n petition.setPetitionTitle(\"Failure to Respond Timely to Office Action\");\n\n petition.setActivePetition(true);\n current.addPetition(petition);\n petition.setTrademarkApplication(current);\n current3.setActiveAction(false);\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Abandoned\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n\n }\n\n\n\n }\n\n\n\n // only execute below code if office action is not completed...\n\n\n }\n else{\n System.out.println(\"filing is still in respond to office action period or filing is in a different state\");\n\n\n }\n }\n else{\n if(current.getFilingStatus().equals(\"TEAS RF New Application\") || current.getFilingStatus().equals(\"New Application\") ){\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod() ) < new Date().getTime()){\n boolean acceptedFiling = true;\n\n for(Iterator<OfficeActions> iter4 = current.getOfficeActions().iterator(); iter4.hasNext(); ) {\n OfficeActions current4 = iter4.next();\n if(current4.isActiveAction() && current4.getOfficeActionCode().equals(\"global default action\") == false){\n if(current4.isOfficeActionCompleted() == true){\n // skip examiner review period\n // filing is accepted\n // change filing status\n // create filing document event\n\n current4.setActiveAction(false);\n\n\n\n }\n else {\n acceptedFiling = false;\n\n System.out.println(\"office action is not completed\");\n }\n\n }\n\n\n }\n\n if(acceptedFiling == true){\n current.setFilingStatus(\"Accepted Filing\");\n current.setApplicationAcceptedDate(new Date());\n\n // create accepted filing date\n\n\n\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Accepted\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n }\n // if there are no office actions ..it is also compelete\n\n }\n // check for accepted filings\n }\n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n }\n\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "void reachedCashierAt(int time) {\n reachedCashier = true;\n timeSpentInQueue = time - timeCreated;\n }", "public boolean addTransaction(Transaction trans) {\n if (trans == null) {\n return false;\n }\n if (!previousHash.equals(\"0\")) {\n if (!trans.processTransaction()) {\n System.out.println(\"Transaction failed to process. Transaction discarded!\");\n return false;\n }\n }\n transactions.add(trans);\n System.out.println(\"Transaction successfully added to the block\");\n return true;\n }", "private void renewTimes() {\n String time_morgens_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n String time_mittags_new = time_prefs.getString(\"time_mittags\", getResources().getString(R.string.default_mittags));\n String time_abends_new = time_prefs.getString(\"time_abends\", getResources().getString(R.string.default_abends));\n String time_zur_nacht_new = time_prefs.getString(\"time_morgens\", getResources().getString(R.string.default_morgens));\n /*comparison of class local time variblaes with new Preferences\n deletes alarms affected medicines and creates new alarms for them\n */\n\n if (!time_morgens.equals(time_morgens_new)) {\n //list all affected Meds and iterate for each\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n\n if (!time_mittags.equals(time_mittags_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Mittags\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_abends.equals(time_abends_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Abends\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n if (!time_zur_nacht.equals(time_zur_nacht_new)) {\n List<Meds> meds = Meds.find(Meds.class, \"time = ?\", \"Morgens\");\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n cancelAlarm(m.getId());\n }\n }\n\n for (Meds m : meds) {\n if (!m.getDays().equals(\"\")) {\n createAlarm(m.getDays(), m.getTime(), m.getId());\n }\n }\n }\n }", "public void checkUpdates(int timePerStep){\r\n\t\tif(updateStatistics_ || statisticsCountdown_ == -1){\r\n\t\t\tstatisticsCountdown_ -= timePerStep;\r\n\t\t\tif(statisticsCountdown_ < 1){\r\n\t\t\t\tstatisticsCountdown_ += STATISTICS_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateStatistics();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(updateBeaconInfo_){\r\n\t\t\tbeaconInfoCountdown_ -= timePerStep;\r\n\t\t\tif(beaconInfoCountdown_ < 1){\r\n\t\t\t\tbeaconInfoCountdown_ += BEACONINFO_ACTUALIZATION_INTERVAL;\r\n\t\t\t\tupdateBeaconInfo();\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "public void scheduleTransaction(Transaction recurringTransaction) {\n long recurrencePeriodMillis = recurringTransaction.getRecurrencePeriod();\n long firstRunMillis = System.currentTimeMillis() + recurrencePeriodMillis;\n long recurringTransactionId = addTransaction(recurringTransaction);\n\n PendingIntent recurringPendingIntent = PendingIntent.getBroadcast(mContext,\n (int)recurringTransactionId, Transaction.createIntent(recurringTransaction), PendingIntent.FLAG_UPDATE_CURRENT);\n AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, firstRunMillis,\n recurrencePeriodMillis, recurringPendingIntent);\n }", "public void checkTransactions() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Checking {} transaction threads\", registeredThreads.size());\n\t\t}\n\t\tList<Thread> toInterrupt = registeredThreads.entrySet()\n\t\t\t.stream().filter(entry -> {\n\t\t\t\tlong now = System.currentTimeMillis();\n\t\t\t\tlong dur = now - entry.getValue();\n\t\t\t\tlong limit = storageOptions.getTxCommitTimeout();\n\t\t\t\tboolean exceedsLimit = dur > limit;\n\t\t\t\tif (exceedsLimit) {\n\t\t\t\t\tlog.warn(\"Thread {} exceeds time limit of {} with duration {}.\", entry.getKey(), limit, dur);\n\t\t\t\t}\n\t\t\t\treturn exceedsLimit;\n\t\t\t}).map(Map.Entry::getKey)\n\t\t\t.collect(Collectors.toList());\n\n\t\tinterrupt(toInterrupt);\n\t}", "public boolean AddTransactionToAccount(Double transaction)\n {\n\n if(this.transactions.add(transaction)){\n System.out.println(\"Failed to add transaction: \" + transaction);\n return false;\n }\n System.out.println(\"Successfully added Transaction: \" + transaction);\n return true;\n }", "boolean hasNextCollectTimestampMs();", "private void scheduleRecurringTasks() {\n\t\t//created directories expected by the system to exist\n\t\tUtil.initializeDataDirectories();\n\n\t\tTestManager.initializeTests();\n\n\t\t// Gets all the periodic tasks and runs them.\n\t\t// If you need to create a new periodic task, add another enum instance to PeriodicTasks.PeriodicTask\n\t\tSet<PeriodicTasks.PeriodicTask> periodicTasks = EnumSet.allOf(PeriodicTasks.PeriodicTask.class);\n\t\tfor (PeriodicTasks.PeriodicTask task : periodicTasks) {\n\t\t\tif (R.IS_FULL_STAREXEC_INSTANCE || !task.fullInstanceOnly) {\n\t\t\t\ttaskScheduler.scheduleWithFixedDelay(task.task, task.delay, task.period.get(), task.unit);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tPaginationQueries.loadPaginationQueries();\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"unable to correctly load pagination queries\");\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t}", "public void testRecurringTask()\n throws Exception {\n checkNumPersistedTasks(0);\n \n // Schedule a recurring task\n TestTask task = new TestTask();\n task.setIntervalMillis(200);\n Mailbox mbox = TestUtil.getMailbox(USER_NAME);\n task.setMailboxId(mbox.getId());\n ScheduledTaskManager.schedule(task);\n \n // Make sure the task is persisted\n checkNumPersistedTasks(1);\n Thread.sleep(1000);\n \n // Cancel the task and make sure it's removed from the database\n ScheduledTaskManager.cancel(TestTask.class.getName(), TASK_NAME, mbox.getId(), false);\n Thread.sleep(200);\n int numCalls = task.getNumCalls();\n assertTrue(\"Unexpected number of task runs: \" + numCalls, numCalls > 0);\n checkNumPersistedTasks(0);\n \n // Sleep some more and make sure the task doesn't run again\n Thread.sleep(400);\n assertEquals(\"Task still ran after being cancelled\", numCalls, task.getNumCalls());\n }", "@Scheduled(fixedDelay = 15000)\n\tpublic void scheduleFixedDelayTask() {\n\t\t\n\t\tList<Tx> listaTx = txRepo.findAll();\n\t\t\n\t\tfor (Tx tx : listaTx) {\n\t\t\tif(tx.getStatus().equals(TxStatus.PENDING)) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t//to be implemented\n\t\t\t\t\n\t\t\t\tString auth = \"Bearer \" + tx.getSbi().getBitcoinAddress();\n\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\theaders.add(\"Authorization\", auth);\n\t\t\t\t\n\t\t\t\tInteger orderId = tx.getorder_id();\n\t\t\t\t\n\t\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\t\n\t\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + orderId, HttpMethod.GET,\n\t\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t\t \n\t\t\t \n\t\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\t\n\t\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\t\n\t\t\t \n\t\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t\t\t\n\t\t\t if(gorResponse.getStatus().equals(\"paid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"invalid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"expired\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"canceled\")) {\n\t\t\t \t\n\t\t\t \t//naredne tri linije mi nisu nista jasne zasto sam ovo radio pre mesec dana\n\t\t\t \tTx tx2 = new Tx();\n\t\t \t\ttx2 = txRepo.findByusername(gorResponse.getId());\n\t\t \t\tSystem.out.println(\"TX: \" + tx2.getorder_id());\n\t\t \t\t\n\t\t \t\tRestTemplate restTemplate = new RestTemplate();\n\t\t \t\t\n\t\t \t\tTxInfoDto txInfo;\n\t\t\t \t\n\t\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t\t \t\t\n\t\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.SUCCESS, \"https://localhost:8764/bitCoin\");\n\t\t\t \t\t\t\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"expired\")){\n\t\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else {\n\t\t\t \t\ttx.setStatus(TxStatus.CANCELED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.ERROR, \"https://localhost:8764/bitCoin\");\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \ttxRepo.save(tx);\n\t\t \t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentIsFinished\", txInfo, TxInfoDto.class);\n\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Nema transakcija :(\");\n\t\t\n\t/*\tif(IS_CREATE) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t\t\t \t\n\t\t String authToken = STATIC_TOKEN;\n\t\t \n\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\theaders.add(\"Authorization\", authToken);\n\t\t\t\n\t\t\tSystem.out.println(\"authtoken : \" + authToken);\n\t\t \n\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\n\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + STATIC_ID, HttpMethod.GET,\n\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t \n\t\t \n\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\n\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\n\t\t \n\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t \n\t\t if(gorResponse.getStatus().equals(\"paid\") || gorResponse.getStatus().equals(\"invalid\") || gorResponse.getStatus().equals(\"expired\")) {\n\t\t \t\n\t\t \t/*Tx tx = new Tx();\n\t \t\ttx = txRepo.findByOrder_Id(gorResponse.getId());\n\t \t\tSystem.out.println(\"TX: \" + tx.getorder_id());\n\t\t \t\n\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t \t\t//promenimo u bazi\n\t\t \t\t//txRepo.getOne((Integer)gorResponse.getId());\n\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t \t\t\n\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t \t} else {\n\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t \t}\n\t\t \t\n\t\t \ttxRepo.save(tx);*/\n\t\t /*\t\n\t\t \tIS_CREATE = false;\n\t\t }\n\t\t\t\t\t \n\t\t\t\t \n\t\t} else {\n\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t}*/\n\t\t\n\t \n\t \n\t}", "private boolean addNewReport(HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis()); \n\t\t\tString week = request.getParameter(\"week\");\n\t\t\tint userGroupID = (int) session.getAttribute(\"userGroupID\");\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"INSERT INTO reports (user_group_id, date, week, total_time, signed) VALUES (\"+userGroupID+\",'\"+date.toString()+\"',\"+week+\",\"+totalTime+\",\"+0+\")\");\n\n\t\t\tStatement stmt1 = conn.createStatement();\n\t\t\tResultSet rs = stmt1.executeQuery(\"select * from reports where user_group_id = \"+userGroupID+\" and week = \"+week); \n\t\t\tint reportID = -1;\n\t\t\tif (rs.first()) {\n\t\t\t\treportID = rs.getInt(\"id\");\n\t\t\t}\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}", "private boolean applyTimeBasedApplicables(Demand demand, RequestInfoWrapper requestInfoWrapper,\n\t\t\t\t\t\t\t\t\t\t\t Map<String, JSONArray> timeBasedExemptionMasterMap, List<TaxPeriod> taxPeriods) {\n\n\t\tTaxPeriod taxPeriod = taxPeriods.stream().filter(t -> demand.getTaxPeriodFrom().compareTo(t.getFromDate()) >= 0\n\t\t\t\t&& demand.getTaxPeriodTo().compareTo(t.getToDate()) <= 0).findAny().orElse(null);\n\t\tif (taxPeriod == null) {\n\t\t\tlog.info(\"Demand Expired!!\");\n\t\t\treturn false;\n\t\t}\n\n\t\tboolean isCurrentDemand = false;\n\t\tif (!(taxPeriod.getFromDate() <= System.currentTimeMillis()\n\t\t\t\t&& taxPeriod.getToDate() >= System.currentTimeMillis()))\n\t\t\tisCurrentDemand = true;\n\t\t\n\t\tif(demand.getBillExpiryTime() < System.currentTimeMillis()) {\n\t\tBigDecimal sewerageChargeApplicable = BigDecimal.ZERO;\n\t\tBigDecimal oldPenalty = BigDecimal.ZERO;\n\t\tBigDecimal oldInterest = BigDecimal.ZERO;\n\t\t\n\n\t\tfor (DemandDetail detail : demand.getDemandDetails()) {\n\t\t\tif (SWCalculationConstant.TAX_APPLICABLE.contains(detail.getTaxHeadMasterCode())) {\n\t\t\t\tsewerageChargeApplicable = sewerageChargeApplicable.add(detail.getTaxAmount());\n\t\t\t}\n\t\t\tif (detail.getTaxHeadMasterCode().equalsIgnoreCase(SWCalculationConstant.SW_TIME_PENALTY)) {\n\t\t\t\toldPenalty = oldPenalty.add(detail.getTaxAmount());\n\t\t\t}\n\t\t\tif (detail.getTaxHeadMasterCode().equalsIgnoreCase(SWCalculationConstant.SW_TIME_INTEREST)) {\n\t\t\t\toldInterest = oldInterest.add(detail.getTaxAmount());\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean isPenaltyUpdated = false;\n\t\tboolean isInterestUpdated = false;\n\t\t\n\t\tMap<String, BigDecimal> interestPenaltyEstimates = payService.applyPenaltyRebateAndInterest(\n\t\t\t\tsewerageChargeApplicable, taxPeriod.getFinancialYear(), timeBasedExemptionMasterMap, demand.getBillExpiryTime());\n\t\tif (null == interestPenaltyEstimates)\n\t\t\treturn isCurrentDemand;\n\n\t\tBigDecimal penalty = interestPenaltyEstimates.get(SWCalculationConstant.SW_TIME_PENALTY);\n\t\tBigDecimal interest = interestPenaltyEstimates.get(SWCalculationConstant.SW_TIME_INTEREST);\n\t\tif(penalty == null)\n\t\t\tpenalty = BigDecimal.ZERO;\n\t\tif(interest == null)\n\t\t\tinterest = BigDecimal.ZERO;\n\n\t\tDemandDetailAndCollection latestPenaltyDemandDetail, latestInterestDemandDetail;\n\n\t\tif (interest.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\tlatestInterestDemandDetail = utils.getLatestDemandDetailByTaxHead(SWCalculationConstant.SW_TIME_INTEREST,\n\t\t\t\t\tdemand.getDemandDetails());\n\t\t\tif (latestInterestDemandDetail != null) {\n\t\t\t\tupdateTaxAmount(interest, latestInterestDemandDetail);\n\t\t\t\tisInterestUpdated = true;\n\t\t\t}\n\t\t}\n\n\t\tif (penalty.compareTo(BigDecimal.ZERO) != 0) {\n\t\t\tlatestPenaltyDemandDetail = utils.getLatestDemandDetailByTaxHead(SWCalculationConstant.SW_TIME_PENALTY,\n\t\t\t\t\tdemand.getDemandDetails());\n\t\t\tif (latestPenaltyDemandDetail != null) {\n\t\t\t\tupdateTaxAmount(penalty, latestPenaltyDemandDetail);\n\t\t\t\tisPenaltyUpdated = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!isPenaltyUpdated && penalty.compareTo(BigDecimal.ZERO) > 0)\n\t\t\tdemand.getDemandDetails().add(\n\t\t\t\t\tDemandDetail.builder().taxAmount(penalty.setScale(2, 2)).taxHeadMasterCode(SWCalculationConstant.SW_TIME_PENALTY)\n\t\t\t\t\t\t\t.demandId(demand.getId()).tenantId(demand.getTenantId()).build());\n\t\tif (!isInterestUpdated && interest.compareTo(BigDecimal.ZERO) > 0)\n\t\t\tdemand.getDemandDetails().add(\n\t\t\t\t\tDemandDetail.builder().taxAmount(interest.setScale(2, 2)).taxHeadMasterCode(SWCalculationConstant.SW_TIME_INTEREST)\n\t\t\t\t\t\t\t.demandId(demand.getId()).tenantId(demand.getTenantId()).build());\n\t\t}\n\n\t\treturn isCurrentDemand;\n\t}", "public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}", "private void givenExchangeRatesExistsForSixMonths() {\n }", "private boolean neededToRequestPushWooshServer(Context context)\n\t{\n\t\tCalendar nowTime = Calendar.getInstance();\n\t\tCalendar tenMinutesBefore = Calendar.getInstance();\n\t\ttenMinutesBefore.add(Calendar.MINUTE, -10); // decrement 10 minutes\n\n\t\tCalendar lastPushWooshRegistrationTime = Calendar.getInstance();\n\t\tlastPushWooshRegistrationTime.setTime(new Date(PreferenceUtils.getLastRegistration(context)));\n\n\t\tif (tenMinutesBefore.before(lastPushWooshRegistrationTime) && lastPushWooshRegistrationTime.before(nowTime))\n\t\t{\n\t\t\t// tenMinutesBefore <= lastPushWooshRegistrationTime <= nowTime\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void insertTestTransactionsForAccount(SmsAccount smsAccount) {\n\n\t\tint g = 10000;\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tSmsTransaction smsTransaction = new SmsTransaction();\n\t\t\tsmsTransaction.setCreditBalance(10L);\n\t\t\tsmsTransaction.setSakaiUserId(\"sakaiUserId\" + i);\n\t\t\tsmsTransaction.setTransactionDate(new Date(System\n\t\t\t\t\t.currentTimeMillis()\n\t\t\t\t\t+ g));\n\t\t\tsmsTransaction.setTransactionTypeCode(\"TC\");\n\t\t\tsmsTransaction.setTransactionCredits(666);\n\t\t\tsmsTransaction.setSmsAccount(smsAccount);\n\t\t\tsmsTransaction.setSmsTaskId(1L);\n\t\t\tg += 1000;\n\t\t\thibernateLogicLocator.getSmsTransactionLogic()\n\t\t\t\t\t.insertReserveTransaction(smsTransaction);\n\t\t}\n\t}", "boolean isAutoRedeem();", "private void checkChargeTime() {\n\t\tif (elapsedTimeSeconds > chargeTimeP1) {\n\t\t\tplayerCharge.put(dolphinNodeOne, false);\n\t\t}\n\t}", "@Test\n public void testCurrentMarketPosition ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.3, -31.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n accountingService.addMarketTransaction(jim,\n timeslotRepo.findBySerialNumber(2), 0.4, -35.0);\n accountingService.addMarketTransaction(jim,\n timeslotRepo.findBySerialNumber(2), -0.2, 20.0);\n assertEquals(5, accountingService.getPendingTransactions().size(), \"correct number in list\");\n accountingService.activate(timeService.getCurrentTime(), 3);\n // current timeslot is 4, should be 0 mkt posn\n assertEquals(0.0, accountingService.getCurrentMarketPosition (bob), 1e-6, \"correct position, bob, ts4\");\n assertEquals(0.0, accountingService.getCurrentMarketPosition (jim), 1e-6, \"correct position, jim, ts4\");\n // move forward to timeslot 5 and try again\n timeService.setCurrentTime(timeService.getCurrentTime().plus(TimeService.HOUR));\n assertEquals(0.8, accountingService.getCurrentMarketPosition (bob), 1e-6, \"correct position, bob, ts5\");\n assertEquals(0.2, accountingService.getCurrentMarketPosition (jim), 1e-6, \"correct position, jim, ts5\");\n // another hour and try again\n timeService.setCurrentTime(timeService.getCurrentTime().plus(TimeService.HOUR));\n assertEquals(0.7, accountingService.getCurrentMarketPosition (bob), 1e-6, \"correct position, bob, ts5\");\n assertEquals(0.0, accountingService.getCurrentMarketPosition (jim), 1e-6, \"correct position, jim, ts5\");\n }", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "public boolean isScheduled(){\n //System.out.println(\"nextrun: \" + nextrun.getTime() + \" nu: \" + System.currentTimeMillis());\n if (nextrun != null){\n long next = nextrun.getTime();\n \n return next < System.currentTimeMillis();\n }else{\n //null => instance has never run before & should run asap\n return true;\n }\n }", "private boolean handleRecurring(CalendarEntry entry, Map<String, Object> entryResult, \r\n List<Map<String, Object>> allResults, Date from, boolean repeatingFirstOnly)\r\n {\r\n if (entry.getRecurrenceRule() == null)\r\n {\r\n // Nothing to do\r\n return false;\r\n }\r\n \r\n // If no date is given, start looking for occurrences from the event itself\r\n if (from == null)\r\n {\r\n from = entry.getStart();\r\n }\r\n \r\n // Should we limit ourselves?\r\n Date until = null;\r\n if (!repeatingFirstOnly)\r\n {\r\n // Only repeating instances for the next 60 days, to keep the list sane\r\n // (It's normally only used for a month view anyway)\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(from);\r\n c.add(Calendar.DATE, 60);\r\n until = c.getTime();\r\n }\r\n \r\n // How long is it?\r\n long duration = entry.getEnd().getTime() - entry.getStart().getTime();\r\n \r\n // Get it's recurring instances\r\n List<Date> dates = CalendarRecurrenceHelper.getRecurrencesOnOrAfter(\r\n entry, from, until, repeatingFirstOnly);\r\n if (dates == null)\r\n {\r\n dates = new ArrayList<Date>();\r\n }\r\n \r\n // Add on the original event time itself if needed\r\n if (entry.getStart().getTime() >= from.getTime())\r\n {\r\n if (dates.size() == 0 || dates.get(0).getTime() != entry.getStart().getTime())\r\n {\r\n // Original event is after the start time, and not on the recurring list\r\n dates.add(0, entry.getStart());\r\n }\r\n }\r\n \r\n // If we got no dates, then no recurrences in the period so zap\r\n if (dates.size() == 0)\r\n {\r\n allResults.remove(entryResult);\r\n return false; // Remains sorted despite delete\r\n }\r\n\r\n // Always update the live entry\r\n updateRepeatingStartEnd(dates.get(0), duration, entryResult);\r\n \r\n // If first result only, alter title and finish\r\n if (repeatingFirstOnly)\r\n {\r\n entryResult.put(RESULT_TITLE, entry.getTitle() + \" (Repeating)\");\r\n return true; // Date has been changed\r\n }\r\n \r\n // Otherwise generate one entry per extra date\r\n for (int i=1; i<dates.size(); i++)\r\n {\r\n // Clone the properties\r\n Map<String, Object> newResult = new HashMap<String, Object>(entryResult);\r\n \r\n // Generate start and end based on this date\r\n updateRepeatingStartEnd(dates.get(i), duration, newResult);\r\n \r\n // Save as a new event\r\n allResults.add(newResult);\r\n }\r\n \r\n // New dates have been added\r\n return true;\r\n }", "boolean hasDepositEndTime();", "public boolean isValid_ToBuyTicket() {\n if (this.tktSold < this.museum.getMaxVisit() && isNowTime_in_period()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public void run() {\n Iterator\t\ttransactionIterator;\n // One transaction in the set\n SIPTransaction\tnextTransaction;\n \n \n // Loop while this stack is running\n while( isAlive( ) ) {\n \n try {\n \n // Sleep for one timer \"tick\"\n Thread.sleep( BASE_TIMER_INTERVAL );\n \n \t\t // System.out.println(\"clientTransactionTable size \" +\n \t \t // \tclientTransactions.size());\n \t\t // System.out.println(\"serverTransactionTable size \" + \n \t\t // serverTransactions.size());\n // Check all client transactions\n \n LinkedList fireList = new LinkedList();\n \n // Check all server transactions\n synchronized(serverTransactions) {\n transactionIterator =\n serverTransactions.iterator( );\n while( transactionIterator.hasNext( ) ) {\n \n nextTransaction =\n (SIPTransaction)\n transactionIterator.next( );\n \n // If the transaction has terminated,\n if( nextTransaction.isTerminated( ) ) {\n \t\t\t\t// Keep the transaction hanging around\n \t\t\t\t// to catch the incoming ACK.\n \t\t\t\t// BUG report from Antonis Karydas\n \t\t\t\tif (((SIPServerTransaction)nextTransaction).\n \t\t\t\tcollectionTime == 0) {\n // Remove it from the set\n \t\t\t\t if (LogWriter.needsLogging)\n \t\t\t\t LogWriter.logMessage(\"removing\" +\n \t\t\t\t\tnextTransaction );\n transactionIterator.remove( );\n \t\t\t\t} else {\n \t\t\t\t ((SIPServerTransaction)nextTransaction).\n \t\t\t\t collectionTime --;\n \t\t\t\t}\n // If this transaction has not\n //terminated,\n } else {\n // Add to the fire list -- needs to be moved\n // outside the synchronized block to prevent\n // deadlock.\n \t\t\t\t/**\n \t\t\t\tSystem.out.println(\"state = \" +\n \t\t\t\t\tnextTransaction.getState() + \"/\" +\n \t\t\t\t\tnextTransaction.getOriginalRequest().\n \t\t\t\t\tgetMethod());\n \t\t\t\t**/\n fireList.add(nextTransaction);\n \n }\n \n }\n }\n \n \n synchronized(clientTransactions) {\n transactionIterator =\n clientTransactions.iterator( );\n while( transactionIterator.hasNext( ) ) {\n \n nextTransaction = (SIPTransaction)\n transactionIterator.next( );\n \n // If the transaction has terminated,\n if( nextTransaction.isTerminated( ) ) {\n \n // Remove it from the set\n if (LogWriter.needsLogging) {\n LogWriter.logMessage\n (\"Removing clientTransaction \" +\n nextTransaction);\n }\n transactionIterator.remove( );\n \n // If this transaction has not\n // terminated,\n } else {\n // Add to the fire list -- needs to be moved\n // outside the synchronized block to prevent\n // deadlock. \n fireList.add(nextTransaction);\n \n \t\t\t }\n }\n }\n \n synchronized (dialogTable) {\n Collection values = dialogTable.values();\n Iterator iterator = values.iterator();\n while (iterator.hasNext()) {\n DialogImpl d = (DialogImpl) iterator.next();\n \t\t\t // System.out.println(\"dialogState = \" +\n \t\t\t //\td.getState() + \n \t\t\t //\t\" isServer = \" + d.isServer());\n if ( d.getState() != null &&\n d.getState().getValue() ==\n DialogImpl.TERMINATED_STATE ) {\n if (LogWriter.needsLogging) {\n String dialogId =\n d.getDialogId();\n LogWriter.logMessage\n (\"Removing Dialog \" +\n dialogId);\n }\n iterator.remove();\n }\n \t\t\t // If I ACK has not been seen on Dialog,\n \t\t\t // resend last response.\n \t\t\t if (retransmissionFilter &&\n \t\t\t\td.isServer() && (! d.ackSeen) &&\n \t\t\t\td.isInviteDialog() ) {\n \t\t\t\tSIPTransaction transaction = \n \t\t\t\t\td.getLastTransaction();\n \t\t\t\t// If stack is managing the transaction\n \t\t\t\t// then retransmit the last response.\n \t\t\t\tif (transaction.getState().getValue() ==\n \t\t\t\t SIPTransaction.TERMINATED_STATE &&\n \t\t\t\t ((SIPServerTransaction) transaction).\n \t\t\t\t\tisMapped ) {\n \t\t\t\t SIPResponse response = \n \t\t\t\t\t transaction.getLastResponse();\n \t\t\t\t // Retransmit to 200 until ack received.\n \t\t\t\t if (response.getStatusCode() == 200) {\n \t\t\t\t\ttry {\n \t\t\t\t transaction.sendMessage(response);\n \t\t\t\t transaction.fireTimer();\n \t\t\t\t\t} catch (IOException ex) {\n \t\t\t\t\t /* Will eventully time out */\n \t\t\t\t\t}\n \t\t\t\t }\n \t\t\t\t}\n \t\t\t }\n }\n }\n \n // Clean up the assigned dialogs table.\n \n \n transactionIterator = fireList.iterator();\n while (transactionIterator.hasNext()) {\n nextTransaction =\n (SIPTransaction)\n transactionIterator.next();\n nextTransaction.fireTimer();\n }\n \n \n } catch( InterruptedException e ) {\n \n // Ignore\n \n }\n \n }\n \n }", "private void checkRequests()\n\t{\n\t\t// to be honest I don't see why this can't be 5 seconds, but I'm trying 1 second\n\t\t// now as the existing 0.1 second is crazy given we're checking for events that occur\n\t\t// at 60+ second intervals\n\n\t\tif ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ){\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal long now =SystemTime.getCurrentTime();\n\n\t\t//for every connection\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i =peer_transports.size() -1; i >=0 ; i--)\n\t\t{\n\t\t\tfinal PEPeerTransport pc =(PEPeerTransport)peer_transports.get(i);\n\t\t\tif (pc.getPeerState() ==PEPeer.TRANSFERING)\n\t\t\t{\n\t\t\t\tfinal List expired = pc.getExpiredRequests();\n\t\t\t\tif (expired !=null &&expired.size() >0)\n\t\t\t\t{ // now we know there's a request that's > 60 seconds old\n\t\t\t\t\tfinal boolean isSeed =pc.isSeed();\n\t\t\t\t\t// snub peers that haven't sent any good data for a minute\n\t\t\t\t\tfinal long timeSinceGoodData =pc.getTimeSinceGoodDataReceived();\n\t\t\t\t\tif (timeSinceGoodData <0 ||timeSinceGoodData >60 *1000)\n\t\t\t\t\t\tpc.setSnubbed(true);\n\n\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\tDiskManagerReadRequest request =(DiskManagerReadRequest) expired.get(0);\n\n\t\t\t\t\tfinal long timeSinceData =pc.getTimeSinceLastDataMessageReceived();\n\t\t\t\t\tfinal boolean noData =(timeSinceData <0) ||timeSinceData >(1000 *(isSeed ?120 :60));\n\t\t\t\t\tfinal long timeSinceOldestRequest = now - request.getTimeCreated(now);\n\n\n\t\t\t\t\t//for every expired request \n\t\t\t\t\tfor (int j = (timeSinceOldestRequest >120 *1000 && noData) ? 0 : 1; j < expired.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get the request object\n\t\t\t\t\t\trequest =(DiskManagerReadRequest) expired.get(j);\n\t\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\t\tpc.sendCancel(request);\t\t\t\t//cancel the request object\n\t\t\t\t\t\t//get the piece number\n\t\t\t\t\t\tfinal int pieceNumber = request.getPieceNumber();\n\t\t\t\t\t\tPEPiece\tpe_piece = pePieces[pieceNumber];\n\t\t\t\t\t\t//unmark the request on the block\n\t\t\t\t\t\tif ( pe_piece != null )\n\t\t\t\t\t\t\tpe_piece.clearRequested(request.getOffset() /DiskManager.BLOCK_SIZE);\n\t\t\t\t\t\t// remove piece if empty so peers can choose something else, except in end game\n\t\t\t\t\t\tif (!piecePicker.isInEndGameMode())\n\t\t\t\t\t\t\tcheckEmptyPiece(pieceNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private void seedScheduleCanaryCheck(CanaryEndpoint canaryEndpoint) {\n\n scheduledExecutorService.schedule(\n queryCanaryEndpoint(canaryEndpoint),\n nextInt(1, 10),\n TimeUnit.SECONDS);\n }", "@Test\n public void testGetAll() throws Exception {\n JumpCloneImplant existing;\n Map<Integer, Map<Integer, JumpCloneImplant>> listCheck = new HashMap<>();\n\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID, new HashMap<>());\n listCheck.get(jumpCloneID)\n .put(typeID, existing);\n\n existing = new JumpCloneImplant(jumpCloneID + 10, typeID + 10);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID + 10, new HashMap<>());\n listCheck.get(jumpCloneID + 10)\n .put(typeID + 10, existing);\n\n // Associated with different account\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(otherAccount, 7777L);\n CachedData.update(existing);\n\n // Not live at the given time\n existing = new JumpCloneImplant(jumpCloneID + 3, typeID + 3);\n existing.setup(testAccount, 9999L);\n CachedData.update(existing);\n\n // EOL before the given time\n existing = new JumpCloneImplant(jumpCloneID + 4, typeID + 4);\n existing.setup(testAccount, 7777L);\n existing.evolve(null, 7977L);\n CachedData.update(existing);\n\n List<JumpCloneImplant> result = CachedData.retrieveAll(8888L,\n (contid, at) -> JumpCloneImplant.accessQuery(testAccount,\n contid, 1000,\n false, at,\n AttributeSelector.any(),\n AttributeSelector.any()));\n Assert.assertEquals(listCheck.size(), result.size());\n for (JumpCloneImplant next : result) {\n int jumpCloneID = next.getJumpCloneID();\n int typeID = next.getTypeID();\n Assert.assertTrue(listCheck.containsKey(jumpCloneID));\n Assert.assertTrue(listCheck.get(jumpCloneID)\n .containsKey(typeID));\n Assert.assertEquals(listCheck.get(jumpCloneID)\n .get(typeID), next);\n }\n\n }", "public void checkBlackOutPeriod(){\n\n\n // loop through all filings and output filing date value in milli seconds\n System.out.println(\"checking black out period status for filings : \"+blackOutPeriodDuration);\n\n BaseTradeMarkApplicationService baseTradeMarkApplicationService = serviceBeanFactory.getBaseTradeMarkApplicationService();\n\n\n for(Iterator<BaseTrademarkApplication> iter = baseTradeMarkApplicationService.findAll().iterator(); iter.hasNext(); ) {\n BaseTrademarkApplication current = iter.next();\n\n if((current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"TEAS RF New Application\") )|| (current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"New Application\") ) ){\n // check that date + duration against current time\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod()) < new Date().getTime()){\n\n System.out.println(\"Filing has expired from the black out period\");\n\n //baseTradeMarkApplicationService.save(current);\n\n // we need to check current filings to make sure there are no active office action\n\n if(current.hasActiveOfficeAction() == false){\n\n OfficeActions officeActions = new OfficeActions();\n officeActions.setParentMarkImagePath(current.getTradeMark().getTrademarkImagePath());\n officeActions.setStandardCharacterMark(current.isStandardTextMark());\n officeActions.setStandardCharacterText(current.getTradeMark().getTrademarkStandardCharacterText());\n officeActions.setParentMarkOwnerName(current.getPrimaryOwner().getOwnerDisplayname());\n officeActions.setParentSerialNumber(current.getTrademarkName());\n officeActions.setParentRegistrationNumber(current.getRegistrationID());\n officeActions.setActiveAction(true);\n long dueDate = new Date().getTime()+current.getBlackOutPeriod()+current.getOfficeActionResponsePeriod();\n officeActions.setDueDate(new Date(dueDate));\n //officeActions.setOfficeActionCode(\"Missing transliteration\");\n\n\n // create office action event here\n // filing document is only created if an office action is created with required actions\n\n\n\n\n // required actions section\n\n\n // required action Translation\n if (current.getTradeMark().isStandardCharacterMark() || current.getTradeMark().getTrademarkDesignType().equals(\"Design with Text\")) {\n if (current.getTradeMark().getForeignLanguageTranslationUSText() == null || current.getTradeMark().getForeignLanguageTranslationUSText() == null || current.getTradeMark().getForeignLanguageType_translation() == null ){\n\n // create required action here\n RequiredActions requiredActions = new RequiredActions();\n requiredActions.setRequiredActionType(\"Translation of Foreign Wording\");\n requiredActions.setTranslationTextForeign(current.getTradeMark().getForeignLanguageTranslationOriginalText());\n requiredActions.setTranslationTextEnglish(current.getTradeMark().getForeignLanguageTranslationUSText());\n requiredActions.setTranslationTextLanguage(current.getTradeMark().getForeignLanguageType_translation());\n\n\n\n officeActions.addRequiredActions(requiredActions);\n\n\n\n }\n\n\n }\n\n // required action disclaimer\n\n if(current.getTradeMark().getDisclaimerDeclarationList().size() == 0){\n // you have to provide at least one disclaimer\n RequiredActions requiredActions = new RequiredActions();\n requiredActions.setRequiredActionType(\"Disclaimer Required\");\n\n officeActions.addRequiredActions(requiredActions);\n\n }\n\n\n // office action is created only if there are required actions\n if(officeActions.getRequiredActions().size() > 0){\n current.setFilingStatus(\"Non-Final Action Mailed\");\n officeActions.setOfficeActionCode(\"Non-Final Action Mailed\");\n\n\n // create an default office action object and attach it to filing\n current.addOfficeAction(officeActions);\n officeActions.setTrademarkApplication(current);\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Office Action Outgoing\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n }\n\n baseTradeMarkApplicationService.save(current);\n\n\n\n\n }\n\n\n\n\n // also check for number of required actions.\n // if there are none. office action is not saved\n\n\n\n\n\n // set relevant office actions\n\n\n\n }\n else{\n System.out.println(\"filing is still in the black out period\");\n\n }\n }\n else{\n System.out.println(\"Filing is not Submitted yet.\");\n }\n }\n\n\n }", "public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}", "public void checkAccountExpiration() throws MessagingException{\r\n\t\tList<Account> accounts = accountRepository.findAll();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\r\n\t\t\r\n\t\t//Username Password does not exist its only for faking user to system default\r\n\t\tUsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(\"example@gmail.com\",\r\n\t\t\t\t\"Test1234@\");\r\n\t\tSecurityContextHolder.getContext().setAuthentication(authRequest);\r\n\t\t\r\n\t\tfor( Account acc: accounts)\t{\r\n\t\t\tif(acc.getAlwaysActive() == false && acc.getActive() == true){\r\n\t\t\t\tDate expiration = acc.getExpirationDate() != null ? acc.getExpirationDate() :\r\n\t\t\t\t\tDateUtil.toDate(DateUtil.adjustDate(DateUtil.fromDate(acc.getStartDate()), Calendar.DAY_OF_MONTH, acc.getType() == AccountType.TRIAL ? getTrial.getTrialDays() : PREMIUM_EXPIRATION_DAYS));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.getDaysRemaining(expiration) <= -1){\r\n\t\t\t\t\tacc.setActive(false);\r\n\t\t\t\t\tacc.setExpirationDate(new Date());\r\n\t\t\t\t\tacc.setCurrency(\"SGD\");\r\n\t\t\t\t\tUser user = new User();\r\n\t\t\t\t\tuser.setId(1L);\r\n\t\t\t\t\tacc.setLastModifiedBy(user);\r\n\t\t\t\t\tacc.setLastModifiedDate(new Date());\r\n\t\t\t\t\taccountRepository.save(acc);\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\tsendTrialExpiredEmail(acc.getUser().getUsername());\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(MessagingException e){\r\n\t\t\t\t\t\tlog.error(\"exception while sending email to \"+acc.getUser().getUsername());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void setNotifications() {\n RealmManager realmManager = new RealmManager();\n realmManager.open();\n RecurringDao recurringDao = realmManager.createRecurringDao();\n\n List<Recurring> recurringTransactions = recurringDao.getAllRecurringTransactions();\n NotificationScheduler notificationScheduler = new NotificationScheduler(this);\n\n for (Recurring recurring : recurringTransactions) {\n notificationScheduler.schedule(recurring);\n }\n realmManager.close();\n }", "boolean hasDesiredTime();", "public void testFindEmployeeOrdersWithTimer() {\n\t\tSystem.out.println(\"started test testFindEmployeeOrdersWithTimer\");\n\t\tlong start = System.currentTimeMillis();\n\t\tFlux<Order> empFoundOrders = employeeController.findEmployeeOrders(employee.getAge()).take(10);\n\t\t\n\t\tStepVerifier.withVirtualTime(() -> empFoundOrders)\n\t\t\t\t\t.expectSubscription()\n\t\t\t\t\t.thenAwait(Duration.ofHours(10))\n\t\t\t\t\t.expectNextCount(10)\n\t\t\t\t\t.verifyComplete();\n\t\tlong end = System.currentTimeMillis();\n\t\tdouble totatSeconds = (end-start)/1000;\n\t\tSystem.out.println(\"completed test testFindEmployeeOrdersWithTimer in time \"+totatSeconds);\n\t}", "public boolean timeToRefresh() {\n if (tozAdCampaignRetrievalCounter == null) {\n return (true);\n }\n else if (tozAdCampaignRetrievalInterval != 0) {\n tozAdCampaignRetrievalCounter += getSleepInterval();\n\n AppyAdService.getInstance().debugOut(TAG,\"Ad Campaign refresh counter=\"+tozAdCampaignRetrievalCounter);\n if (tozAdCampaignRetrievalCounter >= tozAdCampaignRetrievalInterval) {\n tozAdCampaignRetrievalCounter = 0;\n return (true);\n }\n }\n return (false);\n }", "@Test\n @Transactional\n public void awardDailyTopUpShouldOnlyTopUpOnceWhenManyConcurrentRequests() throws WalletServiceException {\n final PlayerPromotionStatus playerPromotionStatus = playerPromotionStatusDao.get(PLAYER_ID);\n playerPromotionStatusDao.save(new PlayerPromotionStatusBuilder(playerPromotionStatus)\n .withLastTopupDate(new DateTime().minusDays(2)).build());\n\n final ExecutorService executorService = Executors.newFixedThreadPool(10);\n for (int i = 0; i < 10; i++) {\n Runnable task = new Runnable() {\n @Override\n public void run() {\n underTest.awardDailyTopUp(new TopUpRequest(PLAYER_ID, Platform.WEB, new DateTime(), SESSION_ID));\n }\n };\n executorService.execute(task);\n }\n try {\n executorService.shutdown();\n executorService.awaitTermination(100, TimeUnit.SECONDS);\n\n Mockito.verify(playerService, times(1)).postTransaction(\n any(BigDecimal.class), any(BigDecimal.class), any(BigDecimal.class), anyString(), anyString());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "abstract void updateRecurringTransactions(Ui ui) throws BankException;", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "private void check_this_minute() {\n controlNow = false;\n for (DTimeStamp dayControl : plan) {\n if (dayControl.point == clockTime.point) {\n controlNow = true;\n break;\n }\n }\n for (DTimeStamp simControl : extra) {\n if (simControl.equals(clockTime)) {\n controlNow = true;\n break;\n }\n }\n }", "private boolean loadRecurringTransaction(int recurringTransactionId) {\n RecurringTransactionRepository repo = new RecurringTransactionRepository(this);\n mCommon.transactionEntity = repo.load(recurringTransactionId);\n if (mCommon.transactionEntity == null) return false;\n\n // Read data.\n String transCode = getRecurringTransaction().getTransactionCode();\n mCommon.transactionEntity.setTransactionType(TransactionTypes.valueOf(transCode));\n\n // load split transactions only if no category selected.\n if (!mCommon.transactionEntity.hasCategory() && mCommon.mSplitTransactions == null) {\n RecurringTransactionService recurringTransaction = new RecurringTransactionService(recurringTransactionId, this);\n mCommon.mSplitTransactions = recurringTransaction.loadSplitTransactions();\n }\n\n AccountRepository accountRepository = new AccountRepository(this);\n mCommon.mToAccountName = accountRepository.loadName(mCommon.transactionEntity.getAccountToId());\n\n mCommon.loadPayeeName(mCommon.transactionEntity.getPayeeId());\n mCommon.loadCategoryName();\n\n return true;\n }", "@Test\n public void test02SendEvents() throws Exception{\n Event event1 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event1.getId());\n Event event2 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event2.getId());\n Event event3 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event3.getId());\n Event event4 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event4.getId());\n Event event5 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event5.getId());\n Event event6 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event6.getId());\n Event event7 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event7.getId());\n Event event8 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event8.getId());\n Event event9 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event9.getId());\n delay(10);\n\n //yesterday events\n List<CallbackData> list = restService.findCallbackInstancesBy(event1.getId(), null, null, null, 0, 0);\n// assertEquals(5, list.size());\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event2.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event3.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //today\n list = restService.findCallbackInstancesBy(event4.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event5.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event6.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //premise\n list = restService.findCallbackInstancesBy(event7.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n list = restService.findCallbackInstancesBy(event8.getId(), null, null, null, 0, 0);\n assertEquals(2, list.size());\n list = restService.findCallbackInstancesBy(event9.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n\n //Event status check\n EventEntity evt = eventRepo.eventById(Long.parseLong(event1.getId()));\n assertEquals(evt.getStatus(), Constants.EVENT_INSTANCE_STATUS_PROCESSED);\n assertEquals(evt.getId(), Long.parseLong(event1.getId()));\n\n }", "private boolean isReqTimeFresh(Date reqTime, String username) {\r\n\t\tDate oldReqTime = oldRequestTimes.get(username); \r\n\t\tif(oldReqTime!= null && oldReqTime.equals(reqTime))\r\n\t\t\tthrow new RuntimeException(\"This request has been sent before.\");\r\n\t\t\r\n\t\tDate current = new Date();\r\n\t\treturn current.getTime() - 750 < reqTime.getTime() && reqTime.getTime() < current.getTime() + 750;\r\n\t}", "private boolean m50966f() {\n int i;\n SharedPreferences sharedPreferences = C8665cc.this.f36887b.getSharedPreferences(\"log.timestamp\", 0);\n String string = sharedPreferences.getString(\"log.requst\", \"\");\n long currentTimeMillis = System.currentTimeMillis();\n try {\n JSONObject jSONObject = new JSONObject(string);\n currentTimeMillis = jSONObject.getLong(\"time\");\n i = jSONObject.getInt(\"times\");\n } catch (JSONException unused) {\n i = 0;\n }\n if (System.currentTimeMillis() - currentTimeMillis >= LogBuilder.MAX_INTERVAL) {\n currentTimeMillis = System.currentTimeMillis();\n i = 0;\n } else if (i > 10) {\n return false;\n }\n JSONObject jSONObject2 = new JSONObject();\n try {\n jSONObject2.put(\"time\", currentTimeMillis);\n jSONObject2.put(\"times\", i + 1);\n sharedPreferences.edit().putString(\"log.requst\", jSONObject2.toString()).commit();\n } catch (JSONException e) {\n AbstractC8508c.m50239c(\"JSONException on put \" + e.getMessage());\n }\n return true;\n }", "private void attemptAppendRecurringTask(RecurringType type, String dateToAppend) throws IllegalValueException {\n TestTask tryAppend = helper.buildRecurringTask(type);\n recurringManager.attemptAppendRecurringTask(tryAppend, helper.getLocalDateByString(dateToAppend));\n \n assertEquals(\"Task should be appended with another occurrence\",tryAppend.getTaskDateComponent().size(), 2);\n }", "public Mono<Boolean> addTransaction(Publisher<Transaction> transactionPublisher, long now) {\n LOGGER.debug(\"Add transaction to statistics store if valid before {} \",now);\n return store.save(Mono.from(transactionPublisher), now);\n }", "void aDayPasses(){\n\t\t\n\t\t/**\n\t\t * Modify wait time if still exists\n\t\t */\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\tdaysUntilStarts--;\n\t\t\tif((!hasInstructor() || getSize() == 0) && daysUntilStarts.equals(0)){\n\t\t\t\tif(hasInstructor())\n\t\t\t\t\tinstructor.unassignCourse();\n\t\t\t\tfor(Student student : enrolled){\n\t\t\t\t\tstudent.dropCourse();\n\t\t\t\t}\n\t\t\t\tsubject.unassign();\n\t\t\t\tinstructor = null;\n\t\t\t\tenrolled = new ArrayList<Student>();\n\t\t\t\tcancelled = true;\n\t\t\t} else if (daysUntilStarts.equals(0)) {\n\t\t\t\tsubject.unassign();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Modify run time if still exists\n\t\t */\n\t\tif(!daysToRun.equals(0)){\n\t\t\tdaysToRun--;\n\t\t}\n\t\t/**\n\t\t * If couse finished un-assigned people from it\n\t\t */\n\t\tif(daysToRun.equals(0) && !finished){\n\t\t\tfor(Student student : enrolled){\n\t\t\t\tstudent.graduate(subject);\n\n\t\t\t}\n\t\t\tinstructor.unassignCourse();\n\t\t\tinstructor = null;\n\t\t\tfinished = true;\n\t\t}\n\t}", "boolean hasSubmitTime();", "@Test\n public void testTariffTransaction ()\n {\n initializeService();\n accountingService.addTariffTransaction(TariffTransaction.Type.SIGNUP,\n tariffB1, customerInfo1, 2, 0.0, 42.1);\n accountingService.addTariffTransaction(TariffTransaction.Type.CONSUME,\n tariffB1, customerInfo2, 7, -77.0, 7.7);\n accountingService.addRegulationTransaction(tariffB1, customerInfo1,\n 2, 10.0, -2.5);\n accountingService.addRegulationTransaction(tariffB1, customerInfo2,\n 7, -10.0, 2.0);\n assertEquals(4, accountingService.getPendingTransactions().size(), \"correct number in list\");\n assertEquals(4, accountingService.getPendingTariffTransactions().size(), \"correct number in ttx list\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n List<BrokerTransaction> signups = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.SIGNUP);\n }\n });\n assertEquals(1, signups.size(), \"one signup\");\n TariffTransaction ttx = (TariffTransaction)signups.get(0);\n assertNotNull(ttx, \"first ttx not null\");\n assertEquals(42.1, ttx.getCharge(), 1e-6, \"correct charge id 0\");\n Broker b1 = ttx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n List<BrokerTransaction> consumes = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.CONSUME);\n }\n });\n assertEquals(2, consumes.size(), \"two consumes\");\n ttx = (TariffTransaction)consumes.get(0);\n assertNotNull(ttx, \"second ttx not null\");\n TariffTransaction ttx1 = (TariffTransaction)consumes.get(1);\n assertNotNull(ttx1, \"third ttx not null\");\n if (ttx.isRegulation()) {\n // swap\n ttx = ttx1;\n ttx1 = (TariffTransaction)consumes.get(0);\n }\n assertEquals(-77.0, ttx.getKWh(), 1e-6, \"correct amount 1\");\n assertFalse(ttx.isRegulation(), \"not regulation\");\n assertEquals(-10.0, ttx1.getKWh(), 1e-6, \"correct amount 2\");\n assertTrue(ttx1.isRegulation(), \"regulation\");\n List<BrokerTransaction> produces = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.PRODUCE);\n }\n });\n assertEquals(1, produces.size(), \"one produce\");\n ttx = (TariffTransaction)produces.get(0);\n assertEquals(10.0, ttx.getKWh(), 1e-6, \"correct amount 3\");\n assertTrue(ttx.isRegulation(), \"regulation\");\n }", "@Test\n public void testAddBookedTimeInterval() {\n TimeInterval workingTime=new TimeInterval(new DateTime(2019, 8, 27, 9, 0), new DateTime(2019, 8, 27, 12, 0));\n TimeInterval bookedTime1=new TimeInterval(new DateTime(2019, 8, 27, 10, 0), new DateTime(2019, 8, 27, 11, 0));\n TimeInterval bookedTime2=new TimeInterval(new DateTime(2019, 8, 27, 9, 0), new DateTime(2019, 8, 27, 9, 30));\n TimeInterval bookedTime3=new TimeInterval(new DateTime(2019, 8, 27, 11, 30), new DateTime(2019, 8, 27, 12, 0));\n ArrayList<TimeInterval> freeTime=new ArrayList<>();\n freeTime.add(workingTime);\n TimeManager manager=new TimeManager(freeTime);\n manager.addBookedTimeInterval(bookedTime1);\n System.out.println(manager);\n manager.addBookedTimeInterval(bookedTime2);\n System.out.println(manager);\n manager.addBookedTimeInterval(bookedTime3);\n System.out.println(manager);\n }", "private void automaticPayment(String accountName, String reciever, String billName, final int amount, String date) {\n Log.d(TAG, \"makeTransaction: Has been called\");\n final DocumentReference senderDocRef = db.collection(\"users\").document(user.getEmail())\n .collection(\"accounts\").document(accountName);\n\n final DocumentReference recieverDocRef = db.collection(\"companies\").document(reciever);\n\n final DocumentReference billDocRef = db.collection(\"companies\").document(reciever).collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").document(billName);\n\n db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n DocumentSnapshot sender = transaction.get(senderDocRef);\n DocumentSnapshot reciever = transaction.get(recieverDocRef);\n\n\n int senderBalance = sender.getLong(\"balance\").intValue();\n int recieverBalance = reciever.getLong(\"amount\").intValue();\n int transactionBalance = Math.abs(amount);\n\n if (senderBalance >= transactionBalance) {\n transaction.update(senderDocRef, \"balance\", senderBalance - transactionBalance);\n transaction.update(recieverDocRef, \"amount\", recieverBalance + transactionBalance);\n transaction.update(billDocRef, \"isPaid\", true);\n\n\n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date newDate = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(newDate);\n cal.add(Calendar.MONTH, 1);\n newDate = cal.getTime();\n transaction.update(billDocRef, \"recurring\", dateformat.format(newDate));\n } else {\n Log.d(TAG, \"apply: Transaction ikke fuldført\");\n }\n\n // Success\n return null;\n }\n }).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"Transaction success!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Transaction failure.\", e);\n }\n });\n\n }", "public boolean addTransaction(double amount) {\n if ((this.balance+amount)>=0) {\r\n this.transactions.add(amount);\r\n balance+=amount;\r\n return true;\r\n }else{\r\n System.out.println(\"Balance Insufficient\");\r\n return false;\r\n }\r\n }", "public boolean generateSchedule(){\r\n return true;\r\n }", "public boolean addPerformanceTransaction(PerformanceTransaction tr, int iteration, boolean overwrite){\n\t\tif(tr.getName().isEmpty()){ \n\t\t\treturn false;\n\t\t}\n\n\t\tif(!overwrite){\n\t\t\t//Reject transactions with same name as already exists\n\t\t\tif(this.getPerformanceTransactionByName(tr.getName(), iteration) != null) {\t\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\n\t\t}else{\n\t\t\tthis.removePerformanceTransactionbyName(tr.getName(), iteration);\n\t\t}\n\t\t\n\t\tif(!transactions.containsKey(Integer.valueOf(iteration))){\n\t\t\tthis.transactions.put(Integer.valueOf(iteration), new ArrayList<PerformanceTransaction>());\n\t\t}\n\t\ttransactions.get(Integer.valueOf(iteration)).add(tr);\n\t\t\t\t\n\t\treturn true;\n\t}", "private void givenExchangeRatesExistsForEightMonths() {\n }", "public void checkLavaTileUpdates() {\n // 1 second (1 bn nanoseconds) between each tick\n long timeBetweenTicks = 1000;\n long newTime = System.currentTimeMillis();\n\n // if it has been 1 second: decrement ticks, set a new time and return true\n if (newTime - timeLastTick >= timeBetweenTicks) {\n timeLastTick = newTime;\n updateLavaTiles();\n }\n }", "public void addTransaction(Transactions t){\n listOfTransactions.put(LocalDate.now(), t);\n }", "private void processTransaction(String[] transaction) {\n\t\t\tfor (Map.Entry<Itemset, Integer> frequentItemset : frequentItemsets.entrySet()) {\n\t\t\t\tif (frequentItemset.getKey().isInTransaction(Arrays.asList(transaction))) {\n\t\t\t\t\tfrequentItemset.setValue(frequentItemset.getValue() + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "public void tick() {\n Instant now = clock.instant();\n SortedMap<Instant, Set<Endpoint>> range = timeouts.headMap(now);\n\n Set<Endpoint> processed = new HashSet<>();\n for (Set<Endpoint> batch : range.values()) {\n for (Endpoint endpoint : batch) {\n if (processed.contains(endpoint)) {\n continue;\n }\n processed.add(endpoint);\n checkExpiration(now, endpoint);\n }\n }\n range.clear();\n }", "public boolean addNewUnfinishedTask(Task task){\r\n if (!unfinished.add(task)){\r\n Task t = task;\r\n\r\n //Find the task in the set that is equal to the task in the argument\r\n for (Task tsk: unfinished){\r\n if (tsk.equals(task)){\r\n t = tsk;\r\n break;\r\n }\r\n }\r\n\r\n //Increment the hours required for that task\r\n t.incrementHrsReqd(task.getHrsLeft());\r\n return false;\r\n }\r\n return true;\r\n }", "List<TransactionVO> addPendingTransactions(List<SignedTransaction> transactions);", "void addToQueuing(int tu){\n\t\tfor(Request req : queue.list){\n\t\t\tif(req.getReqTime() * 2 > tu){\t//大于当前时间的就不管了\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(req.getValid() == true){\t//如果没被删除,拷贝一份,删之,并将拷贝添加到Queuing里面\n\t\t\t\tRequest tmp = req.cloneAnObj();\t\t//克隆一个新的对象\n\t\t\t\treq.setValid(false);\n\t\t\t\tqueuing.list.add(tmp);\t//可以用引用对Queuing进行操作\n\t\t\t}\n\t\t}\n\t}", "boolean hasTxnrequest();", "public static boolean updateReserveTimeList(List<ReserveTime> reserveTimes){\n\t\tConnection connection = DBConnection.getConnection();\n\t\tfor(ReserveTime reserveTime : reserveTimes) {\n\t\t\tif(!executeInsertUpdate(reserveTime, updateCommand + reserveTime.getID(), connection)) {\n\t\t\t\tDBConnection.closeConnection(connection);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tDBConnection.closeConnection(connection);\n\t\treturn true;\n\t}", "private void checkReservationValidityAndRemove(){\n\t\t\n\t\tfor (Reservation r: reservationArray){\n\t\t\tif (r.getBookingDateAndTime().get(Calendar.DAY_OF_MONTH)==Calendar.getInstance().get(Calendar.DAY_OF_MONTH)){\n\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MONTH)==Calendar.getInstance().get(Calendar.MONTH)){\n\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.HOUR_OF_DAY)==Calendar.getInstance().get(Calendar.HOUR_OF_DAY)){\n\t\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MINUTE) > 30 + r.getBookingDateAndTime().get(Calendar.MINUTE) ){\n\t\t\t\t\t\t\treservationArray.remove(r);\n\t\t\t\t\t\t\ttablemanager.increaseAvailable();;\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}\n\t}", "@Test\n public void testMarketTransaction ()\n {\n initializeService();\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(2), 0.5, -45.0);\n accountingService.addMarketTransaction(bob,\n timeslotRepo.findBySerialNumber(3), 0.7, -43.0);\n assertEquals(0, accountingService.getPendingTariffTransactions().size(), \"no tariff tx\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n assertEquals(2, pending.size(), \"correct number in list\");\n MarketTransaction mtx = (MarketTransaction)pending.get(0);\n assertNotNull(mtx, \"first mtx not null\");\n assertEquals(2, mtx.getTimeslot().getSerialNumber(), \"correct timeslot id 0\");\n assertEquals(-45.0, mtx.getPrice(), 1e-6, \"correct price id 0\");\n Broker b1 = mtx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n mtx = (MarketTransaction)pending.get(1);\n assertNotNull(mtx, \"second mtx not null\");\n assertEquals(0.7, mtx.getMWh(), 1e-6, \"correct quantity id 1\");\n // broker market positions should have been updated already\n MarketPosition mp2 = bob.findMarketPositionByTimeslot(2);\n assertNotNull(mp2, \"should be a market position in slot 2\");\n assertEquals(0.5, mp2.getOverallBalance(), 1e-6, \".5 mwh in ts2\");\n MarketPosition mp3 = bob.findMarketPositionByTimeslot(3);\n assertNotNull(mp3, \"should be a market position in slot 3\");\n assertEquals(0.7, mp3.getOverallBalance(), 1e-6, \".7 mwh in ts3\");\n }", "boolean hasFinalTallyResult();", "private boolean canInsertLast(Plan plan,POI poi,Trip trip,Time currentTime,Plan mPlan,boolean skip){\n // if poi cost and time addtion to plan full cost and time satisify the constrains: \n // 1- full cost <= budget\n // 2- fulltime-poiTime >=poi.startTime if skip is false only\n // 3- fulltime <= trip.endTime\n // 4- fulltime <= poi.colseTime\n // insert and make Calculations and change last\n\n // Check 1\n if((plan.getFullCost()+poi.getCost())<=trip.getBudget()){\n // Check 2\n POI last=plan.getLastPOI();\n \n if(hfun(currentTime, last, poi, mPlan, skip)){\n // Check3\n // cal poi duration\n int fullduration=poi.getDuration();\n //cal waste time\n if(skip){\n Time currTime = new Time(currentTime.hour,currentTime.min);\n if(last!=null)\n currTime.add(last.getShortestPath(poi.getId()));\n else if(mPlan!=null&&mPlan.getLastPOI()!=null)\n currTime.add(mPlan.getLastPOI().getShortestPath(poi.getId()));\n int x = Time.substract(currTime, poi.getOpenTime());\n fullduration+=(x==-1)?0:x;\n }\n //cal travel time\n if(last!=null)\n fullduration+=last.getShortestPath(poi.getId());\n else if(mPlan!=null){\n POI mLast=mPlan.getLastPOI();\n if(mLast!=null)\n fullduration+= mLast.getShortestPath(poi.getId());\n }\n if(Time.isIn(currentTime, fullduration, trip.getEndTime())){\n // Check4\n if(Time.isIn(currentTime, fullduration, poi.getCloseTime())){\n return true;\n }\n }\n }\n }\n return false;\n }", "boolean hasUpdateTriggerTime();", "@Scheduled(fixedDelay = 10000)\n @Transactional\n @Override\n public void updatedExpiredTradesStatus() {\n tradeRepository.updateExpiredTradesStatus();\n }", "public boolean ADDCHEDTransact(CHEDTransact trans) {\n query = \"INSERT INTO transact(NumberO)\";\n try {\n ps = con.prepareStatement(query);\n\n java.util.Date dateP = trans.getiTDate();\n\n Date dateSigned = new Date(dateP.getYear(), dateP.getMonth(), dateP.getDay());\n\n ps.setInt(1, trans.getNumberOFTrees());\n ps.setString(2, trans.getLotNumber());\n ps.setString(3, trans.getiTvoucher());\n ps.setString(4, trans.gettRvoucher());\n ps.setDate(5, dateSigned);\n ps.setFloat(6, trans.getAmountPayable());\n\n if (ps.executeUpdate() != 0) {\n status = true;\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(FarmerManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return status;\n }" ]
[ "0.59700286", "0.5935495", "0.59202427", "0.5792694", "0.57571214", "0.57344073", "0.56867605", "0.56393486", "0.5587315", "0.5577848", "0.55407786", "0.552369", "0.5509666", "0.54894173", "0.54882383", "0.5482525", "0.5477462", "0.54719985", "0.5427505", "0.54149044", "0.5382897", "0.53741634", "0.53603595", "0.5358654", "0.5352971", "0.535198", "0.53511477", "0.5334117", "0.5321524", "0.53166795", "0.5309726", "0.530715", "0.5301235", "0.52901274", "0.5279754", "0.52767175", "0.5275061", "0.52736276", "0.527171", "0.525607", "0.52391386", "0.52329063", "0.52187103", "0.5215564", "0.52148074", "0.5210622", "0.52005136", "0.51676637", "0.51657504", "0.516453", "0.51631093", "0.5162746", "0.5159183", "0.5157425", "0.5153801", "0.51452833", "0.5142122", "0.5135994", "0.5122792", "0.5111655", "0.5109343", "0.5108534", "0.50980854", "0.5094041", "0.50918454", "0.50867033", "0.50635606", "0.50615627", "0.50572854", "0.5053071", "0.50528365", "0.5052673", "0.50501585", "0.50501376", "0.5050113", "0.5046116", "0.5043544", "0.5040054", "0.50343555", "0.5029313", "0.5021692", "0.50209075", "0.5013406", "0.5007691", "0.50054234", "0.5003573", "0.49933723", "0.4993046", "0.4989679", "0.49884352", "0.4984247", "0.49842283", "0.49842227", "0.4980823", "0.49794346", "0.49726158", "0.4966946", "0.49636012", "0.49620208", "0.49503395" ]
0.73930675
0
load current categories into category list
public void UpdateCategoriesCheckRepeats(){ dbHandler.OpenDatabase(); ArrayList<Category> CategoryObjectList = dbHandler.getAllCategory(); // Create Category String List ArrayList<String> CategoryStringList = new ArrayList<>(); for (int i = 0; i < CategoryObjectList.size(); i++) { CategoryStringList.add( CategoryObjectList.get(i).getName() ); } Category category; // cycle through object list for (int i = 0; i < CategoryObjectList.size(); i++) { category = CategoryObjectList.get(i); CategoryObjectList.remove(i); CategoryStringList.remove(i); // remove so it doesn't find itself // find name in Category List int index = CategoryStringList.indexOf( category.getName() ); if (index == -1){ CategoryObjectList.add(category); CategoryStringList.add(category.getName()); }else{ CategoryObjectList.get(index).increaseCounter( category.getCounter() ); CategoryObjectList.get(index).increaseAmount( category.getAmount() ); i--; } } // Add back to database dbHandler.deleteAllCategory(); for (int i = 0; i < CategoryObjectList.size(); i++) { dbHandler.addCategory(CategoryObjectList.get(i)); } dbHandler.CloseDatabase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "private void getCategoryList() {\n jsonArray = dataBaseHelper.getCategoriesFromDB();\n if (jsonArray != null && jsonArray.length() > 0) {\n rvCategories.setVisibility(View.VISIBLE);\n setupCategoryListAdapter(jsonArray);\n }else {\n rvCategories.setVisibility(View.GONE);\n Toast.makeText(getActivity(), Constants.ERR_NO_CATEGORY_FOUND, Toast.LENGTH_SHORT).show();\n }\n }", "void updateUsedCategoriesContent() {\n try{\n InputStream inputStream = DMOZCrawler.class.getResourceAsStream(\"Used_categories.txt\");\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n HashSet<String> usedCategories = new HashSet<>();\n\n String currentLine;\n while ((currentLine = bufferedReader.readLine()) != null){\n usedCategories.add(currentLine.toLowerCase());\n System.out.println(\"Used category added :: \" + currentLine);\n }\n\n System.out.println(usedCategories);\n\n for(String id : usedCategories){\n categoryContent(Integer.parseInt(id));\n }\n } catch (Exception exception){\n exception.printStackTrace();\n }\n }", "private void loadCategories(CategoriesCallback callback) {\n CheckItemsActivity context = this;\n makeRestGetRequest(RestClient.CATEGORIES_URL, (success, response) -> {\n if (!success) {\n Toast.makeText(context, LOAD_CATEGORIES_FAIL, Toast.LENGTH_SHORT).show();\n // TODO: finish activity\n } else {\n try {\n categories = ModelsBuilder.getCategoriesFromJSON(response);\n // set categories list to spinner (common category spinner) and listener for it\n ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(context,\n android.R.layout.simple_spinner_item,\n categories);\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n categorySpinner.setAdapter(spinnerAdapter);\n categorySpinner.setOnItemSelectedListener(new OnCommonCategorySelected());\n } catch (JSONException e) {\n success = false;\n Log.d(DEBUG_TAG, \"Load categories parsing fail\");\n }\n }\n // inform waiting entities (e.g. waiting for items list loading start)\n callback.onLoadedCategories(success);\n });\n }", "List<Category> getAllCategories();", "public List<Categorie> getAllCategories();", "private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }", "public synchronized ActionCategories loadMedicalActionCategories()\n\t{\n\t\t// if action categories is null\n\t\tif (medicalActionCategories == null)\n\t\t{\n\t\t\t// create an xml serializator\n\t\t\tSimpleXMLSerializator serializator = new SimpleXMLSerializator();\n\t\t\t// Open categories file\n\t\t\tFile categoriesFile = new File(StorageModule.getInstance().getBasePath() + \"/\" + CATEGORIES_RELATIVE_PATH);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// load medicalactions categories\n\t\t\t\tmedicalActionCategories = (ActionCategories) serializator.deserialize(categoriesFile, ActionCategories.class);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tlog.error(\"An error ocurred while reading categories file.\", e);\n\t\t\t\tmedicalActionCategories = new ActionCategories();\n\t\t\t}\n\t\t}\n\t\treturn medicalActionCategories;\n\t}", "private void listadoCategorias() {\r\n sessionProyecto.getCategorias().clear();\r\n sessionProyecto.setCategorias(itemService.buscarPorCatalogo(CatalogoEnum.CATALOGOPROYECTO.getTipo()));\r\n }", "TrackerListCategory loadTrackerListCategory(final Integer id);", "public void loadCategoryAdapter() {\n categoryAdapter = new CategoryAdapter(context, sectionItemsWithHeaders);\n listView.setAdapter(categoryAdapter);\n }", "public ArrayList<TagCategory> loadTaglist() {\n\t\tFile src = new File(directory, FILENAME_TAGS);\n\t\treturn storageReader.loadTaglist(src);\n\t}", "List<Category> getAllCategories() throws DataBaseException;", "void loadCategoriesAsync(OnCategoryLoad onCategoryLoad);", "private void populateCategories() {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/categories\",\n new BaseJsonHttpResponseHandler<Category[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Category[] response) {\n categories_lv = (ListView) findViewById(R.id.categories_lv);\n// categoriesArr = response;\n\n // Make the first Category as \"All\" so that all teams can be shown\n // All retrieved categories will be put after \"All\"\n categoriesArr = new Category[response.length + 1];\n categoriesArr[0] = new Category(0, currEvent.getId(), \"All\", null, 0, null,\n teamsArr);\n System.arraycopy(response, 0, categoriesArr, 1, response.length);\n\n categories_lv.setAdapter(new CategoryAdapter(SelectionActivity.this,\n categoriesArr));\n categories_lv.setOnItemClickListener(new CategoryClickListener());\n\n Log.d(\"GET CATEGORIES\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Category[] errorResponse) {\n Log.d(\"GET CATEGORIES\", \"failure\");\n }\n\n @Override\n protected Category[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_categories\");\n return new Gson().fromJson(teamsJSONArr.toString(), Category[].class);\n } else return null;\n }\n });\n }", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "private void listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }", "private void updateCategoryTree() {\n categoryTree.removeAll();\r\n fillTree(categoryTree);\r\n\r\n }", "public Category loadCategoryTree() {\n Category categoryTree = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n categoryTree = dbb.loadCategoryTree();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return categoryTree;\n }", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "public List<Category> queryExistingCategory(){\n\t\tArrayList<Category> cs = new ArrayList<Category>(); \n\t\tCursor c = queryTheCursorCategory(); \n\t\twhile(c.moveToNext()){\n\t\t\tCategory category = new Category();\n\t\t\tcategory._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tcategory.title = c.getString(c.getColumnIndex(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE));\n\t\t\tcategory.numberOfEntries = this.queryLocationEntryNumberByCategory(category._id);\n\t\t\tcs.add(category);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn cs;\n\t\t\n\t}", "@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}", "public ArrayList<Category> getCategories() {\n ArrayList<Category> categories = new ArrayList<>();\n Cursor cursor = database.rawQuery(\"SELECT * FROM tbl_categories\", null);\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Category category = new Category();\n category.setCategory_id(cursor.getInt(cursor.getColumnIndex(\"category_id\")));\n category.setCategory_name(cursor.getString(cursor.getColumnIndex(\"category_name\")));\n\n\n categories.add(category);\n cursor.moveToNext();\n }\n cursor.close();\n return categories;\n }", "public List<String> getCategories();", "public final void readCategoria() {\n cmbCategoria.removeAllItems();\n cmbCategoria.addItem(\"\");\n categoryMapCategoria.clear();\n AtividadePreparoDAO atvprepDAO = new AtividadePreparoDAO();\n for (AtividadePreparo atvprep : atvprepDAO.readMotivoRetrabalho(\"Categoria\")) {\n Integer id = atvprep.getMotivo_retrabalho_id();\n String name = atvprep.getMotivo_retrabalho();\n cmbCategoria.addItem(name);\n categoryMapCategoria.put(id, name);\n }\n }", "public void setCategories(Categories categories) {\n this.categories = categories;\n }", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "private void loadCategories() {\n // adapter that show data (View Holder with data )in Recycler View\n adapter=new FirebaseRecyclerAdapter<Category, CategoryViewHolder>(\n Category.class,\n R.layout.category_layout,\n CategoryViewHolder.class,\n categories) {\n @Override\n protected void populateViewHolder(CategoryViewHolder viewHolder, final Category model, int position) {\n // set data in View Holder\n viewHolder.name.setText(model.getName());\n Picasso.with(getActivity()).load(model.getImage()).into(viewHolder.image);\n // action View Holder\n viewHolder.setItemClickListener(new ItemClickListener() {\n // method that i create in interface and put it in action of click item in category view holder (to use position )\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n //get category id from adapter and set in Common.CategoryId\n Common.categoryId=adapter.getRef(position).getKey(); // 01 or 02 or 03 ..... of category\n Common.categoryName=model.getName(); // set name of category to Common variable categoryName\n startActivity(Start.newIntent(getActivity()));// move to StartActivity\n\n }\n });\n\n }\n };\n adapter.notifyDataSetChanged(); //refresh data when changed\n list.setAdapter(adapter); // set adapter\n }", "public static ArrayList<Category> ParseCategories(JSONObject jsonTotalObject)\n {\n ArrayList<Category> categoryArrayList = new ArrayList<>();\n try\n {\n JSONArray categories = jsonTotalObject.getJSONArray(\"categories\");\n\n // The recent categories\n Category recent = new Category();\n recent.setName(\"Recent\");\n recent.setId(0);\n categoryArrayList.add(recent);\n\n for(int i = 0;i<categories.length();i++)\n {\n JSONObject jsonObject = categories.getJSONObject(i);\n Category category = new Category();\n category.setName(jsonObject.getString(\"title\"));\n category.setId(jsonObject.getInt(\"id\"));\n category.setSlugName(jsonObject.getString(\"slug\"));\n categoryArrayList.add(category);\n }\n return categoryArrayList;\n } catch (JSONException e)\n {\n Log.e(TAG,\"JSONException when loading categories\",e);\n e.printStackTrace();\n return null;\n }\n }", "public static ArrayList<AdminCategory> fetchCategoryList() {\r\n\r\n\t\tArrayList<AdminCategory> categoryList = new ArrayList<AdminCategory>();\r\n\r\n\t\tsqlQuery = \"SELECT categoryName, status, B.level,\" +\r\n\t\t\t\t\"(SELECT categoryName FROM flipkart_category A WHERE A.categoryID=C.parentID) AS parentCategory, \" +\r\n\t\t\t\t\"B.categoryID \" +\r\n\t\t\t\t\"FROM flipkart_category B, flipkart_path C \" +\r\n\t\t\t\t\"WHERE B.categoryID=C.categoryID ORDER BY B.level;\";\r\n\r\n\t\ttry{\r\n\t\t\tconn=DbConnection.getConnection();\r\n\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\trs=ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tAdminCategory category = new AdminCategory();\r\n\t\t\t\tcategory.setCategoryName(rs.getString(1));\r\n\t\t\t\tcategory.setStatus(rs.getInt(2));\r\n\t\t\t\tcategory.setLevel(rs.getInt(3));\r\n\t\t\t\tcategory.setParentCategory(rs.getString(4));\r\n\t\t\t\tcategory.setCategoryID(rs.getInt(5));\r\n\t\t\t\tcategoryList.add(category);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn categoryList;\r\n\t}", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "@Override\n public void gotCategories(ArrayList<String> categories) {\n ArrayAdapter<String> categoryAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_list_item_1 , categories);\n categoriesListView.setAdapter(categoryAdapter);\n }", "@Override\r\n\tpublic List<Category> list() {\n\t\treturn categories;\r\n\t}", "List<Category> getAllCategories() throws DaoException;", "private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "ListCategoryResponse listCategories(ListCategoryRequest request);", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn category.selectAllCategory();\n\t}", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn dao.getAllCategory();\n\t}", "public void getRemoteCategories() {\n //check for connection if true go to apihelper and get model else check if these model cached so get it\n url = getAllCategoriesWithoutItems;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getCategories(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "@Override\n public void updateCategories(List<String> categories) {\n //Update the Category Spinner with the new data\n mCategorySpinnerAdapter.clear();\n //Add the Prompt as the first item\n categories.add(0, mSpinnerProductCategory.getPrompt().toString());\n mCategorySpinnerAdapter.addAll(categories);\n //Trigger data change event\n mCategorySpinnerAdapter.notifyDataSetChanged();\n\n if (!TextUtils.isEmpty(mCategoryLastSelected)) {\n //Validate and Update the Category selection if previously selected\n mPresenter.updateCategorySelection(mCategoryLastSelected, mCategoryOtherText);\n }\n }", "public void newCategory() {\n btNewCategory().push();\n }", "@Override\n\tpublic List<Category> getAllCategories() {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM \"+Category.class.getName());\n\t\treturn (List<Category>)query.list();\t\t\n\t}", "@RequestMapping(value = \"/allCategory\", method = RequestMethod.POST)\r\n\tpublic ModelAndView loadallCategory() {\r\n\t\tModelAndView modelAndView = null;\r\n\t\tList<Category> categoryObjLst = chooseAssessmentService.fetchAssessmentCategory();\r\n\t\tChooseAssessment assessment = new ChooseAssessment();\r\n\t\tassessment.setCategoryObjList(categoryObjLst);\r\n\t\tmodelAndView = new ModelAndView(\"attemptsQuestionsPage\", \"assessment\", assessment);\r\n\r\n\t\tmodelAndView.addObject(\"categoryObjs\", categoryObjLst);\r\n\t\treturn modelAndView;\r\n\t}", "WebBookNewsCateListResult listAllBookNewsCategories();", "private void lanzarListadoCategorias() {\n\t\tIntent i = new Intent(this, ListCategorias.class);\n\t\tstartActivity(i);\n\t\t\n\t}", "List<Category> selectCategoryList();", "List<ProductCategory> getAll();", "public List<Category> getAllCategories() {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery q = session.createQuery(\"from Category\");\n\t\t\tList<Category> catlist = q.list();\n\t\t\t\n\t\t\treturn catlist;\n\t\t}", "@RequestMapping(\"\")\n\tpublic ModelAndView category(){\n\t\tJSONObject json = categoryService.getAllCategorys();\n\t\tModelAndView mv = new ModelAndView(\"category/category\");\n\t\tmv.addObject(\"categories\",json);\n\t\tmv.addObject(\"active\", \"2\");\n\t\treturn mv;\n\t}", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public ArrayList<Categories> getAllCategories() {\n\t\t\n\t\tCategories cg;\n\t\tArrayList<Categories> list=new ArrayList<Categories>();\n\t\t\n\t\ttry {\n\t\t\t String query=\"select * from categories;\";\n\t\t\tPreparedStatement pstm=con.prepareStatement(query);\n\t\t\tResultSet set= pstm.executeQuery();\n\t\t\t\n\t\t\twhile(set.next()) {\n\t\t\t\tint cid=set.getInt(1);\n\t\t\t\tString cname=set.getString(2);\n\t\t\t\tString cdes=set.getString(3);\n\t\t\t\t\n\t\t\t\tcg=new Categories(cid, cname, cdes);\n\t\t\t\tlist.add(cg);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "@RequestMapping(value=\"getAllCategories\", method=RequestMethod.GET)\n\tpublic String getAllCategories(Model m, HttpServletRequest request){\n\t\t\n\t\tList<Category> categories = sr.getAllCategories();\n\t\t\n\t\trequest.getSession().setAttribute(\"categories\", categories);\n\t\tm.addAttribute(\"categories\", categories);\n\t\t\n\t\treturn \"Song/addSong\";\n\t}", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "@Override\n\tpublic List<Category> findAllCategory() {\n\t\treturn categoryRepository.findAllCategory();\n\t}", "public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}", "@Override\n\tpublic List<Category> findcategory() {\n\t\t\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Category> list=new ArrayList<Category>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,parent_id,name,status,sort_order,create_time,update_time from category\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tCategory category=new Category(rs.getInt(\"id\"),rs.getInt(\"parent_id\"),rs.getString(\"name\"),rs.getInt(\"status\"),rs.getInt(\"sort_order\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t\t\tlist.add(category);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t\t\n\t\t\n\n\t}", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public ArrayList<Categoria> listarCategorias();", "public List<Cvcategory> findAllCvcategories();", "@ModelAttribute(\"categories\")\r\n\tpublic List<Category> getCategoryList() {\r\n\t\treturn categoryDAO.list();\r\n\t}", "public Categories getCategories() {\n return this.categories;\n }", "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", "@Override\n public Single<List<CategoryModel>> getCategories() {\n return api.getCategories().map(categories -> iVmMapper.mapToViewModel(categories));\n }", "@Override\n\tpublic List<CategoryVO> mainCategory() {\n\t\treturn mapper.mainCategory();\n\t}", "public static void consultarListaCategorias(Activity activity) {\n ConexionSQLite conectar = new ConexionSQLite(activity, BASE_DATOS, null, 1);\n SQLiteDatabase db = conectar.getReadableDatabase();\n CategoriaVo categoria = null;\n listaCategorias = new ArrayList<CategoriaVo>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM \"+TABLA_CATEGORIAS, null);\n\n while (cursor.moveToNext()) {\n categoria = new CategoriaVo();\n categoria.setId(cursor.getInt(0));\n categoria.setCategoria(cursor.getString(1));\n categoria.setDescripcion(cursor.getString(2));\n\n listaCategorias.add(categoria);\n }\n db.close();\n }", "public List<Movie> getMoviesFromCats(Category chosenCat) throws DalException\n {\n\n ArrayList<Movie> categoryMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idCat = chosenCat.getId();\n // SQL code. \n String sql = \"SELECT * FROM Movie INNER JOIN CatMovie ON Movie.id = CatMovie.movieId WHERE categoryId=\" + idCat + \";\";\n\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(sql);\n\n while (rs.next())\n {\n // Add all to a list\n Movie movie = new Movie();\n movie.setId(rs.getInt(\"id\"));\n movie.setName(rs.getString(\"name\"));\n movie.setRating(rs.getDouble(\"rating\"));\n movie.setFilelink(rs.getString(\"filelink\"));\n movie.setLastview(rs.getDate(\"lastview\").toLocalDate());\n movie.setImdbRating(rs.getDouble(\"imdbrating\"));\n categoryMovies.add(movie);\n }\n //Return\n return categoryMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(MovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Nope can´t do\");\n }\n\n }", "public List<Category> getAllAvailableCategory() {\n\t\treturn categoryManager.getAllAvailable();\n\t}", "@Override\n\tpublic Iterable<Category> findAllCategory() {\n\t\treturn categoryRepository.findAll();\n\t}", "private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\tString hql = \"from Category\";\r\n\t\treturn (List<Category>) getHibernateTemplate().find(hql);\r\n\t}", "public static void showCategories() throws IOException {\n Main.FxmlLoader(CATEGORY_PATH);\n }", "List<Category> getCategories() throws DAOExceptionHandler;", "public Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\n }", "public List<Category> getAllCategories() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Category\");\r\n\t\tList<Category> categories = query.list();\r\n\r\n\t\treturn categories;\r\n\t}", "@NonNull\n public static List<Category> getCategories() {\n if (CATEGORY == null) {\n CATEGORY = new ArrayList<>();\n CATEGORY.add(new Category(\"Bollywood\", R.drawable.bollywood, 1));\n CATEGORY.add(new Category(\"Hollywood\", R.drawable.hollywood3, 2));\n CATEGORY.add(new Category(\"Cricket\", R.drawable.cricket4, 3));\n CATEGORY.add(new Category(\"Science\", R.drawable.science1, 4));\n CATEGORY.add(new Category(\"Geography\", R.drawable.geography, 5));\n CATEGORY.add(new Category(\"History\", R.drawable.history, 6));\n }\n return CATEGORY;\n }", "public synchronized static void loadCategoryCatch(GoodsService goodsService) {\n\tList<CategoryForShow> tempList = goodsService.selectShowCategory();\r\n\tCache t= new Cache();\r\n\tt.setValue(tempList);\r\n\tt.setTimeOut(System.currentTimeMillis()+3600000);\r\n\tCacheManager.clearOnly(\"category\");\r\n\tCacheManager.putCache(\"category\", t);\r\n\t//t=null;\r\n}", "default List<String> getCategory(String category) {\n return new ArrayList<>(getCategories().get(category.toLowerCase()).values());\n }", "public List<Category> list() {\n\t\tSession session = getSession();\n\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n session.close();\n\t\treturn categoryList;\n\t}", "public void Categories() {\n final ProgressDialog dialog = new ProgressDialog(getActivity());\n dialog.setCanceledOnTouchOutside(false);\n dialog.setMessage(\"Please Wait...\");\n dialog.show();\n\n Call<Categories> logincall = apiInterface.categoriespojo();\n logincall.enqueue(new Callback<Categories>() {\n @Override\n public void onResponse(Call<Categories> call, Response<Categories> response) {\n dialog.dismiss();\n if (response.body().getStatus() == 1) {\n if (Constants.categoriesData != null) {\n Constants.categoriesData.clear();\n }\n if (!Constants.categoriesData.equals(\"\") && Constants.categoriesData != null) {\n Constants.categoriesData.addAll(response.body().getData());\n CategoryAdapter adapter = new CategoryAdapter(getActivity());\n recycler_view.setAdapter(adapter);\n if (adapter != null)\n adapter.notifyDataSetChanged();\n } else {\n Toast.makeText(getActivity(), response.body().getMsg(), Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n @Override\n public void onFailure(Call<Categories> call, Throwable t) {\n dialog.dismiss();\n Helper.showToastMessage(activity, \"No Internet Connection\");\n }\n });\n }", "public ObservableList<String> getCategories()\n {\n ArrayList<Category> categoryList = rentalModel.getCategoryList();\n ArrayList<String> categoryListString = new ArrayList<>();\n for (int i = 0; i < categoryList.size(); i++)\n {\n categoryListString.add(categoryList.get(i).toString());\n }\n categoriesList = FXCollections.observableArrayList(categoryListString);\n return categoriesList;\n }", "public @NotNull Set<Category> findAllCategories() throws BazaarException;", "@Override\n\n // If the request is succesfull\n public void onResponse(JSONObject response) {\n try {\n JSONArray categoriesArray = response.getJSONArray(\"categories\");\n for (int i = 0; i < categoriesArray.length(); i++){\n categories.add(categoriesArray.getString(i));\n }\n }\n catch (JSONException e) {\n Log.e(\"Request\", e.getMessage());\n }\n activity.gotCategories(categories);\n }", "public static List<Category> findAll() {\n List<Category> categories = categoryFinder.findList();\n if(categories.isEmpty()){\n categories = new ArrayList<>();\n }\n return categories;\n }", "public List<String> findAllCategories() {\r\n\t\tList<String> result = new ArrayList<>();\r\n\r\n\t\t// 1) get a Connection from the DataSource\r\n\t\tConnection con = DB.gInstance().getConnection();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2) create a PreparedStatement from a SQL string\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GET_CATEGORIES_SQL);\r\n\r\n\t\t\t// 3) execute the SQL\r\n\t\t\tResultSet resultSet = ps.executeQuery();\r\n\t\t\twhile (resultSet.next()) {\r\n\r\n\t\t\t\tString cat = resultSet.getString(1);\r\n\t\t\t\tresult.add(cat);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.gInstance().returnConnection(con);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "private void loadData()\n {\n if (isAdded() && !getActivity().isFinishing())\n {\n // progress.show();\n RestClient.GitApiInterface service = RestClient.getClient();\n\n Call<CategoryHolder> call = service.getCategory(helper.getB64Auth(getActivity()),\"application/json\", \"application/json\");\n //Call call1=service.getCategory();\n call.enqueue(new Callback<CategoryHolder>() {\n @Override\n public void onResponse(Response<CategoryHolder> response) {\n // progress.dismiss();\n Log.d(\"NewCheckout\", \"Status Code = \" + response.code());\n if (response.isSuccess()) {\n try {\n CategoryHolder result = response.body();\n categoryObject = new JSONObject(result.getCategories().getAsJsonObject().toString());\n idCat = new String[categoryObject.length()];\n catName = new String[categoryObject.length()];\n Iterator<?> keys = categoryObject.keys();\n ArrayList<String> keyList = new ArrayList();\n while (keys.hasNext()) {\n keyList.add((String) keys.next());\n }\n Collections.sort(keyList);\n\n for (String key : keyList) {\n int rootCount = 0;\n\n JSONObject object = categoryObject.getJSONObject(key);\n String name = object.getString(\"category\");\n String id = object.getString(\"category_id\");\n\n String url = \"\";\n if (object.has(\"main_pair\")) {\n JSONObject js = object.getJSONObject(\"main_pair\");\n JSONObject js_obj = js.getJSONObject(\"detailed\");\n url = js_obj.getString(\"http_image_path\");\n }\n\n if (object.has(\"subcategories\")) {\n\n JSONArray parentObject = object.getJSONArray(\"subcategories\");\n int parentCount = 0;\n for (int i = 0; i < parentObject.length(); i++) {\n JSONObject objectChild = parentObject.getJSONObject(i);\n//\n if (objectChild.has(\"subcategories\")) {\n int childCount = 0;\n JSONArray childObject = objectChild.getJSONArray(\"subcategories\");\n for (int j = 0; j < childObject.length(); j++) {\n // String childKey = (String) parentKeys.next();\n JSONObject child = childObject.getJSONObject(j);\n int count = child.optInt(\"product_count\");\n childCount += count;\n\n\n }\n parentCount += childCount;\n }\n\n\n }\n if (parentCount == 0)\n rootCount += 1;\n else\n rootCount += parentCount;\n }\n final GridRow gridRow = new GridRow(url, name, id);\n gridRow.id = id;\n gridRow.setCount(rootCount);\n gridRow.subCategories = object.has(\"subcategories\");\n if (getActivity() != null) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.add(gridRow);\n }\n });\n }\n\n //Log.i(\"CATEGORY--\", name);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n } else {\n // response received but request not successful (like 400,401,403 etc)\n //Handle errors\n\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n progress.dismiss();\n\n if (getActivity() != null && !getActivity().isFinishing()) {\n new AlertDialogManager().showAlertDialog(getActivity(),\n getString(R.string.error),\n getString(R.string.server_error));\n }\n }\n });\n }\n\n }", "private void setupCategoryListAdapter(JSONArray dataList) {\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 1, GridLayoutManager.VERTICAL, false);\n rvCategories.setLayoutManager(gridLayoutManager);\n adapter = new CategoryListAdapter(getActivity(), dataList);\n rvCategories.setAdapter(adapter);\n adapter.setRvClickListener(this);\n }", "public List<Category> getCatForMovies(Movie chosenMovie) throws DalException\n {\n ArrayList<Category> allCatForMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idMov = chosenMovie.getId();\n // SQL code. \n String sql = \"SELECT * FROM Category INNER JOIN CatMovie ON Category.id = CatMovie.categoryId WHERE movieId='\" + idMov + \"';\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n\n // Add all to a list\n Category category = new Category();\n category.setId(rs.getInt(\"id\"));\n category.setName(rs.getString(\"name\"));\n\n allCatForMovies.add(category);\n }\n //Return\n return allCatForMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }", "public List<Category> getCategories() {\n CategoryRecords cr = company.getCategoryRecords();\n List<Category> catList = cr.getCategories();\n return catList;\n }" ]
[ "0.8003433", "0.7700738", "0.69482374", "0.6921355", "0.6848375", "0.67916745", "0.67744696", "0.6722537", "0.6720254", "0.67060924", "0.66105014", "0.65976334", "0.65879434", "0.65165746", "0.6493409", "0.64364934", "0.6424198", "0.64104724", "0.6399772", "0.6394962", "0.63672155", "0.6336306", "0.63301796", "0.63248295", "0.63192046", "0.6311816", "0.6290555", "0.6270023", "0.6263684", "0.6262243", "0.6260411", "0.62505394", "0.62481743", "0.624286", "0.6234163", "0.6226923", "0.62019527", "0.6199994", "0.6172378", "0.61557263", "0.61337847", "0.612636", "0.61246353", "0.61028695", "0.61027527", "0.60960686", "0.6084234", "0.6059694", "0.6056289", "0.60512656", "0.6040984", "0.60336107", "0.6029854", "0.6018276", "0.60125965", "0.6010735", "0.60088664", "0.6001521", "0.59990567", "0.598856", "0.59869397", "0.59839344", "0.59830654", "0.59795225", "0.5974858", "0.5970497", "0.59464526", "0.59338933", "0.5919814", "0.59190106", "0.5910997", "0.5899488", "0.5890637", "0.58832574", "0.58827275", "0.5868121", "0.58678335", "0.58666897", "0.5861782", "0.58608466", "0.58544093", "0.5848251", "0.5846673", "0.5845085", "0.58393306", "0.5834004", "0.5833492", "0.58318794", "0.5826956", "0.5821982", "0.5808816", "0.5803874", "0.5796409", "0.57950586", "0.5791276", "0.57888436", "0.5779037", "0.57681876", "0.5766001", "0.57609564", "0.5758612" ]
0.0
-1
SE ENCARGA DEL MANEJO DE LAS DEFINICIONES CSS PARA LLAMARLAS DESDE EL CHTML
public Elemento buscaEnDefiniciones(String nombre, String tipo) { for(int x = 0; x < this.definiciones.size(); x++) { Elemento aux = this.definiciones.get(x).busca_elemento(nombre, tipo); if(aux!=null) { return aux; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void writeCss(HttpServletRequest request,\n HttpServletResponse response) throws IOException, QuickFixException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n List<String> namespaces = Lists.newArrayList(context.getPreloads());\n DefinitionService definitionService = Aura.getDefinitionService();\n Client.Type type = Aura.getContextService().getCurrentContext().getClient().getType();\n Mode mode = context.getMode();\n StringBuffer sb = new StringBuffer();\n \n for (String ns : namespaces) {\n String key = type.name() + \"$\" + ns;\n \n String nsCss = !mode.isTestMode() ? cssCache.get(key) : null;\n if (nsCss == null) {\n DefDescriptor<ThemeDef> matcher = definitionService.getDefDescriptor(String.format(\"css://%s.*\", ns),\n ThemeDef.class);\n Set<DefDescriptor<ThemeDef>> descriptors = definitionService.find(matcher);\n List<ThemeDef> nddefs = new ArrayList<ThemeDef>();\n \n sb.setLength(0);\n for(DefDescriptor<ThemeDef> descriptor : descriptors){\n //\n // This could use the generic routine above except for this brain dead little\n // gem.\n //\n if(!descriptor.getName().toLowerCase().endsWith(\"template\")){\n ThemeDef def = descriptor.getDef();\n if(def != null){\n nddefs.add(def);\n }\n }\n }\n \n context.setPreloading(true);\n Appendable tmp = mode.isTestMode() ? response.getWriter() : sb;\n preloadSerialize(nddefs, ThemeDef.class, tmp);\n if (!mode.isTestMode()) {\n nsCss = sb.toString();\n cssCache.put(key, nsCss);\n }\n }\n \n if (nsCss != null) {\n \tresponse.getWriter().append(nsCss);\n }\n }\n }", "private String cssFileForHtml() {\r\n\t\treturn \"<style>table, td, th {\"\r\n\t\t\t\t+ \"border: 1px solid #ddd;\"\r\n\t\t\t\t+ \"text-align: left;}\"\r\n\t\t\t\t+ \"table {\"\r\n\t\t\t\t+ \"border-collapse: collapse;\"\r\n\t\t\t\t+ \"width: 100%;}\"\r\n\t\t\t\t+ \"th, td {\"\r\n\t\t\t\t+ \"padding: 10px;\"\r\n\t\t\t\t+ \"color:#000000;\"\r\n\t\t\t\t+ \"font-family: 'Roboto', sans-serif;}td{\"\r\n\t\t\t\t+ \"font-size: smaller;}\"\r\n\t\t\t\t+ \"th{background-color:#EEEEEE;color:#000000;}tr{background-color:#FFFFFF;}\"\r\n\t\t\t\t+ \"tr:hover{background-color:#EEEEEE}</style>\";\r\n\t}", "private String getCSS() {\r\n StringBuffer css = new StringBuffer();\r\n css.append(\"<style type='text/css'>\");\r\n css.append(\"<!--\");\r\n css.append(\"\tA.pagina:link, A.pagina:visited, A.pagina:active, A.pagina:hover {\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-STYLE: normal;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-DECORATION: none ;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:link {\");\r\n css.append(\"\t\tCOLOR: #0039ba;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:visited {\");\r\n css.append(\"\t\tCOLOR: #6c8bc3;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:active {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tA.pagina:hover {\");\r\n css.append(\"\t\tCOLOR: #ff6d00;\");\r\n css.append(\"\t}\");\r\n css.append(\"\tTR.pagina{\");\r\n css.append(\"\t\tFONT-FAMILY: verdana;\");\r\n css.append(\"\t\tFONT-SIZE: 10pt;\");\r\n css.append(\"\t\tFONT-WEIGHT: bold;\");\r\n css.append(\"\t\tTEXT-ALIGN: center;\");\r\n css.append(\"\t\tCOLOR: gray;\");\r\n css.append(\"\t}\");\r\n css.append(\"-->\");\r\n css.append(\"</style>\");\r\n return (css.toString());\r\n }", "private void addCss() {\n StyleLink jqueryLink = new StyleLink(\"http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css\");\n page.addHeader(jqueryLink);\n StyleLink jqueryTooltipLink = new StyleLink(\"/css/jquery.ui.tooltip.css\");\n page.addHeader(jqueryTooltipLink);\n StyleLink cssLink = new StyleLink(\"/css/lockss-new.css\");\n page.addHeader(cssLink);\n }", "public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }", "public void processFile() {\n Matcher m = css.matcher(html);\n html = m.replaceAll(matchResult -> {\n String location = File.relative(this.file, matchResult.group(1));\n String stylesheet = File.readFrom(location);\n File loc = new File(location).getParentFile();\n Matcher urlMatcher = url.matcher(stylesheet);\n stylesheet = urlMatcher.replaceAll(match -> {\n String s = \"url(\\\"\" + File.relative(loc, match.group(1)) + \"\\\")\";\n return s.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\n });\n loc.close();\n return String.format(\"<style type=\\\"text/css\\\">%n%s%n</style>\", stylesheet);\n });\n replaceItAll(js, \"<script type=\\\"text/javascript\\\">%n%s%n</script>\", s -> File.readFrom(file.getAbsolutePath() + \"\\\\\" + s));\n }", "public String getCss() {\n return clean(css);\n }", "public static StringBuilder getCss(boolean asTable) {\r\n\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tif (asTable) {\r\n\t\t\tsb.append(\"<style type=\\\"text/css\\\">\\n\");\r\n\r\n\t\t\tsb.append(\"body {\\n\");\r\n\t\t\tsb\r\n\t\t\t\t\t.append(\"font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"color: #0055B7;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h1 {\\n\");\r\n\t\t\tsb.append(\"padding: 30px 0 0 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"#date {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"hr {\\n\");\r\n\t\t\tsb.append(\"height: 1px;\\n\");\r\n\t\t\tsb.append(\"background-color: cccccc;\\n\");\r\n\t\t\tsb.append(\"color: #cccccc;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2 h3 {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 10px 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report {\\n\");\r\n\t\t\t// sb.append(\"table-layout: fixed\\n\");\r\n\t\t\tsb.append(\"width: 100%;\\n\");\r\n\t\t\tsb.append(\"border: 1px solid #e0dfe3;\\n\");\r\n\t\t\tsb.append(\"border-collapse: collapse;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"table-layout: fixed\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report th {\\n\");\r\n\t\t\tsb.append(\"text-align: left;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"background-color: #f9fafd;\\n\");\r\n\t\t\tsb.append(\"color: #595a5f;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 1px #999999 solid;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report th.featureName {\\n\");\r\n\t\t\tsb.append(\"background-color: #f2f2f3;\\n\");\r\n\t\t\tsb.append(\"font: #595a5f Tahoma, Verdana, Arial bold;\\n\");\r\n\t\t\tsb.append(\"font-size: 1.1em;\\n\");\r\n\t\t\tsb.append(\"border-top: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-top-style: double;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-bottom-style: double;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.report td {\\n\");\r\n\t\t\tsb.append(\"word-wrap: normal;\\n\");\r\n\t\t\tsb.append(\"border: 1px #EBEBEB;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"border-style: solid; \\n\");\r\n\t\t\tsb.append(\"vertical-align: top;\\n\");\r\n\t\t\tsb.append(\"font: Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"_font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary {\\n\");\r\n\t\t\tsb.append(\"border: 1px solid #e0dfe3;\\n\");\r\n\t\t\tsb.append(\"border-collapse: collapse;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary th {\\n\");\r\n\t\t\tsb.append(\"text-align: left;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"background-color: #f9fafd;\\n\");\r\n\t\t\tsb.append(\"color: #595a5f;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 1px #999999 solid;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary th.featureName {\\n\");\r\n\t\t\tsb.append(\"background-color: #f2f2f3;\\n\");\r\n\t\t\tsb.append(\"font: #595a5f Tahoma, Verdana, Arial bold;\\n\");\r\n\t\t\tsb.append(\"font-size: 1.1em;\\n\");\r\n\t\t\tsb.append(\"border-top: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-top-style: double;\\n\");\r\n\t\t\tsb.append(\"border-bottom: 3px #9d9da1;\\n\");\r\n\t\t\tsb.append(\"border-bottom-style: double;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"table.summary td {\\n\");\r\n\t\t\tsb.append(\"word-wrap: break-word;\\n\");\r\n\t\t\tsb.append(\"border: 1px #EBEBEB;\\n\");\r\n\t\t\tsb.append(\"padding: 5px;\\n\");\r\n\t\t\tsb.append(\"border-style: solid; \\n\");\r\n\t\t\tsb.append(\"vertical-align: top;\\n\");\r\n\t\t\tsb.append(\"font: Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"_font-size: 0.8em;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".currentValue {\\n\");\r\n\t\t\tsb.append(\"background-color: #a3e5a9;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"</style>\\n\");\r\n\r\n\t\t} else {\r\n\t\t\tsb.append(\"<style type=\\\"text/css\\\">\\n\");\r\n\t\t\tsb.append(\"body {\\n\");\r\n\t\t\tsb.append(\"word-wrap: break-word;\\n\");\r\n\t\t\tsb\r\n\t\t\t\t\t.append(\"font-family: Nokia Standard Multiscript, Tahoma, Verdana, Arial;\\n\");\r\n\t\t\tsb.append(\"color: #0055B7;\\n\");\r\n\t\t\tsb.append(\"padding: 0 0 0 10px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h1#reportName {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"padding: 30px 0 0 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"#date {\\n\");\r\n\t\t\tsb.append(\"text-align: center;\\n\");\r\n\t\t\tsb.append(\"page-break-after: always;\\n\");\r\n\t\t\tsb.append(\"padding: 0;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2#tocHeader {\\n\");\r\n\t\t\tsb.append(\"padding: 20px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"margin: inherit;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"ul.toc, ul.toc ul {\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"margin: inherit;\\n\");\r\n\t\t\tsb.append(\"list-style-type: none;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"hr {\\n\");\r\n\t\t\tsb.append(\"page-break-after: always;\\n\");\r\n\t\t\tsb.append(\"height: 1px;\\n\");\r\n\t\t\tsb.append(\"background-color: cccccc;\\n\");\r\n\t\t\tsb.append(\"color: #cccccc;\\n\");\r\n\t\t\tsb.append(\"width: 100%;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".group, .subgroup, .feature, .setting {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".subsetting {\\n\");\r\n\t\t\tsb.append(\"padding: 10px 0 0 20px;\\n\");\r\n\t\t\tsb.append(\"margin: 0;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"h2, h3, h4, h5, h6 {\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 0px;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".description {\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"margin: 0 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".settingValues {\\n\");\r\n\t\t\tsb.append(\"padding: 0px;\\n\");\r\n\t\t\tsb.append(\"margin: 5px 0 0 0px;\\n\");\r\n\t\t\tsb.append(\"color: #333333;\\n\");\r\n\t\t\tsb.append(\"font-size: 12px;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".Property {\\n\");\r\n\t\t\tsb.append(\"float: left;\\n\");\r\n\t\t\tsb.append(\"width: 200px;\\n\");\r\n\t\t\tsb.append(\"clear: both;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".Value {\\n\");\r\n\t\t\tsb.append(\"position: relative;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\".PropertySum {\\n\");\r\n\t\t\tsb.append(\"float: left;\\n\");\r\n\t\t\tsb.append(\"margin-left: 50px;\\n\");\r\n\t\t\tsb.append(\"width: 200px;\\n\");\r\n\t\t\tsb.append(\"clear: both;\\n\");\r\n\t\t\tsb.append(\"}\\n\");\r\n\r\n\t\t\tsb.append(\"</style>\\n\");\r\n\t\t}\r\n\t\treturn sb;\r\n\t}", "protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}", "private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}", "public abstract String getDefaultStylesheet ();", "@org.junit.Test\n public void css()\n {\n assertEquals(\"empty\", \"\", Encodings.toCSSString(\"\"));\n assertEquals(\"simple\", \"simple\", Encodings.toCSSString(\"simple\"));\n assertEquals(\"spaces\", \"justatest\", Encodings.toCSSString(\"just a test\"));\n assertEquals(\"special\", \"a\", Encodings.toCSSString(\"&*%$#a%#!@()\"));\n }", "private void processCss() throws MalformedURLException, IOException {\r\n\r\n\t\tcssList = fullList.extractAllNodesThatMatch(new NodeClassFilter(\r\n\t\t\t\tTagNode.class), true);\r\n\t\tthePageCss = new HashMap<String, String>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = cssList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tTagNode tempNode = (TagNode) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getAttribute(\"type\");\r\n\r\n\t\t\tif ((tagText != null) && (tagText.contains(\"text/css\"))) {\r\n\r\n\t\t\t\tif (tempNode instanceof StyleTag) {\r\n\t\t\t\t\tprocessImportTypeCss(tempNode);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessLinkTypeCss(tempNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getCurrentcss() {\n return clean(currentcss);\n }", "private String doCss() throws IOException {\n String outputLine;\n File path = new File(\"src/main/resources/app.css\");\n FileReader fileReader = new FileReader(path);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n outputLine = \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/css \\r\\n\"\n + \"\\r\\n\";\n String inputLine;\n while ((inputLine=bufferedReader.readLine()) != null){\n outputLine += inputLine + \"\\n\";\n }\n return outputLine;\n }", "private void loadCssForThisClass() {\n\t\tString className = getClass().getName();\n\t\tString cssPath = className.replace(\".\", \"/\") + \".css\";\n\t\tURL cssUrl = getClass().getClassLoader().getResource(cssPath);\n\t\tloadCss(cssUrl);\n\n\t\t// System.out.println(\"CSS:\\n\" + getCssContent(cssUrl) );\n\t}", "public void setCss(String css) {\n this.css = css;\n }", "public BlockUIThemedCSS()\n\t{\n\t\t//No config required\n\t}", "private static String loadStyleSheet() {\n\t\tBundle bundle= Platform.getBundle(JavaPlugin.getPluginId());\n\t\tURL styleSheetURL= bundle.getEntry(\"/JavadocHoverStyleSheet.css\"); //$NON-NLS-1$\n\t\tif (styleSheetURL != null) {\n\t\t\tBufferedReader reader= null;\n\t\t\ttry {\n\t\t\t\treader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));\n\t\t\t\tStringBuffer buffer= new StringBuffer(1500);\n\t\t\t\tString line= reader.readLine();\n\t\t\t\twhile (line != null) {\n\t\t\t\t\tbuffer.append(line);\n\t\t\t\t\tbuffer.append('\\n');\n\t\t\t\t\tline= reader.readLine();\n\t\t\t\t}\n\t\t\t\treturn buffer.toString();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tJavaPlugin.log(ex);\n\t\t\t\treturn \"\"; //$NON-NLS-1$\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null)\n\t\t\t\t\t\treader.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void init()\n\t{\n\t\tResourceReference css = getCSS();\n\t\tif (css != null)\n\t\t{\n\t\t\tadd(HeaderContributor.forCss(css.getScope(), css.getName()));\n\t\t}\n\t}", "public static void processCSS(File file) throws Exception {\n BufferedReader in = new BufferedReader(new FileReader(file));\n Vector<String> vLines = new Vector<String>();\n String line;\n int init, end;\n\n while ((line = in.readLine()) != null) {\n if ((init = line.indexOf(\"/*~RTL \")) != -1) {\n end = line.indexOf(\"*/\");\n if (end == -1)\n end = line.length();\n vLines.add(line.substring(init + 7, end) + \"\\n\");\n } else {\n vLines.add(line + \"\\n\");\n }\n }\n in.close();\n\n BufferedWriter out = new BufferedWriter(new FileWriter(file));\n for (String lineToWrite : vLines) {\n out.write(lineToWrite);\n }\n out.close();\n }", "private void loadStyles() {\n ShowcaseResources.INSTANCE.showcaseCss().ensureInjected();\n RoundedCornersResource.INSTANCE.roundCornersCss().ensureInjected();\n }", "public static String getCSS()\n {\n \treturn \"table.relations \"+\n\t\t \"{ \" +\n\t\t\t\" margin: 1em 1em 1em 2em;\" +\n\t\t\t\" border-collapse: collapse;\" +\n\t\t\t\" width:90%;\" +\n\t\t \"}\" +\n\t\t\"table.relations td\" + \n\t\t\"{\" +\n\t\t\" border-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tbackground: #fff;\" +\n\t\t\"\tpadding: 6px 6px 6px 12px;\" +\n\t\t\"\tcolor: #6D929B;\" +\n\t\t\"}\" +\n\t\t\"table.relations th\" + \n\t\t\"{\" +\n\t\t\"\tfont: bold 10px \\\"Trebuchet MS\\\", Verdana, Arial, Helvetica,\" +\n\t\t\"\tsans-serif;\" +\n\t\t\"\tcolor: #003399;\" +\n\t\t\"\tborder-right: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-left: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-bottom: 1px solid #C1DAD7;\" +\n\t\t\"\tborder-top: 1px solid #C1DAD7;\" +\n\t\t\"\tletter-spacing: 2px;\" +\n\t\t\"\ttext-transform: uppercase;\" +\n\t\t\"\ttext-align: left;\" +\n\t\t\"\tpadding: 3px 3px 3px 6px;\" +\n\t\t\"\tbackground: #B0C4DE;\" +\n\t\t\"}\";\n }", "String getCssFilter();", "public static void createCSSJava(Website websiteInfo){\n if(websiteInfo.javFol)\n {\n File newFolder = new File(websiteInfo.currentPath + \"/js\");\n boolean folderTest = newFolder.mkdir();\n\n if (folderTest) {\n System.out.println(websiteInfo.successMessage + websiteInfo.name + \"/js\");\n } else {\n System.out.println(\"Could not create folder\");\n }\n }\n if(websiteInfo.cssFol)\n {\n File newFolder = new File(websiteInfo.currentPath + \"/CSS\");\n boolean folderTest = newFolder.mkdir();\n\n if (folderTest) {\n System.out.println(\"Created ./website/\" + websiteInfo.name + \"/CSS\");\n } else {\n System.out.println(\"Could not create folder\");\n }\n }\n }", "@Override\n public String getCSSStyle() {\n return null;\n }", "public void loadNightModeHtml(String css, String body){\n mWebView.loadDataWithBaseURL(null, getNightModeHtmlWithCss(css, body), \"text/html; charset=UTF-8\", \"utf-8\", null);\n }", "public void setCurrentcss(String currentcss) {\n this.currentcss = currentcss;\n }", "private void setCss(String cssFile) {\n _scene.getStylesheets().clear();\n _scene.getStylesheets().add(getClass().getResource(cssFile).toExternalForm());\n }", "private String retrieveCssData(String urlStr) throws MalformedURLException,\r\n\t\t\tIOException {\r\n\t\t// retrieve the image from the webpage and put it in\r\n\t\t// HashMap\r\n\t\tURL url = new URL(urlStr);\r\n\t\tBufferedReader cssData = new BufferedReader(new InputStreamReader(url\r\n\t\t\t\t.openConnection().getInputStream()));\r\n\t\tString cssStr = \"\";\r\n\t\tString tempStr;\r\n\t\twhile ((tempStr = cssData.readLine()) != null) {\r\n\t\t\tcssStr += (tempStr + \"\\n\");\r\n\t\t}\r\n\t\tcssData.close();\r\n\t\treturn cssStr;\r\n\t}", "public String toCSS(){\n return new StringBuilder()\n .append(\"display:\")\n .append(this.toString().replace(\"_\", \"-\"))\n .append(\";\").toString();\n }", "private void LoadContent() {\n\t\ttry { // Récupération de la police d'écriture\n\t\t\tfont1 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/Coalition.ttf\"));\n\t\t\tfont2 = Font.createFont(Font.TRUETYPE_FONT, new File(\"res/polices/13_Misa.ttf\"));\n\t\t} catch (final Exception err) {\n\t\t\tSystem.err.println(\"Police(s) d'écriture introuvable(s) !\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public interface Style extends CssResource {\n\n /**\n * The style for the panel that contains\n * the whole user record\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecord();\n\n /**\n * The style for the name of the user\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String nameLabel();\n\n /**\n * The style for the username of the user\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabel();\n\n /**\n * The style for the user avatar image\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImage();\n\n /**\n * The style for the remove image\n *\n * @author Johannes Gryffenberg <johannes.gryffenberg@gmail.com>\n * @since 26 Feb 2013\n *\n * @return The name of the compiled style\n */\n String removeImageStyle();\n\n /**\n * The style for the user record when it is selected\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String searchBoxUserRecordSelected();\n\n /**\n * The style for the username when the record is selected\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String usernameLabelSelected();\n\n /**\n * The style for the avatar when the record is selected\n *\n * @author Ruan Naude <nauderuan777@gmail.com>\n * @since 22 Jan 2013\n *\n * @return The name of the compiled style\n */\n String avatarImageSelected();\n }", "private void initCodeStyling() {\n\t\tboolean codeStyling = Boolean.valueOf(preferences.getProperty(\"codeStyling.enable\")).booleanValue();\n\t\tHashMap<String, Color> colorsMap = new HashMap<String, Color>();\n\t\tVector<String> keywords = null;\n\n\t\t// perform this only if code styling syntax coloring is enabled\n\t\tif (codeStyling) {\n\t\t\tint r = 0, g = 0, b = 0;\n\n\t\t\t// load colors from preferences file and store them in the\n\t\t\t// colors map\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"normal.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"normal.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"normal.color.b\"));\n\t\t\tcolorsMap.put(\"normalColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"numbers.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"numbers.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"numbers.color.b\"));\n\t\t\tcolorsMap.put(\"numbersColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"string.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"string.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"string.color.b\"));\n\t\t\tcolorsMap.put(\"stringColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"keywords.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"keywords.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"keywords.color.b\"));\n\t\t\tcolorsMap.put(\"keywordsColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"comments.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"comments.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"comments.color.b\"));\n\t\t\tcolorsMap.put(\"commentsColor\", new Color(r, g, b));\n\t\t\tr = Integer.parseInt(preferences.getProperty(\"braceMatching.color.r\"));\n\t\t\tg = Integer.parseInt(preferences.getProperty(\"braceMatching.color.g\"));\n\t\t\tb = Integer.parseInt(preferences.getProperty(\"braceMatching.color.b\"));\n\t\t\tcolorsMap.put(\"braceMatchingColor\", new Color(r, g, b));\n\n\t\t\t// keywords are specified in the preferences file as comma\n\t\t\t// separated, so after getting them from the preferences file\n\t\t\t// the property is tokenized and added to a keywords vector\n\t\t\tkeywords = new Vector<String>();\n\t\t\tStringTokenizer tokenizer = new StringTokenizer(preferences.getProperty(\"keywords\"), \";\");\n\t\t\twhile (tokenizer.hasMoreTokens())\n\t\t\t\tkeywords.addElement(tokenizer.nextToken());\n\n\t\t\tcodeDocument = new CodeDocument(codeStyling, colorsMap, keywords);\n\t\t\ttextPane.setDocument(codeDocument);\n\t\t}\n\t}", "String getMobileCSSFile() throws FndException\n {\n return configfile.mobilecssfile;\n }", "public void testW3C() \n throws FileNotFoundException, ParseException\n {\n String str_file = str_Directory + \"/\" + \"w3c-css1-test.css\";\n Parser parser = new Parser(new java.io.FileInputStream(str_file));\n\n parser.setHandler(this);\n parser.Parse();\n }", "@Override\n protected String getStyle() {\n return App.getInstance().getThemeCssFileName();\n\n }", "public void styleFinder() {\n switch (style) {\n case BLACK_TANK -> styleImage = BLACK_TANK_IMAGE;\n case SAND_TANK -> styleImage = SAND_TANK_IMAGE;\n case RED_TANK -> styleImage = RED_TANK_IMAGE;\n case BLUE_TANK -> styleImage = BLUE_TANK_IMAGE;\n case GREEN_TANK -> styleImage = GREEN_TANK_IMAGE;\n case BLACK_INVINCIBLE_TANK -> styleImage = BLACK_INVINCIBLE_TANK_IMAGE;\n case SAND_INVINCIBLE_TANK -> styleImage = SAND_INVINCIBLE_TANK_IMAGE;\n case RED_INVINCIBLE_TANK -> styleImage = RED_INVINCIBLE_TANK_IMAGE;\n case BLUE_INVINCIBLE_TANK -> styleImage = BLUE_INVINCIBLE_TANK_IMAGE;\n case GREEN_INVINCIBLE_TANK -> styleImage = GREEN_INVINCIBLE_TANK_IMAGE;\n }\n }", "public static String getCssString(XMLDataObject xml) {\n\n //Style string\n StringBuilder styleString = new StringBuilder();\n\n //Get the list of properties\n List<XMLDataObject> objects = xml.getList(\"property\");\n\n //Loop through properties to get the style\n for (XMLDataObject object : objects) {\n\n String value = object.getTextContent();\n String name = object.getString(\"@name\");\n\n if (STYLE_TO_CSS.containsKey(name)) {\n name = STYLE_TO_CSS.get(name);\n styleString.append(name).append(\":\").append(value).append(\";\");\n }\n }\n\n String css = styleString.toString();\n return (css.length() == 0) ? null : css;\n }", "@Test \n public void CSSParserTest() throws Exception{\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n String cssString = \"\";\n try {\n BufferedReader in = new BufferedReader(\n new FileReader(\n \"./test-file/testFile.txt\"));\n String line;\n while ((line = in.readLine()) != null) {\n cssString += line;\n cssString += \"\\n\";\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n \n /**\n * Setup\n * \n * Create a file \n * Create a cssString\n */\n Document doc = new Document();\n {\n Element html = doc.createElement(\"html\");\n Element head = doc.createElement(\"head\");\n Element body = doc.createElement(\"body\");\n Node text = doc.createTextNode(\"test message\");\n html.appendChild(head);\n html.appendChild(body);\n body.appendChild(text);\n doc.appendChild(html);\n }\n /**Get doc from UIParser result whether is not null \n * \n */\n assertNotNull(doc.documentElement());\n \n /**Setting doc Style from CSSParser\n * \n */\n CSSParser CSSParser = new CSSParser();\n CSSParser.parser(cssString, doc); \n \n Element html = doc.documentElement(); \n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Use html getStyle that it is not null\n * \n */\n Style style = html.getStyle();\n assertNotNull(style);\n \n /** Test whether the background is black\n * \n */\n assertEquals(\"background should be black\", \"black\", style.getProperty(\"background\"));\n \n /** Test whether the width is correct\n * \n */\n assertEquals(\"width should be 100\", \"100px\", style.getProperty(\"width\"));\n \n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n assertEquals(\"first child of <html> should be <head>\", \"head\", list.item(0).nodeName());\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName());\n \n /**Get Style from element getStyle whether it is null or not\n * \n */\n Element bodyElement = (Element) body;\n Style bodyStyle = bodyElement.getStyle();\n assertNotNull(bodyStyle);\n \n /** Test whether the margin-top is correct\n * \n */\n assertEquals(\"margin-top should be 10px\", \"10px\", bodyStyle.getProperty(\"margin-top\"));\n \n /** Test whether the text-color is correct\n * \n */\n assertEquals(\"text-color should be blue\", \"blue\", bodyStyle.getProperty(\"text-color\"));\n }", "static void init() {\n ReplaceRule.define(\"endcomment\",\r\n new Regex(\"\\\\*/\",\"*/${POP}</font>\"));\r\n Comment3 = (new Regex(\"/\\\\*\",\"<font color=\"+\r\n CommentColor+\">/*${+endcomment}\"));\r\n\r\n // Jasmine stuff\r\n Regex.define(\"JasmineEnabled\",\"\",new Validator() {\r\n public int validate(String src,int begin,int end) {\r\n return jasmine_enabled ? end : -1;\r\n }\r\n });\r\n colorize.add(\r\n \"s{(??JasmineEnabled)^\\\\s*;\\\\s*&gt;&gt;.*}\"+\r\n \"{<HR><H3>$&</H3>}\");\r\n colorize.add(\r\n \"s{(??JasmineEnabled)(?:^|\\\\s)\\\\s*;.*}\"+\r\n \"{<font color=\"+CommentColor+\">$&</font>}\");\r\n colorize.add(\r\n \"s{(??JasmineEnabled)\\\\b(?:catch|class|end|field|\"+\r\n \"implements|interface|limit|line|method|source|super|\"+\r\n \"throws|var|stack|locals)\\\\b}{<font color=\"+\r\n DirectiveColor+\"><b>$&</b></font>}\");\r\n colorize.add(\r\n \"s{(??JasmineEnabled)^\\\\w+:}{<font color=\"+\r\n LabelColor+\"><b>$&</b></font>}\");\r\n\r\n // stick all replacement rules into the Transformer\r\n colorize.add(DQuotes);\r\n colorize.add(SQuotes);\r\n colorize.add(Comment1);\r\n colorize.add(Comment2);\r\n colorize.add(Comment3);\r\n colorize.add(PrimitiveTypes);\r\n colorize.add(Keywords);\r\n colorize.add(java_lang);\r\n colorize.add(oper);\r\n colorize.add(Regex.perlCode(\r\n \"s'\\\\w*(Error|Exception|Throwable)\\\\b'<font color=red>$&</font>'\"));\r\n\r\n ReplaceRule.define(\"colorize\",colorize);\r\n\r\n ReplaceRule.define(\"jascode\",new ReplaceRule() {\r\n public void apply(StringBufferLike sb,RegRes rr) {\r\n String s1 = rr.stringMatched(1);\r\n if(s1 != null && s1.equals(\"jas\"))\r\n jasmine_enabled = true;\r\n }\r\n });\r\n\r\n Regex r = new Regex(\"(?i)<(java|jas)code([^>]*?)>\\\\s*\",\r\n \"<!-- made by java2html, \"+\r\n \"see http://javaregex.com -->\"+\r\n \"<table $2 ><tr><td bgcolor=\"+\r\n DocumentBackgroundColor+\r\n \"><pre>${jascode}${+colorize}\");\r\n r.optimize();\r\n\r\n colorize.add(new Regex(\"(?i)\\\\s*</(?:java|jas)code>\",\r\n \"</pre></td></tr></table>${POP}\"));\r\n\r\n html_replacer = r.getReplacer();\r\n\r\n Transformer DoPre = new Transformer(true);\r\n DoPre.add(\"s'(?i)\\\\s*</(?:jav|jas)acode>'$&$POP'\");\r\n DoPre.add(\"s'<'&lt;'\");\r\n DoPre.add(\"s'>'&gt;'\");\r\n DoPre.add(\"s'&'&amp;'\");\r\n ReplaceRule.define(\"DOPRE\",DoPre);\r\n pretran_html = new Regex(\"(?i)<javacode[^>]*>\",\"$&${+DOPRE}\").getReplacer();\r\n pretran_java = DoPre.getReplacer();\r\n }", "public String toString() {\n \t\treturn getCssText();\n \t}", "public interface Css extends CssResource {\n String button();\n }", "private static String processCss(String input, URL baseUrl) {\n \n \t\t//StringBuffer sb = new StringBuffer(input.length());\n \t\tStringBuffer sb = new StringBuffer();\n \t\t\n \t\t// (url\\s{0,}\\(\\s{0,}['\"]{0,1})([^\\)'\"]*)(['\"]{0,1}\\))\n \t\tString regex = \"(url\\\\s{0,}\\\\(\\\\s{0,}['\\\"]{0,1})([^\\\\'\\\")]*)(['\\\"]{0,1}\\\\))\";\n \t\t// input.replaceAll(regex, \"$1\"+\"URL\"+\"$2$3\");\n \t\t// return input;\n \t\tPattern p = Pattern.compile(regex, Pattern.DOTALL);\n \t\tMatcher m = p.matcher(input);\n \t\twhile(m.find()) {\n \t\t\ttry {\n \t\t\t\tURL url;\n \t\t\t\tif(m.group(2).startsWith(\"http\")) {\n \t\t\t\t\turl = new URL(m.group(2)); \n \t\t\t\t} else if(m.group(2).startsWith(\"data:\")) {\n \t\t\t\t\turl = null;\n \t\t\t\t} else {\n \t\t\t\t\turl = new URL(baseUrl, m.group(2));\n \t\t\t\t}\n \t\t\t\tif(url != null) {\n \t\t\t\t\tLogger.warn(m.group() + \" => \" + url.toString());\n \t\t\t\t\ttry {\n \t\t\t\t\t\tString b64 = toBase64(url);\n \t\t\t\t\t\tm.appendReplacement(sb, Matcher.quoteReplacement(m.group(1)+b64+m.group(3)));\n \t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\tLogger.error(e.toString());\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t} catch (MalformedURLException e) {\n \t\t\t\tLogger.error(e.toString());\n \t\t\t}\n \t\t}\n \t\tm.appendTail(sb);\n \t\treturn sb.toString();\n \t}", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "@Override public String getUserAgentStylesheet() {\r\n return getClass().getResource(\"switch.css\").toExternalForm();\r\n }", "private void deleteStylesheet() {\n\n// find start of the section\nString str = strBuf.toString();\nfinal int start = str.indexOf( SEC_START );\n\nif ( start == -1 ) {\n// section not contained, so just return ...\nreturn;\n}\n\n// find end of section\nfinal int end = str.indexOf( SEC_END, start );\n\n// delete section\nstrBuf.delete( start, end + 2 );\n}", "void commonConstruction () {\n\n if (inFile != null) {\n dataParent = inFile.getParent();\n }\n if (inURL != null) {\n dataParent = \"www\";\n }\n context = new HTMLContext();\n context.setFile(this);\n context.entityTranslation = false;\n\t\thtmlChar = new HTMLCharacter (context);\n }", "@Override\n\tprotected NSArray<String> additionalCSSFiles() {\n\t\treturn new NSMutableArray<String>( new String[] { \"modalbox.css\" } );\n\t}", "public static void setCSSLink(VpePageContext pageContext, String cssHref, String ext) {\r\n String pluginPath = RichFacesTemplatesActivator.getPluginResourcePath();\r\n IPath pluginFile = new Path(pluginPath);\r\n File cssFile = pluginFile.append(cssHref).toFile();\r\n if (cssFile.exists()) {\r\n String cssPath = \"file:///\" + cssFile.getPath().replace('\\\\', '/'); //$NON-NLS-1$\r\n pageContext.getVisualBuilder().replaceLinkNodeToHead(cssPath, ext, true);\r\n }\r\n }", "@Override\n protected String doTransform(final String cssContent, final List<Resource> foundImports)\n throws IOException {\n return \"\";\n }", "private static StyleBuilder getHeaderStyle(ExportData metaData){\n \n /*pour la police des entàtes de HARVESTING*/\n if(metaData.getTitle().equals(ITitle.HARVESTING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de SERVICING*/\n if(metaData.getTitle().equals(ITitle.SERVICING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de FERTILIZATION*/\n if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de CONTROL_PHYTO*/\n if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }else{\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n }\n \n }", "public static String getColorsV()\n {\n Container v = new Container();\n //mal uso del try/catch con streams\n try\n {\n Stream<String> stream = Files.lines( Paths.get( PATHROOT, \"colors2.txt\" ) );\n stream.forEach( x -> v.c = x );\n }\n catch ( Exception e )\n {\n }\n return v.c;\n }", "private void updateHTML(UIDL uidl, Client client) {\n \t\tString newStyle = uidl.getStringAttribute(\"style\");\n \t\tif (currentStyle != null && currentStyle.equals(newStyle))\n \t\t\treturn;\n \n \t\tString template = client.getResource(\"layout/\" + newStyle + \".html\");\n \t\tif (template == null) {\n \t\t\ttemplate = \"Layout \" + newStyle + \" is missing\";\n \t\t} else {\n \t\t\tcurrentStyle = newStyle;\n \t\t}\n \t\ttemplate = extractBodyAndScriptsFromTemplate(template);\n \t\thtml = new HTMLPanel(template);\n \t\taddUniqueIdsForLocations(html.getElement(), locationPrefix);\n \n \t\tWidget parent = getParent();\n \t\twhile (parent != null && !(parent instanceof IWindow))\n \t\t\tparent = parent.getParent();\n \t\tif (parent != null && ((IWindow) parent).getTheme() != null)\n \t\t\t;\n \t\tprefixImgSrcs(html.getElement(), \"../theme/\"\n \t\t\t\t+ ((IWindow) parent).getTheme() + \"/layout/\");\n \t\tadd(html);\n \t}", "public String createCSSFolder(String websiteName){\n directory = path + websiteName + \"/css\";\n return directory;\n }", "void HTMLtoANSI()\r\n\t{\r\n\t\tfinal String[] extended_ansi_html = {\"&trade;\", \"&#8209;\", \"&#2;\",\r\n\t\t\t\t\"&#3;\", \"&#4;\", \"&#5;\", \"&#6;\", \"&#16;\", \"&#17;\", \"&#18;\",\r\n\t\t\t\t\"&#19;\", \"&#20;\", \"&#21;\", \"&#25;\", \"&nbsp;\", \"&iexcl;\",\r\n\t\t\t\t\"&cent;\", \"&pound;\", \"&curren;\", \"&yen;\", \"&brvbar;\", \"&sect;\",\r\n\t\t\t\t\"&uml;\", \"&copy;\", \"&ordf;\", \"&laquo;\", \"&not;\", \"&shy;\",\r\n\t\t\t\t\"&reg;\", \"&macr;\", \"&deg;\", \"&plusmn;\", \"&sup2;\", \"&sup3;\",\r\n\t\t\t\t\"&acute;\", \"&micro;\", \"&para;\", \"&middot;\", \"&cedil;\",\r\n\t\t\t\t\"&sup1;\", \"&ordm;\", \"&raquo;\", \"&frac14;\", \"&frac12;\",\r\n\t\t\t\t\"&frac34;\", \"&iquest;\", \"&Agrave;\", \"&Aacute;\", \"&Acirc;\",\r\n\t\t\t\t\"&Atilde;\", \"&Auml;\", \"&Aring;\", \"&AElig;\", \"&Ccedil;\",\r\n\t\t\t\t\"&Egrave;\", \"&Eacute;\", \"&Ecirc;\", \"&Euml;\", \"&Igrave;\",\r\n\t\t\t\t\"&Iacute;\", \"&Icirc;\", \"&Iuml;\", \"&ETH;\", \"&Ntilde;\",\r\n\t\t\t\t\"&Ograve;\", \"&Oacute;\", \"&Ocirc;\", \"&Otilde;\", \"&Ouml;\",\r\n\t\t\t\t\"&times;\", \"&Oslash;\", \"&Ugrave;\", \"&Uacute;\", \"&Ucirc;\",\r\n\t\t\t\t\"&Uuml;\", \"&Yacute;\", \"&THORN;\", \"&szlig;\", \"&agrave;\",\r\n\t\t\t\t\"&aacute;\", \"&acirc;\", \"&atilde;\", \"&auml;\", \"&aring;\",\r\n\t\t\t\t\"&aelig;\", \"&ccedil;\", \"&egrave;\", \"&eacute;\", \"&ecirc;\",\r\n\t\t\t\t\"&euml;\", \"&igrave;\", \"&iacute;\", \"&icirc;\", \"&iuml;\", \"&eth;\",\r\n\t\t\t\t\"&ntilde;\", \"&ograve;\", \"&oacute;\", \"&ocirc;\", \"&otilde;\",\r\n\t\t\t\t\"&ouml;\", \"&divide;\", \"&oslash;\", \"&ugrave;\", \"&uacute;\",\r\n\t\t\t\t\"&ucirc;\", \"&uuml;\", \"&yacute;\", \"&thorn;\", \"&yuml;\"};\r\n\t\tfinal String[] extended_ansi = {\"\\u0099\", \"\\u2011\", \"\\u0002\", \"\\u0003\",\r\n\t\t\t\t\"\\u0004\", \"\\u0005\", \"\\u0006\", \"\\u0010\", \"\\u0011\", \"\\u0012\",\r\n\t\t\t\t\"\\u0013\", \"\\u0014\", \"\\u0015\", \"\\u0019\", \"\\u00A0\", \"\\u00A1\",\r\n\t\t\t\t\"\\u00A2\", \"\\u00A3\", \"\\u00A4\", \"\\u00A5\", \"\\u00A6\", \"\\u00A7\",\r\n\t\t\t\t\"\\u00A8\", \"\\u00A9\", \"\\u00AA\", \"\\u00AB\", \"\\u00AC\", \"\\u00AD\",\r\n\t\t\t\t\"\\u00AE\", \"\\u00AF\", \"\\u00B0\", \"\\u00B1\", \"\\u00B2\", \"\\u00B3\",\r\n\t\t\t\t\"\\u00B4\", \"\\u00B5\", \"\\u00B6\", \"\\u00B7\", \"\\u00B8\", \"\\u00B9\",\r\n\t\t\t\t\"\\u00BA\", \"\\u00BB\", \"\\u00BC\", \"\\u00BD\", \"\\u00BE\", \"\\u00BF\",\r\n\t\t\t\t\"\\u00C0\", \"\\u00C1\", \"\\u00C2\", \"\\u00C3\", \"\\u00C4\", \"\\u00C5\",\r\n\t\t\t\t\"\\u00C6\", \"\\u00C7\", \"\\u00C8\", \"\\u00C9\", \"\\u00CA\", \"\\u00CB\",\r\n\t\t\t\t\"\\u00CC\", \"\\u00CD\", \"\\u00CE\", \"\\u00CF\", \"\\u00D0\", \"\\u00D1\",\r\n\t\t\t\t\"\\u00D2\", \"\\u00D3\", \"\\u00D4\", \"\\u00D5\", \"\\u00D6\", \"\\u00D7\",\r\n\t\t\t\t\"\\u00D8\", \"\\u00D9\", \"\\u00DA\", \"\\u00DB\", \"\\u00DC\", \"\\u00DD\",\r\n\t\t\t\t\"\\u00DE\", \"\\u00DF\", \"\\u00E0\", \"\\u00E1\", \"\\u00E2\", \"\\u00E3\",\r\n\t\t\t\t\"\\u00E4\", \"\\u00E5\", \"\\u00E6\", \"\\u00E7\", \"\\u00E8\", \"\\u00E9\",\r\n\t\t\t\t\"\\u00EA\", \"\\u00EB\", \"\\u00EC\", \"\\u00ED\", \"\\u00EE\", \"\\u00EF\",\r\n\t\t\t\t\"\\u00F0\", \"\\u00F1\", \"\\u00F2\", \"\\u00F3\", \"\\u00F4\", \"\\u00F5\",\r\n\t\t\t\t\"\\u00F6\", \"\\u00F7\", \"\\u00F8\", \"\\u00F9\", \"\\u00FA\", \"\\u00FB\",\r\n\t\t\t\t\"\\u00FC\", \"\\u00FD\", \"\\u00FE\", \"\\u00FF\"};\r\n\r\n\t\tstr = replaceString(str, extended_ansi_html, extended_ansi);\r\n\t}", "public void ardublockStyling(Document doc) {\n\t\tif (styleList != null) {\n\t\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\t\tfor (String[] style : styleList) {\n\t\t\t\tXPath xpath = factory.newXPath();\n\t\t\t\ttry {\n\t\t\t\t\t// XPathExpression expr = xpath.compile(\"//BlockGenus[@name[starts-with(.,\\\"Tinker\\\")]]/@color\");\n\t\t\t\t\tXPathExpression expr = xpath.compile(style[0]);\n\t\t\t\t\tNodeList bgs = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);\n\t\t\t\t\tfor (int i = 0; i < bgs.getLength(); i++) {\n\t\t\t\t\t\tNode bg = bgs.item(i);\n\t\t\t\t\t\tbg.setNodeValue(style[1]);\n\t\t\t\t\t\t// bg.setAttribute(\"color\", \"128 0 0\");\n\t\t\t\t\t}\n\t\t\t\t} catch (XPathExpressionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "StyleSheet createStyleSheet();", "private DefaultHTMLs(String contents){\r\n\t\tthis.contents = contents;\r\n\t}", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "public static native String generateStyle(StyleConfig config) /*-{\r\n\t\tvar configJS = config.@com.ait.toolkit.core.client.JsObject::getJsObj()();\r\n\t\treturn $wnd.Ext.DomHelper.generateStyle(configJS);\r\n\t}-*/;", "public void updateGrepStyle()\n\t{\n\t\tgrepStyle.setName(textName.getText());\n\t\tgrepStyle.setBold(cbBold.getSelection());\n\t\tgrepStyle.setItalic(cbItalic.getSelection());\n\t\tgrepStyle.setForeground(cpForeground.getEffectiveColor());\n\t\tgrepStyle.setBackground(cpBackground.getEffectiveColor());\n\t\tgrepStyle.setUnderline(cpUnderline.isChecked());\n\t\tgrepStyle.setUnderlineColor(cpUnderline.getColor()); \n\t\tgrepStyle.setStrikeout(cpStrikethrough.isChecked());\n\t\tgrepStyle.setStrikeoutColor(cpStrikethrough.getColor());\n\t\tgrepStyle.setBorder(cpBorder.isChecked());\n\t\tgrepStyle.setBorderColor(cpBorder.getColor());\n\t}", "private String getHtmlWithInjectedAttributes(String html) {\n StringBuilder jsAttributes = new StringBuilder();\n jsAttributes.append(getHtmlAttr(OPTION_ASYNC, async));\n jsAttributes.append(getHtmlAttr(OPTION_DEFER, defer));\n jsAttributes.append(getHtmlAttr(OPTION_CROSSORIGIN, crossorigin));\n jsAttributes.append(getHtmlAttr(OPTION_ONLOAD, onload));\n StringBuilder cssAttributes = new StringBuilder();\n cssAttributes.append(getHtmlAttr(OPTION_MEDIA, media));\n String updatedHtml = StringUtils.replace(html,\"<script \", \"<script \" + jsAttributes.toString());\n return StringUtils.replace(updatedHtml,\"<link \", \"<link \" + cssAttributes.toString());\n }", "STYLE createSTYLE();", "public static String processFile( File htmlFile ) throws IOException, CSSException {\n\t\tStylesheetApplier applier = initFromFile( htmlFile );\n\t\tapplier.apply();\n\t\treturn applier.prettyPrintDocument();\n\t}", "protected void init() {\r\n\t\tgetPage().addWgtCSS(\"standard/jquery-ui.css\");\r\n\t\tgetPage().addWgtCSS(\"standard/ui.jqgrid.css\");\r\n\t\tgetPage().addControllerJS( JSResourceProcessor.GRID_JS );\r\n\t}", "public CSGStyle(AppTemplate initApp) {\r\n // KEEP THIS FOR LATER\r\n app = initApp;\r\n\r\n // LET'S USE THE DEFAULT STYLESHEET SETUP\r\n super.initStylesheet(app);\r\n\r\n // INIT THE STYLE FOR THE FILE TOOLBAR\r\n app.getGUI().initFileToolbarStyle();\r\n\r\n // AND NOW OUR WORKSPACE STYLE\r\n initTAWorkspaceStyle();\r\n }", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "public HTMLLinkElement getElementElcss() { return this.$element_Elcss; }", "public void themesa()\n {\n \n \n \n \n }", "public abstract String getStyle();", "void putStylesheet(String key, Templates stylesheet);", "public String printSCSS() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(AmexioLicense.COPYRIGHT_SMALL);\n\t\tif(config != null) {\n\t\t\tsb.append(NL);\n\t\t\tsb.append(\"/**\").append(NL);\n\t\t\tsb.append(\" Theme Details -------------------------------------------------------- \").append(NL);\n\t\t\tsb.append(\" Theme Name : \").append(config.getThemeName()).append(NL);\n\t\t\tsb.append(\" Theme Version : \").append(config.getVersion()).append(NL);\n\t\t\tsb.append(\" Design Type : \").append(config.designType()).append(NL);\n\t\t\tsb.append(\" Author : This theme is fully autogenerated by Amexio Colors.\").append(NL);\n\t\t\tsb.append(\"*/\").append(NL).append(NL);\n\t\t}\n\t\t// sb.append(\"$isAmexio: false;\").append(NL);\n\t\tsb.append(\"$appTransparency : rgba(0,0,0,0.87);\").append(NL);\n\t\tsb.append(themeColor.printSCSS());\n\t\tsb.append(appColor.printSCSS());\n\t\tsb.append(compColor.printSCSS());\n\t\tsb.append(AmexioLicense.AMEXIO_SUPPORT);\n\t\treturn sb.toString();\n\t}", "@Override\n public StyleSheet getCSSStyleSheet() {\n if (styleSheet == null) {\n if (getType().equals(WebXConstants.CSS_MIME_TYPE)) {\n WebXDocumentImpl doc = (WebXDocumentImpl) getOwnerDocument();\n CSSEngine e = doc.getCSSEngine();\n String text = \"\";\n Node n = getFirstChild();\n if (n != null) {\n StringBuffer sb = new StringBuffer();\n while (n != null) {\n if (n.getNodeType() == Node.CDATA_SECTION_NODE\n || n.getNodeType() == Node.TEXT_NODE)\n sb.append(n.getNodeValue());\n n = n.getNextSibling();\n }\n text = sb.toString();\n }\n ParsedURL burl = null;\n String bu = getBaseURI();\n if (bu != null) {\n burl = new ParsedURL(bu);\n }\n String media = getAttributeNS(null, WEBX_MEDIA_ATTRIBUTE);\n styleSheet = e.parseStyleSheet(text, burl, media);\n addEventListenerNS(XMLConstants.XML_EVENTS_NAMESPACE_URI,\n \"DOMCharacterDataModified\",\n domCharacterDataModifiedListener,\n false,\n null);\n }\n }\n return styleSheet;\n }", "public void makeBreakdownShell(SizeBreakdown breakdown)\n throws IOException {\n \n Map<String, CodeCollection> nameToCodeColl = breakdown.nameToCodeColl;\n Map<String, LiteralsCollection> nameToLitColl = breakdown.nameToLitColl;\n \n // copy from the bin directory to the current directory\n String classPath = GlobalInformation.settings.resources.get();\n if (classPath == null) {\n classPath = System.getProperty(\"java.class.path\");\n }\n if (!classPath.endsWith(\"/\")) {\n classPath += \"/\";\n }\n String inputFileName = \"roundedCorners.css\";\n File inputFile = new File(classPath + inputFileName);\n File outputFile = getOutFile(\"roundedCorners.css\");\n copyFileOrDirectory(inputFile, outputFile, classPath, inputFileName, false);\n \n inputFileName = \"classLevel.css\";\n File inputFile2 = new File(classPath + inputFileName);\n File outputFile2 = getOutFile(\"classLevel.css\");\n copyFileOrDirectory(inputFile2, outputFile2, classPath, inputFileName,\n false);\n \n inputFileName = \"images\";\n File inputDir = new File(classPath + \"images\");\n File outputDir = getOutFile(\"images\");\n copyFileOrDirectory(inputDir, outputDir, classPath, inputFileName, true);\n \n final PrintWriter outFile = new PrintWriter(getOutFile(shellFileName(breakdown)));\n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML//EN\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<title>Story of Your Compile - Top Level Dashboard for Permutation</title>\");\n \n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"roundedCorners.css\\\">\");\n outFile.println(\"<style type=\\\"text/css\\\">\");\n outFile.println(\"body {background-color: #728FCE}\");\n outFile.println(\"h2 {background-color: transparent}\");\n outFile.println(\"p {background-color: fuchsia}\");\n outFile.println(\"</style>\");\n outFile.println(\"</head>\");\n \n outFile.println(\"<body>\");\n outFile.println(\"<center>\");\n outFile.println(\"<h3>Story of Your Compile Dashboard</h3>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n \n outFile.println(\"</center>\");\n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Package breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>Code type breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Package Name</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Code Type</div>\");\n outFile.println(\" </div>\");\n \n String packageBreakdownFileName = makePackageHtml(breakdown);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + packageBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n String codeTypeBreakdownFileName = makeCodeTypeHtml(breakdown,\n nameToCodeColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + codeTypeBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Literals breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>String literals breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Literal Type</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">String Literal Type</div>\");\n outFile.println(\" </div>\");\n \n String literalsBreakdownFileName = makeLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + literalsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\"</div>\");\n \n String stringLiteralsBreakdownFileName = makeStringLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + stringLiteralsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" </body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }", "abstract protected AbstractCSSStyleSheet getUserImportantStyleSheet();", "private void readStyles() {\n table.clearSelection();\n\n styles.getReadWriteLock().writeLock().lock();\n styles.clear();\n if (styleDir.getText().length() > 0) {\n addStyles(styleDir.getText(), true);\n }\n styles.getReadWriteLock().writeLock().unlock();\n\n selectLastUsed();\n }", "@Override\n public void contextInitialized(ServletContextEvent sce) {\n ServletContext sc= sce.getServletContext();\n String sourceB =sc.getInitParameter(\"source\");\n // System.out.println(sourceB);\n Doc docc = new Doc(sourceB);\n sc.setAttribute(\"doccc\", docc);\n \n }", "abstract protected DocumentCSSStyleSheet getDefaultStyleSheet(CSSDocument.ComplianceMode mode);", "@Override\n public void initStyle() {\n\t// NOTE THAT EACH CLASS SHOULD CORRESPOND TO\n\t// A STYLE CLASS SPECIFIED IN THIS APPLICATION'S\n\t// CSS FILE\n \n // FOR CHANGING THE ITEMS INSIDE THE EDIT TOOLBAR\n editToolbarPane.getStyleClass().add(CLASS_EDITTOOLBAR_PANE);\n \n mapNameLabel.getStyleClass().add(CLASS_MAPNAME_LABEL);\n mapName.getStyleClass().add(CLASS_MAPNAME_TEXTFIELD);\n backgroundColorLabel.getStyleClass().add(CLASS_LABEL);\n borderColorLabel.getStyleClass().add(CLASS_LABEL);\n borderThicknessLabel.getStyleClass().add(CLASS_LABEL);\n zoomLabel.getStyleClass().add(CLASS_MAPNAME_LABEL);\n borderThicknessSlider.getStyleClass().add(CLASS_BORDER_SLIDER);\n mapZoomingSlider.getStyleClass().add(CLASS_ZOOM_SLIDER);\n buttonBox.getStyleClass().add(CLASS_PADDING);\n // FIRST THE WORKSPACE PANE\n workspace.getStyleClass().add(CLASS_BORDERED_PANE);\n }", "private void updateDisplayName() {\n String path;\n FileObject webRoot = ProjectWebRootQuery.getWebRoot(styleSheet);\n if(webRoot == null) {\n path = styleSheet.getNameExt();\n } else {\n path = FileUtil.getRelativePath(webRoot, styleSheet);\n }\n setDisplayName(path);\n }", "interface CommonCssResource extends CssResource {\n\n /**\n * Generic container .\n * @return the css class for a generic container\n */\n String genericContainer();\n\n /**\n * @return\n */\n String lassoPanel();\n\n /**\n * @return\n */\n String lassoElement();\n\n /**\n * Generic container padding.\n * @return\n */\n int genericContainerPaddingPx();\n}", "protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }", "public static String get_cell_style_id(){\r\n\t\t_cell_style_id ++;\r\n\t\treturn \"cond_ce\" + _cell_style_id;\r\n\t}", "public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}", "public static void loadStyleSheet()\n {\n StyleManager.getInstance().addUserAgentStylesheet(ResourceLoader.loadComponent(USER_AGENT_STYLESHEET));\n }", "@Source(\"SearchBoxUserRecord.css\")\n Style searchBoxUserRecordStyle();", "private void setBgColor(Color c)\n\t{\n\t\teToPower.setBackground (c);\n\t\ttwoPower.setBackground (c);\n\t\tln.setBackground (c);\n\t\txCube.setBackground (c);\n\t\txSquare.setBackground (c);\n\t\tdel.setBackground (c);\n\t\tcubeRoot.setBackground (c);\n\t\tC.setBackground (c);\n\t\tnegate.setBackground (c);\n\t\tsquareRoot.setBackground (c);\n\t\tnine.setBackground (c);\n\t\teight.setBackground (c);\n\t\tseven.setBackground (c);\n\t\tsix.setBackground (c);\n\t\tfive.setBackground (c);\n\t\tfour.setBackground (c);\n\t\tthree.setBackground (c);\n\t\ttwo.setBackground (c);\n\t\tone.setBackground (c);\n\t\tzero.setBackground (c);\n\t\tdivide.setBackground (c);\n\t\tpercent.setBackground (c);\n\t\tmultiply.setBackground (c);\n\t\treciprocal.setBackground (c);\n\t\tadd.setBackground (c);\n\t\tsubtract.setBackground (c);\n\t\tdecimalPoint.setBackground (c);\n\t\tequals.setBackground (c);\n\t\te.setBackground (c);\n\t\tPI.setBackground (c);\n\t\tentry.setBackground (c);\n\t\t\n\t\tmenuBar.setBackground (c);\n\t\tfileMenu.setBackground (c);\n\t\ttoolsMenu.setBackground (c);\n\t\thelpMenu.setBackground (c);\n\t\t\n\t\texit.setBackground (c);\n\t\tsettings.setBackground (c);\n\t\tabout.setBackground (c);\n\t\treadme.setBackground (c);\n\t}", "abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();", "public void style() {\n\n\t\tfinal ArrayList<String> cssClasses = new ArrayList<>();\n\t\tif (!this.styles.isEmpty()) {\n\t\t\tthis.styles.forEach(s -> {\n\t\t\t\tcssClasses.add(s.getCss());\n\t\t\t});\n\t\t}\n\n\t\t// replace the cell styles with the new set\n\t\tthis.add(AttributeModifier.replace(\"class\", StringUtils.join(cssClasses, \" \")));\n\t}", "public String _buildtheme() throws Exception{\n_theme.Initialize(\"pagetheme\");\r\n //BA.debugLineNum = 91;BA.debugLine=\"theme.AddABMTheme(ABMShared.MyTheme)\";\r\n_theme.AddABMTheme(_abmshared._mytheme);\r\n //BA.debugLineNum = 94;BA.debugLine=\"theme.AddLabelTheme(\\\"lightblue\\\")\";\r\n_theme.AddLabelTheme(\"lightblue\");\r\n //BA.debugLineNum = 95;BA.debugLine=\"theme.Label(\\\"lightblue\\\").ForeColor = ABM.COLOR_LI\";\r\n_theme.Label(\"lightblue\").ForeColor = _abm.COLOR_LIGHTBLUE;\r\n //BA.debugLineNum = 96;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}", "String getSkinCssPath(DynamicSkinInstanceData data);", "public abstract TC createStyle();", "public String introduction_list_div_rule() {\n \treturn Tool_File.assemble_rule(files_direction+\"introduction_list_div_rule\");\n }", "private void setWebContent() {\r\n\t\tsetDataContent();\r\n\t\twebContent.addComponent(new Label(\"Concesionario\"));\r\n\t\twebContent.addComponent(dataContent);\r\n\t}", "public void install ( JTextComponent c )\n {\n super.install(c);\n\n bg = Color.WHITE;\n /*\n // Курсор перестает быть видимым\n try\n {\n Document doc = c.getDocument();\n if (doc instanceof StyledDocument )\n {\n StyledDocument sDoc = (StyledDocument)doc;\n Element elem = sDoc.getCharacterElement( 0 );\n AttributeSet attr = elem.getAttributes();\n bg = sDoc.getBackground(attr);\n }\n\n if (bg == null) {\n bg = c.getBackground();\n }\n\n } catch ( Exception e ) {\n Log.l.error ( \"TextCaret Error. JTextComponent = \"+c, e );\n bg = Color.WHITE;\n }\n //*/\n }", "public void Themes31()\n {\n theme3= new Label(\"Theme\");\n theme3.setPrefWidth(150);\n theme3.setFont(new Font(13));\n theme3.setPrefHeight(40);\n theme3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma3 = new Label(\"Dikoma\");\n dikoma3.setFont(new Font(13));\n dikoma3.setPrefWidth(150);\n dikoma3.setPrefHeight(40);\n dikoma3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo3 = new Label(\"Diagelo\");\n diagelo3.setFont(new Font(13));\n diagelo3.setPrefWidth(150);\n diagelo3.setPrefHeight(40);\n diagelo3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse3 = new Label(\"Woman & children abuse\");\n abuse3.setPrefWidth(150);\n abuse3.setFont(new Font(13));\n abuse3.setPrefHeight(40);\n abuse3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking3 = new Label(\"Human trafficking\");\n trafficking3.setFont(new Font(13));\n trafficking3.setPrefWidth(150);\n trafficking3.setPrefHeight(40);\n trafficking3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "protected void renderStyleAndStyleClass(\r\n String style, String styleClass, Element root)\r\n {\n }", "public static String getStripCommentsTransformationStylesheetString()\r\n {\r\n return wrapInXSLStylesheet(getStripCommentsTransformationTemplateString());\r\n }", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaMain = new javax.swing.JTextArea();\n jFileChooserSalvar = new javax.swing.JFileChooser();\n jFileChooserOpenHTMLouCSS = new javax.swing.JFileChooser();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenuArquivo = new javax.swing.JMenu();\n jMenuItemAbrir = new javax.swing.JMenuItem();\n jMenuItemSalvarComo = new javax.swing.JMenuItem();\n jMenuCopiar = new javax.swing.JMenuItem();\n jSeparator2 = new javax.swing.JPopupMenu.Separator();\n jMenuItemSair = new javax.swing.JMenuItem();\n jMenuCodigo = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItemHtml5 = new javax.swing.JMenuItem();\n jMenuItemCss = new javax.swing.JMenuItem();\n jMenuFerramentas = new javax.swing.JMenu();\n jMenuItemCriaCor = new javax.swing.JMenuItem();\n jMenuItemTestadorCor = new javax.swing.JMenuItem();\n jMenuItemGeraMeta = new javax.swing.JMenuItem();\n jMenuItemGeraIcon = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenuItemMapeador = new javax.swing.JMenuItem();\n jMenuConfig = new javax.swing.JMenu();\n jMenuItemFonte = new javax.swing.JMenuItem();\n jMenuItemQuebraLinha = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenuItem4 = new javax.swing.JMenuItem();\n jMenuItem5 = new javax.swing.JMenuItem();\n jMenuItem6 = new javax.swing.JMenuItem();\n jMenuSobre = new javax.swing.JMenu();\n jMenuItemOjetivo = new javax.swing.JMenuItem();\n jMenuItemCreditos = new javax.swing.JMenuItem();\n jMenuItemAjuda = new javax.swing.JMenuItem();\n jMenuItemContate = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"JWebAuxiliar\");\n\n jTextAreaMain.setColumns(20);\n jTextAreaMain.setFont(new java.awt.Font(\"Monospaced\", 0, 18));\n jTextAreaMain.setForeground(new java.awt.Color(51, 51, 255));\n jTextAreaMain.setRows(5);\n jScrollPane1.setViewportView(jTextAreaMain);\n\n jScrollPane2.setViewportView(jScrollPane1);\n\n jMenuArquivo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/disc.png\"))); // NOI18N\n jMenuArquivo.setMnemonic('A');\n jMenuArquivo.setText(\"Arquivo\");\n jMenuArquivo.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n\n jMenuItemAbrir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItemAbrir.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemAbrir.setText(\"Abrir\");\n jMenuItemAbrir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemAbrirActionPerformed(evt);\n }\n });\n jMenuArquivo.add(jMenuItemAbrir);\n\n jMenuItemSalvarComo.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItemSalvarComo.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemSalvarComo.setText(\"Salvar Como\");\n jMenuItemSalvarComo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemSalvarComoActionPerformed(evt);\n }\n });\n jMenuArquivo.add(jMenuItemSalvarComo);\n\n jMenuCopiar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));\n jMenuCopiar.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuCopiar.setText(\"Copiar Tudo\");\n jMenuCopiar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuCopiarActionPerformed(evt);\n }\n });\n jMenuArquivo.add(jMenuCopiar);\n jMenuArquivo.add(jSeparator2);\n\n jMenuItemSair.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));\n jMenuItemSair.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemSair.setText(\"Sair\");\n jMenuItemSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemSairActionPerformed(evt);\n }\n });\n jMenuArquivo.add(jMenuItemSair);\n\n jMenuBar1.add(jMenuArquivo);\n\n jMenuCodigo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/programmation.png\"))); // NOI18N\n jMenuCodigo.setMnemonic('C');\n jMenuCodigo.setText(\"Código\");\n jMenuCodigo.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuCodigo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuCodigoActionPerformed(evt);\n }\n });\n\n jMenuItem1.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem1.setText(\"Inserir HTML Básico\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenuCodigo.add(jMenuItem1);\n\n jMenuItemHtml5.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemHtml5.setText(\"Inserir HTML 5 Básico\");\n jMenuItemHtml5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemHtml5ActionPerformed(evt);\n }\n });\n jMenuCodigo.add(jMenuItemHtml5);\n\n jMenuItemCss.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemCss.setText(\"Inserir CSS Básico\");\n jMenuItemCss.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemCssActionPerformed(evt);\n }\n });\n jMenuCodigo.add(jMenuItemCss);\n\n jMenuBar1.add(jMenuCodigo);\n\n jMenuFerramentas.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/confer.png\"))); // NOI18N\n jMenuFerramentas.setMnemonic('f');\n jMenuFerramentas.setText(\"Ferramentas\");\n jMenuFerramentas.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n\n jMenuItemCriaCor.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemCriaCor.setText(\"Seletor de Cores\");\n jMenuItemCriaCor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemCriaCorActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItemCriaCor);\n\n jMenuItemTestadorCor.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemTestadorCor.setText(\"Testador de Cores\");\n jMenuItemTestadorCor.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemTestadorCorActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItemTestadorCor);\n\n jMenuItemGeraMeta.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemGeraMeta.setText(\"Gerador de Meta TAGs\");\n jMenuItemGeraMeta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemGeraMetaActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItemGeraMeta);\n\n jMenuItemGeraIcon.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemGeraIcon.setText(\"Gerador de Favicon\");\n jMenuItemGeraIcon.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemGeraIconActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItemGeraIcon);\n\n jMenuItem2.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem2.setText(\"Gerador de TAGs imprimíveis\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItem2);\n\n jMenuItemMapeador.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemMapeador.setText(\"Mapeador HTML de Imagens\");\n jMenuItemMapeador.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemMapeadorActionPerformed(evt);\n }\n });\n jMenuFerramentas.add(jMenuItemMapeador);\n\n jMenuBar1.add(jMenuFerramentas);\n\n jMenuConfig.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/astuces.png\"))); // NOI18N\n jMenuConfig.setMnemonic('O');\n jMenuConfig.setText(\"Configurações\");\n jMenuConfig.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n\n jMenuItemFonte.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemFonte.setText(\"Fonte\");\n jMenuItemFonte.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemFonteActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItemFonte);\n\n jMenuItemQuebraLinha.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemQuebraLinha.setText(\"Quebra Linha\");\n jMenuItemQuebraLinha.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemQuebraLinhaActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItemQuebraLinha);\n jMenuConfig.add(jSeparator1);\n\n jMenuItem3.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem3.setText(\"Aparência Metal\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItem3);\n\n jMenuItem4.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem4.setText(\"Aparência Windows Classic\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItem4);\n\n jMenuItem5.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem5.setText(\"Aparência Windows\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItem5);\n\n jMenuItem6.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItem6.setText(\"Aparência Nimbus\");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n jMenuConfig.add(jMenuItem6);\n\n jMenuBar1.add(jMenuConfig);\n\n jMenuSobre.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imgs/card.png\"))); // NOI18N\n jMenuSobre.setMnemonic('S');\n jMenuSobre.setText(\"Sobre\");\n jMenuSobre.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n\n jMenuItemOjetivo.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemOjetivo.setText(\"Objetivo\");\n jMenuItemOjetivo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemOjetivoActionPerformed(evt);\n }\n });\n jMenuSobre.add(jMenuItemOjetivo);\n\n jMenuItemCreditos.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemCreditos.setText(\"Créditos\");\n jMenuItemCreditos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemCreditosActionPerformed(evt);\n }\n });\n jMenuSobre.add(jMenuItemCreditos);\n\n jMenuItemAjuda.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemAjuda.setText(\"Ajuda\");\n jMenuItemAjuda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemAjudaActionPerformed(evt);\n }\n });\n jMenuSobre.add(jMenuItemAjuda);\n\n jMenuItemContate.setFont(new java.awt.Font(\"Segoe UI\", 0, 18));\n jMenuItemContate.setText(\"Contate\");\n jMenuItemContate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItemContateActionPerformed(evt);\n }\n });\n jMenuSobre.add(jMenuItemContate);\n\n jMenuBar1.add(jMenuSobre);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)\n );\n\n pack();\n }" ]
[ "0.68638146", "0.6744165", "0.65615326", "0.6316648", "0.6231589", "0.60770464", "0.605737", "0.5987754", "0.59315157", "0.5868314", "0.58436584", "0.56392366", "0.56267136", "0.5625176", "0.56166106", "0.5605863", "0.55590355", "0.5549627", "0.5536151", "0.54907507", "0.5434241", "0.54207844", "0.5414474", "0.5360853", "0.52687055", "0.5231176", "0.5180417", "0.5140714", "0.51193285", "0.50856507", "0.5084671", "0.5077959", "0.50760514", "0.5074433", "0.507283", "0.5065211", "0.50619644", "0.503605", "0.50221103", "0.50205475", "0.501373", "0.5010877", "0.50089544", "0.49994385", "0.49934718", "0.49867013", "0.49605784", "0.4926448", "0.4914732", "0.49059543", "0.48929173", "0.48819092", "0.48745093", "0.48727122", "0.48653534", "0.48623502", "0.4842305", "0.48340258", "0.48320597", "0.48317233", "0.4825367", "0.48243275", "0.4823266", "0.48070475", "0.48061022", "0.4787547", "0.47864398", "0.47735676", "0.47590223", "0.47332445", "0.47170988", "0.470972", "0.46874392", "0.46833727", "0.46813223", "0.46683744", "0.46611044", "0.4652402", "0.46504396", "0.4637683", "0.46376634", "0.46188506", "0.46186218", "0.46118563", "0.45976678", "0.45941606", "0.45872608", "0.45870525", "0.45840216", "0.45712554", "0.4565832", "0.45597172", "0.45588228", "0.45525014", "0.4550876", "0.45448917", "0.45372367", "0.45365956", "0.4534486", "0.45282325", "0.45272422" ]
0.0
-1
TODO need to support boxing of primitive types before calling pre and post methods
public void interceptGetField(int opcode, String owner, String name, String desc) { FieldDefinition fieldDefn = classDefn.managedFields.get(name); if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) { /* inject preGet("fieldX") before GETFIELD */ // at this point stack has (..., [object]) which is ready for GETFIELD // DUP [object] mv.visitInsn(DUP); // stack has (..., [object], [object]) // push [this] mv.visitVarInsn(ALOAD, 0); // stack has (..., [object], [object], [this]) Label label = new Label(); // if ([object] == [this]) mv.visitJumpInsn(IF_ACMPNE, label); // stack has (..., [this]) because (object == this) // DUP [this] mv.visitInsn(DUP); // stack has (..., [this], [this]) // push "fieldX" mv.visitLdcInsn(name); // stack has (..., [this], [this], "fieldX") // invoke preGet("fieldX") mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, preGetMethodName, preGetMethodDesc); // stack has (..., [this]) // label: mv.visitLabel(label); // Frame TODO // mv.visitFrame(??, 0, null, 0, null); // stack has (..., [object]) if (oprandStackIncrement < 3) { oprandStackIncrement = 3; } } // stack has (..., [object]) // GETFIELD super.visitFieldInsn(opcode, owner, name, desc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isPrimitive() {\n return true;\n }", "default boolean isPrimitive() {\n return false;\n }", "public static void main(String[] args) {\n\t\n\tint i=100;\n\tInteger j=i; // auto boxing\n\t\n\tDouble d=34.2;\n\t\n\tboolean b=true;\n\tboolean b2=b;\n\t\n\tList<Integer>nums=new ArrayList<>();\n\tnums.add(433);\n\tint p=555;\n\tnums.add(p);\n\tnums.add(new Integer(77));\n\t\n\tSystem.out.println(nums);\n\t // UnBoxing == takind the wrapper class object and converting into primitive and happens automatically\n\tint r = nums.get(0);\n\t\n\tboolean bool= new Boolean(false);\n\tboolean boolprim=bool;\n\tSystem.out.println(boolprim);\n\t\n\tCharacter chObj='^'; //autoboxing\n\tchar chPrim=chObj;\n\t\n\tchar myChar='^';\n\tCharacter chObj2=myChar; // autoboxing\n\t\n\tchar chprim=chObj; // unboxing from character object\n\t\n\tInteger intValue = new Integer (400);\n\t\n\tif(intValue==400) { // unboxing \n\t\tSystem.out.println(\"Pass\");\n\t}else {\n\t\tSystem.out.println(\"Fail\");\n\t}\n\t\n\t\n\tString word=\"java\";\n\tword=word.toUpperCase();\n\tword=word+\"programminng\";\n\tSystem.out.println(word);\n}", "@Test\r\n public void testWrapperToPrimitive() {\n final Class<?>[] primitives = {\r\n Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE,\r\n Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE\r\n };\r\n for (Class<?> primitive : primitives) {\r\n Class<?> wrapperCls = Classes.primitiveToWrapper(primitive);\r\n assertFalse(\"Still primitive\", wrapperCls.isPrimitive());\r\n assertEquals(wrapperCls + \" -> \" + primitive, primitive,\r\n Classes.wrapperToPrimitive(wrapperCls));\r\n }\r\n }", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "public static void main(String[] args) {\n\t\t\n\t\tInteger obj= new Integer(10);\n\t\t\n\t\tint value=obj.intValue();\n\t\t\n\t\tint data=obj; //auto unboxing\n\t\t//int data=obj.intValue();\n\t\t\n\t\tobj=200; //autoboxing\n\t\t//obj=new Integer(200);\n\n\t}", "private void checkForPrimitiveParameters(Method execMethod, Logger logger) {\n final Class<?>[] paramTypes = execMethod.getParameterTypes();\n for (final Class<?> paramType : paramTypes) {\n if (paramType.isPrimitive()) {\n logger.config(\"The method \" + execMethod\n + \" contains a primitive parameter \" + paramType + \".\");\n logger\n .config(\"It is recommended to use it's wrapper class. If no value could be read from the request, now you would got the default value. If you use the wrapper class, you would get null.\");\n break;\n }\n }\n }", "public static void main(String[] args) {\n int x = 20;\n Object obj = x; // an object will be allocated on HEAP with this value(20)\n\n\n /* Unboxing\n * (Conversion process of an Object reference type to a compatible Object \"value type (tipo valor)\")\n */\n\n int y = (int) obj; // a box will be created on STACK with this value(20)\n\n\n /* Wrapper classes do the boxing and unboxing naturally (better use Wrapper classes in Entities classes\n *\n *\n * Wrapper Classes - Primitive\n * Double double\n * Integer int\n * Boolean boolean\n */\n\n }", "public static void main(String[] args) {\n byte primitiveByte = 127;\n Byte aByte = primitiveByte; // autoboxing\n byte unboxedByte = aByte; // unboxing\n\n short primitiveShort = 1234;\n Short aShort = primitiveShort;\n short unboxedShort = aShort;\n\n int primitiveInt = 123123;\n Integer anInteger = primitiveInt;\n int unboxedInt = anInteger;\n\n long primitiveLong = 1231241241l;\n Long aLong = primitiveLong;\n long unboxedLong = aLong;\n\n float primitiveFloat = 123.3F;\n Float aFloat = primitiveFloat;\n float unboxedFloat = aFloat;\n\n double pritiveDouble = 123.3;\n Double aDouble = pritiveDouble;\n double unboxedDouble = aDouble;\n\n boolean primitiveBolean = true;\n Boolean aBoolean = primitiveBolean;\n boolean unboxedBolean = aBoolean;\n\n char primitiveChar = 'A';\n Character aCharacter = primitiveChar;\n char unboxedChar = aCharacter;\n\n Character aNullCharacter = null;\n char unboxedNullChar = aNullCharacter;\n System.out.println(unboxedNullChar); //NullPointerException\n }", "@Test\n\tpublic void testBoxedPrimitive() throws Exception {\n\t\ttestWith(new TestClassBoxedPrimitive(123));\n\t\ttestWith(new TestClassBoxedPrimitive(null));\n\t}", "public static void main(String[] args) {\n\n int a = 5; // premitive data type\n\n Integer ii1 = new Integer(a); // boxing or wrapping\n System.out.println(\"ii1=\"+ii1);\n\n Integer ii2 = new Integer(10);\n System.out.println(\"ii2=\"+ii2);\n\n Integer ii3 = a;\n Integer ii4 = 15; // autoboxing or autowrapping\n System.out.println(\"ii3=\"+ii3);\n System.out.println(\"ii4=\"+ii4);\n\n // Integer ii1 = new Integer(a);\n // converting non premitive into premitive\n int a1 = ii1.intValue();// unboxing or unwrapping\n int a2 = ii1;// autounboxing or autounwrapping\n\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public void process(Object value) {}", "public abstract Number getPrimitiveType();", "public static void main(String[] args) {\n int a=I;\n System.out.println(\"Auto_unboxing\"+a);\n Integer b=new Integer(a);\n System.out.println(\"Auto_boxing\"+b);\n\t}", "public abstract JType unboxify();", "public static void main(String[] args) {\n\n\t\tint x=10;\n\t\tInteger y =x; //Auto Boxing\n\t\t\n\t\tint z =y;\n\t}", "public boolean isPrimitive() {\n return false;\n }", "public static void main(String[] args) {\n\tint age = 56;\n\tInteger age2 = age;\n\tboolean raining = false;\n\tBoolean raining2 = raining;\n\tint i = 10;\n\tList<Integer> ages = new ArrayList<>();\n\tages.add(34);\n\t\n\t//valueO\n\t//If Integer gets converted to int type then its Unboxing\n}", "public static void main(String[] args) {\n\n\t\tint x = 100;\n\n\t\t// boxing\n\t\tInteger iobj = new Integer(x);\n\t\tSystem.out.println(iobj);\n\n\t\t// unboxing\n\t\tint y = iobj.intValue();\n\t\tSystem.out.println(y);\n\t}", "public PrimObject primitive351(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value.equals(argValue));\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) = aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"=\", rightOperand);\n }\n }", "public static void main(String[] args) {\n\t\tint i = 10;\n\t\tInteger I = Integer.valueOf(i);\n\t\tSystem.out.println(I);\n\t\t\n\t\t//Un boxing : Conversion of Wrapper class to Primitive type\n\t\t\n\t\t//Auto boxing\n\t\tI = 100;\n\t\tString S = Integer.toString(1290);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString number = \"100\";\n\t\tint e = Integer.parseInt(number); // Convenience Method\n\t\tLong t = 1000l;\n\t\tbyte rr = t.byteValue(); // Convenience Method\n\t\tint bb = t.intValue();\n\t\tfloat cc = t.floatValue(); // xxxValue method\n\t\tlong r = 1000L;\n\t\tint r1 = (int)r;\n\t\t\n\t\t//********************************\n\t\tint r3 = 1000;\n\t\tInteger r4 = new Integer(r3); // Old Way Boxing\n\t\tint r6 = r4.intValue(); // Old Way UnBoxing\n\t\tr6++; // Increment\n\t\tr4 = new Integer(r6); // Old Way boxing\n\t\t\n\t\tInteger r5 = r3; // New Way Boxing\n\t\tr5++; // Unboxing , Increment , Boxing\n\t\tLinkedList l = new LinkedList();\n\t\tl.add(1000);\n\t\tint p1 = 1000; \n\t\tInteger p2 = 128; //-128 to 127\n\t\tInteger p3 = 128;\n\t\tif(p2==p3){\n\t\t\tSystem.out.println(\"Same Ref\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not Same Ref\");\n\t\t}\n\n\t}", "@Override\n\tpublic void pre()\n\t{\n\n\t}", "@Test\r\n public void testPrimitive()\r\n {\r\n test(int.class);\r\n }", "@Override\n public void preprocess() {\n }", "public static void main(String[] args) {\n\r\n\t\tInteger obj = new Integer(10);\r\n\t\t\r\n\t\t//Converting Wrapper object to primitive data type\r\n\t\t\r\n\t\tint num = obj.intValue();\r\n\t\t\r\n\t\tSystem.out.println(num+ \" \"+ obj);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint i = 100;\n\t\t//Integer iobj = Integer.valueOf(i);\n\t\t//System.out.println(iobj);\n\t\tInteger iobj = i; //This is Autoboxing where the compiler takes care of Integer class converting the Primitive type int. without the above step\n\t\tSystem.out.println(iobj);\n\t\t\n\t\t//Unboxing: converting wrapper class obj into primitive data type\n\t\tInteger iobj1 = new Integer(200);\n\t\t//int j = iobj1.intValue();\n\t\t//System.out.println(j);\n\t\tint j = iobj1; //This is Unboxing where the compiler takes care of Integer class converting into the Primitive type int. without the above step\n\t\tSystem.out.println(j);\n\n\t}", "public static void main(String[] args) {\n Integer obj1 = Integer.valueOf(23);\n Double obj2 = Double.valueOf(5.55);\n Boolean obj3 = Boolean.valueOf(true);\n\n // converts into prinitive types\n int var1 = obj1.intValue();\n double var2 = obj2.intValue();\n boolean var3 = obj3.booleanValue();\n\n // print the primitive values\n System.out.println(\"The value of int variable: \" + var1);\n System.out.println(\"The value of double variable: \" + var2);\n System.out.println(\"The value of boolean variable: \" + var3);\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\r\n\t int numInt=10;\r\n\t Integer numInteger=10;\r\n\t \r\n\t double numdouble=5.5;\r\n\t Double numDouble=5.5;\r\n\t \r\n\t long longnum=20l;\r\n\t Long Longnum=longnum; //auto-boxing\r\n\t \r\n\t System.out.println(longnum);\r\n\t System.out.println(Longnum);\r\n\t \r\n\t Boolean Booleanresult=false;\r\n\t boolean boolresult=Booleanresult; //unboxing\r\n\t \r\n//\t Methods for wrapper classes:\r\n //max_value: returns the max value of the primitive\r\n\t char maximumChar=Character.MAX_VALUE;\r\n\t System.out.println(maximumChar);\r\n\t \r\n\t//min_value: returns the minimum value of primitive.\r\n\t \r\n\t int minimum=Integer.MIN_VALUE;\r\n\t System.out.println(minimum);\r\n\t \r\n\t byte miniByte=Byte.MIN_VALUE;\r\n\t System.out.println(miniByte);\r\n\t \r\n\t//parse methods: converts String values to primitives, nad returns values as primitives.\r\n\t \r\n\t //parseInt(\"strValue\"):takes the String and converts it to int.\r\n\t \r\n\t Integer num1=Integer.parseInt(\"123\"); //auto-boxing\r\n\t System.out.println(num1+1); //124\r\n\t \r\n\t //parseByte(\"strValue\"):takes a string value and converts it to primitive returning a byte value.\r\n\t \r\n\t int num3=Byte.parseByte(\"19\");\r\n\t System.out.println(num3+1); //20\r\n\t \r\n\t //parseShort(\"strValue\"):takes a string value and converts it to primitive returning a short value.\r\n\t \r\n\t short num4=Short.parseShort(\"123\");\r\n\t System.out.println(num4+5); //128\r\n\t \r\n\t //parseBoolean(\"strValue\"): takes string value and converts it to boolean primitive.\r\n\t boolean A=Boolean.parseBoolean(\"CybertekBatch12\"); //any string value other than true, it will return false\r\n\t System.out.println(A); //false\r\n\t \r\n\t boolean B=Boolean.parseBoolean(\"TrUe\");\r\n\t System.out.println(B); //parseBoolean method ignores the case sensitivity in this case.\r\n\t \r\n\t \r\n//\t ValueOf methods: converts String value to Wrapper class value.\r\n\t \r\n\t int z=Integer.valueOf(\"1234\");\r\n\t System.out.println(z);\r\n\t \r\n\t boolean result1=Boolean.valueOf(\"TRUE\"); //this method also ignores the case sensitivity and \r\n\t //since the result is primitive, it prints out the exact one as the string\r\n\t System.out.println(result1);\r\n\t \r\n\t \r\n\t int totalNum=100;\r\n\t \r\n}", "@Override\r\n\tpublic Class<?> mapPrimitive2Wrapper(Class<?> pri) {\n\t\treturn _DefUtil.primitiveTypeMap.get(pri);\r\n\t}", "public interface CalcPrimitive<T extends Number> {\n\t/**\n\t * Basic arithmetic operation which adds two numbers\n\t * \n\t * @param first\n\t * the addition operand\n\t * @param second\n\t * the addition operand\n\t * @return first + second\n\t */\n\tpublic T sum(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which subtracts two numbers\n\t * \n\t * @param first\n\t * the subtraction operand\n\t * @param second\n\t * the subtraction operand\n\t * @return first - second\n\t */\n\tpublic T sub(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which multiplies two numbers\n\t * \n\t * @param first\n\t * the multiplication operand\n\t * @param second\n\t * the multiplication operand\n\t * @return first * second\n\t */\n\tpublic T mul(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which divides two numbers\n\t * \n\t * @param first\n\t * the division operand\n\t * @param second\n\t * the division operand\n\t * @return first / second\n\t */\n\tpublic T div(T first, T second);\n\n\t/**\n\t * Basic operation which calculates the cosine of the value\n\t * \n\t * @param value\n\t * the operand of the cosine function in radians\n\t * @return the cosine of the value\n\t */\n\tpublic T cos(T value);\n\n\t/**\n\t * Basic operation which calculates the (value)^e\n\t * \n\t * @param value\n\t * the operand of the calculation\n\t * @return (value)^e\n\t */\n\tpublic T exp(T value);\n\n\t/**\n\t * Basic operation which calculates the square root of a value.\n\t * \n\t * @param value\n\t * the operand of the square root function\n\t * @return the square root of value\n\t */\n\tpublic T sqrt(T value);\n\n\t/**\n\t * Convert a String to a T value\n\t * \n\t * @param str\n\t * a String for converting\n\t * @return the value of the specified String as a T\n\t * @throws NumberFormatException\n\t * when str is incorrect\n\t */\n\tpublic T getFromString(String str) throws NumberFormatException;\n\n\t/**\n\t * Check a String on a possibility of converting\n\t * \n\t * @param str\n\t * a String for check\n\t * @return true for correct str and false for incorrect\n\t */\n\tpublic boolean isCorrect(String str);\n\n\t/**\n\t * Convert a T value to a String\n\t * \n\t * @param value\n\t * a T object to converting\n\t * @return the value of the specified number as a String\n\t */\n\tpublic String getString(T value);\n}", "public PrimObject primitive307(PrimContext context) {\n PrimClass aSuperclass = (PrimClass) context.argumentAt(0);\n PrimClass theClass = (PrimClass) context.receiver();\n theClass.superclass(aSuperclass);\n return theClass;\n }", "public interface PrimitiveSerializationTag {\n byte VOID = 0;\n byte VERSION = (byte) 0xFF;\n byte TRUE = (byte) 'T'; // kTrue\n byte FALSE = (byte) 'F'; // kFalse\n byte UNDEFINED = (byte) '_'; // kUndefined\n byte NULL = (byte) '0'; // kNull\n byte INT32 = (byte) 'I'; // kInt32\n byte UINT32 = (byte) 'U'; // kUint32\n byte DOUBLE = (byte) 'N'; // kDouble\n byte BIG_INT = (byte) 'Z'; // kBigInt\n byte UTF8_STRING = (byte) 'S'; // kUtf8String\n byte ONE_BYTE_STRING = (byte) '\"'; // kOneByteString\n byte TWO_BYTE_STRING = (byte) 'c'; // kTwoByteString\n byte PADDING = (byte) '\\0'; // kPadding\n byte DATE = (byte) 'D'; // kDate\n byte THE_HOLE = (byte) '-'; // kTheHole\n byte OBJECT_REFERENCE = (byte) '^'; // kObjectReference\n byte HOST_OBJECT = (byte) '\\\\'; // kHostObject\n}", "@Override\n public void preprocess() {\n }", "public void quickBoxIfNecessary(ClassNode type, MethodVisitor mv) {\n String descr = getTypeDescription(type);\n if (type == boolean_TYPE) {\n boxBoolean(mv);\n } else if (isPrimitiveType(type) && type != VOID_TYPE) {\n ClassNode wrapper = TypeUtil.wrapSafely(type);\n String internName = getClassInternalName(wrapper);\n mv.visitTypeInsn(Opcodes.NEW, internName);\n mv.visitInsn(Opcodes.DUP);\n if (type == double_TYPE || type == long_TYPE) {\n mv.visitInsn(Opcodes.DUP2_X2);\n mv.visitInsn(Opcodes.POP2);\n } else {\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitInsn(Opcodes.POP2);\n }\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, internName, \"<init>\", \"(\" + descr + \")V\");\n }\n }", "public static void main(String[] args) {\n\t\tInteger i =new Integer(10);\r\n\t\tInteger i1=new Integer(\"10\");\r\n\t\tSystem.out.println(\" \" +i+ +i1);\r\n\t\tBoolean b= new Boolean(true);\r\n\t\tBoolean b1 =new Boolean(\"true\");\r\n\t\tSystem.out.println( b +\"\"+b1);\r\n\t\tint iii=new Integer(10);//Auto-unboxing\r\nInteger iiiii =10;//Auto-boxing\r\n\r\n\t}", "public PrimObject primitive352(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value > argValue);\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) > aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\">\", rightOperand);\n }\n }", "@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}", "public Object getRawValue();", "public static void main(String[] args) {\n\t\tint a = 100;\n\t\tInteger b = a;//autoboxing\n\t\tint c=b.intValue();//unboxing\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(b);\n\t\tSystem.out.println(c);\n\t}", "public static void main(String[] args) {\n\n Integer num1 = 100;\n double num2 = num1;\n System.out.println(num2);\n\n float f = 0.5f;\n Float fl = f;\n System.out.println(fl);\n\n System.out.println(Byte.MAX_VALUE);\n\n // parse method --> converting String value to primitives, returne primitive\n // valueOf --> converting String to Wrapper class, return Wrapper class\n\n String str1 = \"123\";\n int result = Integer.parseInt(str1);\n System.out.println(result+1);\n\n String str2 = \"true\";\n boolean r1 = Boolean.parseBoolean(str2);\n System.out.println(r1);\n\n // parse method not case sencetive\n String str3 = \"FaLse\"; // it is work\n boolean r2 = Boolean.parseBoolean(str3);\n System.out.println(r2);\n\n String s1 = \"100.5\";\n Double c1 = Double.parseDouble(s1);\n System.out.println(c1 + 1); // it is call auto boxing\n Double c2 = Double.valueOf(s1); // this in not auto and not unboxing\n\n System.out.println(c1);\n System.out.println(c2);\n\n String s2 = \"TrUe\";\n Boolean b1 = Boolean.valueOf(s2);\n System.out.println(b1); // no sensetive\n\n Double [] arr = new Double[3];\n System.out.println(Arrays.toString(arr));\n // default value of wrapper class always --> null, null, null\n\n String name = \"string\";\n String name1 = new String(\"string\");\n\n Integer I1 = new Integer(\"123\");\n\n System.out.println(addNum(12,13));\n System.out.println(addNum(15.3,7.4));\n \n }", "@Test\n\tpublic void testPrimitives() throws Exception {\n\t\ttestWith(TestClassWithPrimitives.getInstance());\n\t}", "public PrimObject primitive350(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value < argValue);\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) < aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"<\", rightOperand);\n }\n }", "public PrimitiveType getPrimitiveType();", "public static void main(String[] args) {\n\t\t\n\t\tbyte b1 = 12;\n\t\tshort s1 = b1;\n\t\tint i1 = b1;\n\t\tfloat f1 = b1;\n\t\t\n\t\t/*\n\t\t byte < short < int < long < float < double\n\t\n\t\t Buyuk data type'larini kucuk data type'larina cevrime isini Java otomatik olarak yapmaz.\n\t\t Bu cevirmeyi biz asagidaki gibi kod yazarak yapariz. Bunun ismi \"Explicit Narrowing Casting\" dir\n\t \n\t\t */\n\t\t\n\t\tshort s2 = 1210; \n\t\tbyte b2 = (byte)s2;\n\t\t\n\t}", "IntegerValue getValueObject();", "public T casePrimitiveDefinition(PrimitiveDefinition object)\n {\n return null;\n }", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "PRE createPRE();", "void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Text) post);\n }\n }", "private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }", "@Override\r\n\tpublic Value interpret() {\n\t\treturn null;\r\n\t}", "@Test\r\n public void testIsPrimitiveOrWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveOrWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveOrWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveOrWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveOrWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveOrWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveOrWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveOrWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveOrWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertTrue(\"boolean\", Classes.isPrimitiveOrWrapper(Boolean.TYPE));\r\n assertTrue(\"byte\", Classes.isPrimitiveOrWrapper(Byte.TYPE));\r\n assertTrue(\"char\", Classes.isPrimitiveOrWrapper(Character.TYPE));\r\n assertTrue(\"short\", Classes.isPrimitiveOrWrapper(Short.TYPE));\r\n assertTrue(\"int\", Classes.isPrimitiveOrWrapper(Integer.TYPE));\r\n assertTrue(\"long\", Classes.isPrimitiveOrWrapper(Long.TYPE));\r\n assertTrue(\"double\", Classes.isPrimitiveOrWrapper(Double.TYPE));\r\n assertTrue(\"float\", Classes.isPrimitiveOrWrapper(Float.TYPE));\r\n assertTrue(\"Void.TYPE\", Classes.isPrimitiveOrWrapper(Void.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveOrWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveOrWrapper(Void.class));\r\n assertFalse(\"String.class\", Classes.isPrimitiveOrWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveOrWrapper(this.getClass()));\r\n }", "boolean hasPrimitive();", "public PrimitivePropertyTest(String testName)\n {\n super(testName);\n }", "int mo16689b(T t);", "public static void main (String[] args){\n\n ArrayList<Integer> studentNumbers1 = new ArrayList<>();\n studentNumbers1.add(25);\n System.out.println(studentNumbers1.get(0)); // <- unboxing\n /**\n * solution 2 : create custom wrapper class - intWrapper\n */\n ArrayList<intWrapper> studentNumbers2 = new ArrayList<>();\n /**\n * studentNumbers2.add(12); <- Autoboxing\n * java is automatically boxing primitive data type to Object\n * error : intWrapper class does not have any add function so, we can do \"Boxing\" in the parameter\n * with create new object with int value\n */\n studentNumbers2.add(new intWrapper(12)); // <- Boxing\n System.out.println(studentNumbers2.get(0).getIntValue()); // <-Unboxing\n\n\n /**\n * Autoboxing testing with Double\n */\n ArrayList<Double> demoList = new ArrayList<>();\n demoList.add(25.5);\n demoList.add(new Double(25.2));\n /**\n * Java compiler convert the code like below.\n * Below command is done while autoboxing\n */\n demoList.add(Double.valueOf(10.3));\n System.out.println(demoList.get(0)); // <-Autoboxing\n System.out.println(demoList.get(0).doubleValue()); // <- command is done while autoboxing\n\n }", "protected boolean isPrimitiveObject(Object object) {\r\n return PropertyType.PRIMITIVE.equals(determinePropertyType(object));\r\n }", "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "void typePromition(int a, long b){\n\t\tSystem.out.println(\"Method-5 (TypePromotion) Result is: \" + (a+b));\n\t}", "public void testAssertPropertyReflectionEquals_equalsPrimitive() {\r\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\r\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "@Override\n public boolean ll_isPrimitiveType(int typeCode) {\n return !ll_isRefType(typeCode);\n }", "public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }", "@Override\n public Object preProcess() {\n return null;\n }", "public PrimObject primitive110(PrimContext context) {\n if (this.equals(context.argumentAt(0)))\n return classLoader().trueInstance();\n else\n return classLoader().falseInstance();\n }", "@Test\n void shouldReturnPrimitiveTypeOnly() {\n assertThat(TypeVisitor.gatherAllTypes(int.class), contains(int.class));\n assertThat(TypeVisitor.gatherAllTypes(double.class), contains(double.class));\n assertThat(TypeVisitor.gatherAllTypes(char.class), contains(char.class));\n }", "@Override\n public void preMathTypeDec(MathTypeDec data) {\n super.preMathTypeDec(data);\n }", "public static void main(String[] args) {\n\t\tbyte datoByte = 2; // Primitivo\n\t\tByte datoByteWrapper = 3; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoByte);\n\t\tSystem.out.println(\"Wrapper: \" + datoByteWrapper);\n\t\t// Conversiones\n\t\tbyte datoByte1 = 5;\n\t\tByte datoConvertido = datoByte1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoConvertido);\n\t\t// Conversiones 2\n\t\tByte datoConvertido1 = 6;\n\t\tbyte datoByte2 = datoConvertido1.byteValue();\n\t\tSystem.out.println(\"Dato Byte: \" + datoConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// short\n\t\tshort datoShort = 1; // Primitivo\n\t\tShort datoShortWrapper = 1; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoShort);\n\t\tSystem.out.println(\"Wrapper: \" + datoShortWrapper);\n\t\t// Conversiones\n\t\tshort datoShort1 = 4;\n\t\tShort shortConvertido = datoShort1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoShort1);\n\t\t// Conversiones 2\n\t\tShort shortConvertido1 = 6;\n\t\tshort datoShort2 = shortConvertido1.shortValue();\n\t\tSystem.out.println(\"Dato Short: \" + shortConvertido1);\n\t\tSystem.out.println();\n\n\t\t// int\n\t\tint edad = 45; // Primitivo\n\t\tInteger edadWrapper = 48; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + edad);\n\t\tSystem.out.println(\"Wrapper: \" + edadWrapper);\n\t\t// Conversiones\n\t\tint edad1 = 4;\n\t\tInteger integerConvertido = edad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + edad1);\n\t\t// Conversiones 2\n\t\tInteger integerConvertido1 = 6;\n\t\tint edad2 = integerConvertido1.intValue();\n\t\tSystem.out.println(\"Int Convertido: \" + integerConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// long\n\t\tlong valorGrande = 12321; // Primitivo\n\t\tLong valorGrandeWrapper = 123123L; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorGrande);\n\t\tSystem.out.println(\"Wrapper: \" + valorGrandeWrapper);\n\t\t// Conversiones\n\t\tlong valorGrande1 = 4;\n\t\tLong longConvertido = valorGrande1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorGrande1);\n\t\t// Conversiones 2\n\t\tLong longConvertido1 = 23423L;\n\t\tlong valorGrande2 = longConvertido1.longValue();\n\t\tSystem.out.println(\"Int Convertido: \" + longConvertido1);\n\t\tSystem.out.println();\n\n\t\t// boolean\n\t\tboolean valorVerdad = true; // Primitivo\n\t\tBoolean valorVerdadWrapper = false; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorVerdad);\n\t\tSystem.out.println(\"Wrapper: \" + valorVerdadWrapper);\n\t\t// Conversiones\n\t\tboolean valorVerdad1 = true;\n\t\tBoolean booleanConvertido = valorVerdad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorVerdad1);\n\t\t// Conversiones 2\n\t\tBoolean booleanConvertido1 = false;\n\t\tboolean valorVerdad2 = booleanConvertido1.booleanValue();\n\t\tSystem.out.println(\"Int Convertido: \" + booleanConvertido1);\n\t\tSystem.out.println();\n\n\t\t// float\n\t\tfloat valor = 1; // Primitivo\n\t\tFloat valorWrapper = 9F; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valor);\n\t\tSystem.out.println(\"Wrapper: \" + valorWrapper);\n\t\t// Conversiones\n\t\tfloat valor1 = 23;\n\t\tFloat floatConvertido = valor1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valor1);\n\t\t// Conversiones 2\n\t\tFloat floatConvertido1 = 65F;\n\t\tfloat valor2 = floatConvertido1.floatValue();\n\t\tSystem.out.println(\"Int Convertido: \" + floatConvertido1);\n\t\tSystem.out.println();\n\n\t\t// double\n\t\tdouble valorDecimal = 12.34; // Primitivo\n\t\tDouble valorDecimalWrapper = 34.78; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorDecimal);\n\t\tSystem.out.println(\"Wrapper: \" + valorDecimalWrapper);\n\t\t// Conversiones\n\t\tdouble valorDecimal1 = 23.65;\n\t\tDouble doubleConvertido = valorDecimal1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorDecimal1);\n\t\t// Conversiones 2\n\t\tDouble doubleConvertido1 = 65.78;\n\t\tdouble valorDecimal2 = doubleConvertido1.doubleValue();\n\t\tSystem.out.println(\"Int Convertido: \" + doubleConvertido1);\n\t\tSystem.out.println();\n\n\t\t// char\n\t\tchar letraAlfabeto = 'J'; // Primitivo\n\t\tCharacter letraAlfabetoWrapper = 'C'; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + letraAlfabeto);\n\t\tSystem.out.println(\"Wrapper: \" + letraAlfabetoWrapper);\n\t\t// Conversiones\n\t\tchar letraAlfabeto1 = 'F';\n\t\tCharacter charConvertido = letraAlfabeto1;\n\t\tSystem.out.println(\"Dato Convertido: \" + letraAlfabeto1);\n\t\t// Conversiones 2\n\t\tCharacter charConvertido1 = 'R';\n\t\tchar letraAlfabeto2 = charConvertido1.charValue();\n\t\tSystem.out.println(\"Int Convertido: \" + charConvertido1);\n\n\t}", "@Test\n public void shouldIncludeValuesFromFieldWithBinaryDocValues() {\n }", "@Test\n void testAssertPropertyReflectionEquals_equalsPrimitive() {\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\n }", "void visitRealValue(RealValue value);", "public abstract ValueType getValueType();", "@Test\r\n public void testIsPrimitiveWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertFalse(\"boolean\", Classes.isPrimitiveWrapper(Boolean.TYPE));\r\n assertFalse(\"byte\", Classes.isPrimitiveWrapper(Byte.TYPE));\r\n assertFalse(\"char\", Classes.isPrimitiveWrapper(Character.TYPE));\r\n assertFalse(\"short\", Classes.isPrimitiveWrapper(Short.TYPE));\r\n assertFalse(\"int\", Classes.isPrimitiveWrapper(Integer.TYPE));\r\n assertFalse(\"long\", Classes.isPrimitiveWrapper(Long.TYPE));\r\n assertFalse(\"double\", Classes.isPrimitiveWrapper(Double.TYPE));\r\n assertFalse(\"float\", Classes.isPrimitiveWrapper(Float.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveWrapper(Void.class));\r\n assertFalse(\"Void.TYPE\", Classes.isPrimitiveWrapper(Void.TYPE));\r\n assertFalse(\"String.class\", Classes.isPrimitiveWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveWrapper(this.getClass()));\r\n }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tbyte b=3;\n\t\tshort s=34;\n\t\tint i=125;\n\t\t\n\t}", "public void addToPrimitive(int add) {\n primitiveCounter += add;\n }", "public interface ValueProcessor {\n public void process(Object original, String type, String value);\n }", "public void process(Object value) {\n\t\t//empty\n\t}", "public ScalarType copyValue();", "public static void main(String[] args) {\n\n Box<Integer> boxWithIntegers = new Box<>();\n boxWithIntegers.set(9);\n\n Box<Double> boxWithDoubles = new Box<>();\n boxWithDoubles.set(9.0);\n\n }", "public PrimObject primitive111(PrimContext context) {\n return this.selfClass();\n }", "public boolean isPrimitive(Class paramClass) {\n/* 113 */ if (paramClass == null) {\n/* 114 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 117 */ return paramClass.isPrimitive();\n/* */ }", "private static void increasePrimitive(int value) {\n value++;\n }", "@Override\n\tprotected void generatePrimitives(SoAction action) {\n\n\t}", "public TypeNativePrimitiveObjectWrapperRuntimeImpl(TypeNativePrimitiveObjectWrapperImpl typeDec,Class javaClass,boolean isPrimary,RuntimeContext ctx)\n {\n super(typeDec,javaClass,isPrimary,ctx);\n }", "public Object objectValue();", "public T casePreprocess(Preprocess object)\n\t{\n\t\treturn null;\n\t}", "public interface ScalarType extends java.io.Serializable\n{\n /** create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want \n scalars of your scalar type to be passed by reference. */\n public ScalarType copyValue(); \n\n /** convert the scalar to an int */\n public int intValue();\n\n /** convert the scalar to a long */\n public long longValue();\n\n /** convert the scalar to a double */\n public double doubleValue();\n\n /** convert the scalar to a string */\n public String toString();\n\n /** convert the scalar to an object value *shrug* */\n public Object objectValue();\n\n /** returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking\n functionality */\n public Class getType();\n}", "public abstract Object adjust(Object value, T type);", "public static void main(String[] args) {\n int numero=10;\n //Objetos\n Integer entero = numero;\n //literal entera para hacer calculos\n System.out.println(\"entero = \" + entero);\n //literal entera como cadena de texto\n System.out.println(\"entero = \" + entero.toString());\n //conversion a double\n System.out.println(\"entero double = \" + entero.doubleValue());\n\n //UnBoxing(de Object a primitivo)\n \n //Variables\n int entero2 = entero;\n System.out.println(\"entero2 = \" + entero2);\n }", "void mo16691c(T t);", "PrimitiveType createPrimitiveType();", "public static void main(String[] args) {\n \n int entero=10;\n Integer entero2=20;\n System.out.println(\"entero2 = \" + entero2);\n System.out.println(\"entero2 = \" + entero2.toString());\n System.out.println(\"entero2 = \" + entero2.doubleValue());\n \n int entero3=entero2;//unboxing, se recupera el valor de entero2\n System.out.println(\"entero3 = \" + entero3);\n }", "private static native void PeiLinNormalization_0(long I_nativeObj, long T_nativeObj);", "public static void main(String[] args) {\n\t\tHolder<? super Number> h2 = new Holder<Object>();\r\n\t\tInteger i = 10;\r\n\t\th2.setT(i);\r\n\t\th2.setT(1.0);\r\n\t}" ]
[ "0.61233187", "0.59454256", "0.5758771", "0.57392615", "0.56844884", "0.5670557", "0.5651153", "0.564493", "0.56315273", "0.56227267", "0.55927205", "0.5492512", "0.53920305", "0.53835607", "0.5345135", "0.5328785", "0.53285825", "0.532399", "0.5312923", "0.53099173", "0.52943623", "0.52865434", "0.52698", "0.5260443", "0.5258469", "0.5256637", "0.5244022", "0.5228731", "0.52048516", "0.52023464", "0.5157124", "0.51510406", "0.5147052", "0.51464427", "0.51368845", "0.513613", "0.5128812", "0.5128689", "0.51218194", "0.51139975", "0.51051754", "0.5100658", "0.50940615", "0.5080922", "0.50772417", "0.50741607", "0.506952", "0.5065203", "0.50541234", "0.504628", "0.50321364", "0.50240475", "0.500795", "0.5001301", "0.4986896", "0.49822825", "0.4952703", "0.49404043", "0.49382874", "0.4937237", "0.49340615", "0.49214", "0.491816", "0.4916797", "0.4916797", "0.4916797", "0.4916797", "0.4912082", "0.4909144", "0.49089167", "0.48922214", "0.4890205", "0.48889467", "0.4885065", "0.48551226", "0.4851847", "0.48503202", "0.48383945", "0.48319685", "0.4829064", "0.48191956", "0.48160282", "0.48144928", "0.48102337", "0.48083273", "0.4798761", "0.47909614", "0.47864863", "0.47863454", "0.4783168", "0.4782023", "0.47802627", "0.47775516", "0.47766367", "0.47760135", "0.47724208", "0.4768667", "0.4765514", "0.47649223", "0.47614515", "0.47606787" ]
0.0
-1
TODO need to support boxing of primitive types before calling pre and post methods
public void interceptPutField(int opcode, String owner, String name, String desc) { FieldDefinition fieldDefn = classDefn.managedFields.get(name); if (fieldDefn != null && !isCurrentMethodAccessorOfField(name)) { if (fieldDefn.isCollection() && (fieldDefn.isEntity() || fieldDefn.isEmbedded())) { super.visitFieldInsn(opcode, owner, name, desc); return; } char[] field = name.toCharArray(); field[0] = Character.toUpperCase(field[0]); String getterMethodName = "get" + String.valueOf(field); String getterMethodDesc = "()" + desc; /* inject preSet before PUTFIELD and postSet after PUTFIELD */ // at this point stack has (..., [this], [fieldX]) which is ready for PUTFIELD // push [this] mv.visitVarInsn(ALOAD, 0); // stack has (..., [this], [fieldX], [this]) mv.visitInsn(DUP2); // stack has (..., [this], [fieldX], [this], [fieldX], [this]) // push "fieldX" mv.visitLdcInsn(name); // stack has (..., [this], [fieldX], [this], [fieldX], [this], "fieldX") mv.visitInsn(DUP_X2); // stack has (..., [this], [fieldX], [this], "fieldX", [fieldX], [this], "fieldX") // pop mv.visitInsn(POP); // stack has (..., [this], [fieldX], [this], "fieldX", [fieldX], [this]) // invoke getFieldX() mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, getterMethodName, getterMethodDesc); // stack has (..., [this], [fieldX], [this], "fieldX", [fieldX], getFieldX()) mv.visitInsn(SWAP); // stack has (..., [this], [fieldX], [this], "fieldX", getFieldX(), [fieldX]) if (fieldDefn.isEntity()) { // invoke preSet("fieldX", getFieldX(), [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, preSetMethodName, preSetMethodDesc); } else if (fieldDefn.isEmbedded()) { // invoke preSetEmbedded("fieldX", getFieldX(), [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, preSetEmbeddedMethodName, preSetEmbeddedMethodDesc); } else if (fieldDefn.isBasic()) { // invoke preSetBasic("fieldX", getFieldX(), [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, preSetBasicMethodName, preSetBasicMethodDesc); } else { // invoke preSetAmbiguous("fieldX", getFieldX(), [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, preSetAmbiguousMethodName, preSetAmbiguousMethodDesc); } // stack has (..., [this], [fieldX], preSet()) // DUP IRETURN value of preSet() beneath third word mv.visitInsn(DUP_X2); // stack has (..., preSet(), [this], [fieldX], preSet()) mv.visitInsn(POP); // stack has (..., preSet(), [this], [fieldX]) mv.visitInsn(DUP_X2); // stack has (..., [fieldX], preSet(), [this], [fieldX]) // PUTFIELD in [this].[fieldX] super.visitFieldInsn(opcode, owner, name, desc); // stack has (..., [fieldX], preSet()) /* inject postSet after PUTFIELD if (IRETURN value of preSet() is false && [this].[fieldX] == [fieldX]) postSet... */ Label label1 = new Label(); // stack has (..., [fieldX], preSet()) // if true goto label, there is not change by PUTFIELD mv.visitJumpInsn(IFGT, label1); // stack has (..., [fieldX]) mv.visitInsn(DUP); // stack has (..., [fieldX], [fieldX]) // push [this] mv.visitVarInsn(ALOAD, 0); // stack has (..., [fieldX], [fieldX], [this]) // get [this].[fieldX] mv.visitFieldInsn(GETFIELD, classDefn.internalClassName, name, desc); // stack has (..., [fieldX], [fieldX], [this].[fieldX]) // if ([this].[fieldX] == [fieldX]) mv.visitJumpInsn(IF_ACMPNE, label1); // jump if != // stack has (..., [fieldX]) // push [this] mv.visitVarInsn(ALOAD, 0); // stack has (..., [fieldX], [this]) mv.visitInsn(SWAP); // stack has (..., [this], [fieldX]) // push "fieldX" mv.visitLdcInsn(name); // stack has (..., [this], [fieldX], "fieldX") mv.visitInsn(SWAP); // stack has (..., [this], "fieldX", [fieldX]) if (fieldDefn.isEntity()) { // stack has (..., [this], "fieldX", [fieldX]) mv.visitInsn(POP); // stack has (..., [this], "fieldX") // invoke postSet("fieldX") mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, postSetMethodName, postSetMethodDesc); // stack has (...) } else if (fieldDefn.isEmbedded()) { // stack has (..., [this], "fieldX", [fieldX]) // invoke postSetEmbedded("fieldX", [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, postSetEmbeddedMethodName, postSetEmbeddedMethodDesc); // stack has (...) } else if (fieldDefn.isBasic()) { // stack has (..., [this], "fieldX", [fieldX]) // invoke postSetBasic("fieldX", [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, postSetBasicMethodName, postSetBasicMethodDesc); // stack has (...) } else { // stack has (..., [this], "fieldX", [fieldX]) // invoke postSetAmbiguous("fieldX", [fieldX]) mv.visitMethodInsn(INVOKEVIRTUAL, classDefn.internalClassName, postSetAmbiguousMethodName, postSetAmbiguousMethodDesc); // stack has (...) } Label label2 = new Label(); mv.visitJumpInsn(GOTO, label2); // label1: mv.visitLabel(label1); // stack has (..., [fieldX]) mv.visitInsn(POP); // stack has (...) // label2: mv.visitLabel(label2); // stack has (...) // Frame TODO // mv.visitFrame(F_SAME, 0, null, 0, null); if (oprandStackIncrement < 9) { oprandStackIncrement = 9; } return; } super.visitFieldInsn(opcode, owner, name, desc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isPrimitive() {\n return true;\n }", "default boolean isPrimitive() {\n return false;\n }", "public static void main(String[] args) {\n\t\n\tint i=100;\n\tInteger j=i; // auto boxing\n\t\n\tDouble d=34.2;\n\t\n\tboolean b=true;\n\tboolean b2=b;\n\t\n\tList<Integer>nums=new ArrayList<>();\n\tnums.add(433);\n\tint p=555;\n\tnums.add(p);\n\tnums.add(new Integer(77));\n\t\n\tSystem.out.println(nums);\n\t // UnBoxing == takind the wrapper class object and converting into primitive and happens automatically\n\tint r = nums.get(0);\n\t\n\tboolean bool= new Boolean(false);\n\tboolean boolprim=bool;\n\tSystem.out.println(boolprim);\n\t\n\tCharacter chObj='^'; //autoboxing\n\tchar chPrim=chObj;\n\t\n\tchar myChar='^';\n\tCharacter chObj2=myChar; // autoboxing\n\t\n\tchar chprim=chObj; // unboxing from character object\n\t\n\tInteger intValue = new Integer (400);\n\t\n\tif(intValue==400) { // unboxing \n\t\tSystem.out.println(\"Pass\");\n\t}else {\n\t\tSystem.out.println(\"Fail\");\n\t}\n\t\n\t\n\tString word=\"java\";\n\tword=word.toUpperCase();\n\tword=word+\"programminng\";\n\tSystem.out.println(word);\n}", "@Test\r\n public void testWrapperToPrimitive() {\n final Class<?>[] primitives = {\r\n Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE,\r\n Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE\r\n };\r\n for (Class<?> primitive : primitives) {\r\n Class<?> wrapperCls = Classes.primitiveToWrapper(primitive);\r\n assertFalse(\"Still primitive\", wrapperCls.isPrimitive());\r\n assertEquals(wrapperCls + \" -> \" + primitive, primitive,\r\n Classes.wrapperToPrimitive(wrapperCls));\r\n }\r\n }", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "public static void main(String[] args) {\n\t\t\n\t\tInteger obj= new Integer(10);\n\t\t\n\t\tint value=obj.intValue();\n\t\t\n\t\tint data=obj; //auto unboxing\n\t\t//int data=obj.intValue();\n\t\t\n\t\tobj=200; //autoboxing\n\t\t//obj=new Integer(200);\n\n\t}", "private void checkForPrimitiveParameters(Method execMethod, Logger logger) {\n final Class<?>[] paramTypes = execMethod.getParameterTypes();\n for (final Class<?> paramType : paramTypes) {\n if (paramType.isPrimitive()) {\n logger.config(\"The method \" + execMethod\n + \" contains a primitive parameter \" + paramType + \".\");\n logger\n .config(\"It is recommended to use it's wrapper class. If no value could be read from the request, now you would got the default value. If you use the wrapper class, you would get null.\");\n break;\n }\n }\n }", "public static void main(String[] args) {\n int x = 20;\n Object obj = x; // an object will be allocated on HEAP with this value(20)\n\n\n /* Unboxing\n * (Conversion process of an Object reference type to a compatible Object \"value type (tipo valor)\")\n */\n\n int y = (int) obj; // a box will be created on STACK with this value(20)\n\n\n /* Wrapper classes do the boxing and unboxing naturally (better use Wrapper classes in Entities classes\n *\n *\n * Wrapper Classes - Primitive\n * Double double\n * Integer int\n * Boolean boolean\n */\n\n }", "public static void main(String[] args) {\n byte primitiveByte = 127;\n Byte aByte = primitiveByte; // autoboxing\n byte unboxedByte = aByte; // unboxing\n\n short primitiveShort = 1234;\n Short aShort = primitiveShort;\n short unboxedShort = aShort;\n\n int primitiveInt = 123123;\n Integer anInteger = primitiveInt;\n int unboxedInt = anInteger;\n\n long primitiveLong = 1231241241l;\n Long aLong = primitiveLong;\n long unboxedLong = aLong;\n\n float primitiveFloat = 123.3F;\n Float aFloat = primitiveFloat;\n float unboxedFloat = aFloat;\n\n double pritiveDouble = 123.3;\n Double aDouble = pritiveDouble;\n double unboxedDouble = aDouble;\n\n boolean primitiveBolean = true;\n Boolean aBoolean = primitiveBolean;\n boolean unboxedBolean = aBoolean;\n\n char primitiveChar = 'A';\n Character aCharacter = primitiveChar;\n char unboxedChar = aCharacter;\n\n Character aNullCharacter = null;\n char unboxedNullChar = aNullCharacter;\n System.out.println(unboxedNullChar); //NullPointerException\n }", "@Test\n\tpublic void testBoxedPrimitive() throws Exception {\n\t\ttestWith(new TestClassBoxedPrimitive(123));\n\t\ttestWith(new TestClassBoxedPrimitive(null));\n\t}", "public static void main(String[] args) {\n\n int a = 5; // premitive data type\n\n Integer ii1 = new Integer(a); // boxing or wrapping\n System.out.println(\"ii1=\"+ii1);\n\n Integer ii2 = new Integer(10);\n System.out.println(\"ii2=\"+ii2);\n\n Integer ii3 = a;\n Integer ii4 = 15; // autoboxing or autowrapping\n System.out.println(\"ii3=\"+ii3);\n System.out.println(\"ii4=\"+ii4);\n\n // Integer ii1 = new Integer(a);\n // converting non premitive into premitive\n int a1 = ii1.intValue();// unboxing or unwrapping\n int a2 = ii1;// autounboxing or autounwrapping\n\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public void process(Object value) {}", "public abstract Number getPrimitiveType();", "public static void main(String[] args) {\n int a=I;\n System.out.println(\"Auto_unboxing\"+a);\n Integer b=new Integer(a);\n System.out.println(\"Auto_boxing\"+b);\n\t}", "public abstract JType unboxify();", "public static void main(String[] args) {\n\n\t\tint x=10;\n\t\tInteger y =x; //Auto Boxing\n\t\t\n\t\tint z =y;\n\t}", "public boolean isPrimitive() {\n return false;\n }", "public static void main(String[] args) {\n\tint age = 56;\n\tInteger age2 = age;\n\tboolean raining = false;\n\tBoolean raining2 = raining;\n\tint i = 10;\n\tList<Integer> ages = new ArrayList<>();\n\tages.add(34);\n\t\n\t//valueO\n\t//If Integer gets converted to int type then its Unboxing\n}", "public static void main(String[] args) {\n\n\t\tint x = 100;\n\n\t\t// boxing\n\t\tInteger iobj = new Integer(x);\n\t\tSystem.out.println(iobj);\n\n\t\t// unboxing\n\t\tint y = iobj.intValue();\n\t\tSystem.out.println(y);\n\t}", "public PrimObject primitive351(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value.equals(argValue));\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) = aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"=\", rightOperand);\n }\n }", "public static void main(String[] args) {\n\t\tint i = 10;\n\t\tInteger I = Integer.valueOf(i);\n\t\tSystem.out.println(I);\n\t\t\n\t\t//Un boxing : Conversion of Wrapper class to Primitive type\n\t\t\n\t\t//Auto boxing\n\t\tI = 100;\n\t\tString S = Integer.toString(1290);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString number = \"100\";\n\t\tint e = Integer.parseInt(number); // Convenience Method\n\t\tLong t = 1000l;\n\t\tbyte rr = t.byteValue(); // Convenience Method\n\t\tint bb = t.intValue();\n\t\tfloat cc = t.floatValue(); // xxxValue method\n\t\tlong r = 1000L;\n\t\tint r1 = (int)r;\n\t\t\n\t\t//********************************\n\t\tint r3 = 1000;\n\t\tInteger r4 = new Integer(r3); // Old Way Boxing\n\t\tint r6 = r4.intValue(); // Old Way UnBoxing\n\t\tr6++; // Increment\n\t\tr4 = new Integer(r6); // Old Way boxing\n\t\t\n\t\tInteger r5 = r3; // New Way Boxing\n\t\tr5++; // Unboxing , Increment , Boxing\n\t\tLinkedList l = new LinkedList();\n\t\tl.add(1000);\n\t\tint p1 = 1000; \n\t\tInteger p2 = 128; //-128 to 127\n\t\tInteger p3 = 128;\n\t\tif(p2==p3){\n\t\t\tSystem.out.println(\"Same Ref\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Not Same Ref\");\n\t\t}\n\n\t}", "@Test\r\n public void testPrimitive()\r\n {\r\n test(int.class);\r\n }", "@Override\n\tpublic void pre()\n\t{\n\n\t}", "@Override\n public void preprocess() {\n }", "public static void main(String[] args) {\n\r\n\t\tInteger obj = new Integer(10);\r\n\t\t\r\n\t\t//Converting Wrapper object to primitive data type\r\n\t\t\r\n\t\tint num = obj.intValue();\r\n\t\t\r\n\t\tSystem.out.println(num+ \" \"+ obj);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tint i = 100;\n\t\t//Integer iobj = Integer.valueOf(i);\n\t\t//System.out.println(iobj);\n\t\tInteger iobj = i; //This is Autoboxing where the compiler takes care of Integer class converting the Primitive type int. without the above step\n\t\tSystem.out.println(iobj);\n\t\t\n\t\t//Unboxing: converting wrapper class obj into primitive data type\n\t\tInteger iobj1 = new Integer(200);\n\t\t//int j = iobj1.intValue();\n\t\t//System.out.println(j);\n\t\tint j = iobj1; //This is Unboxing where the compiler takes care of Integer class converting into the Primitive type int. without the above step\n\t\tSystem.out.println(j);\n\n\t}", "public static void main(String[] args) {\n Integer obj1 = Integer.valueOf(23);\n Double obj2 = Double.valueOf(5.55);\n Boolean obj3 = Boolean.valueOf(true);\n\n // converts into prinitive types\n int var1 = obj1.intValue();\n double var2 = obj2.intValue();\n boolean var3 = obj3.booleanValue();\n\n // print the primitive values\n System.out.println(\"The value of int variable: \" + var1);\n System.out.println(\"The value of double variable: \" + var2);\n System.out.println(\"The value of boolean variable: \" + var3);\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\r\n\t int numInt=10;\r\n\t Integer numInteger=10;\r\n\t \r\n\t double numdouble=5.5;\r\n\t Double numDouble=5.5;\r\n\t \r\n\t long longnum=20l;\r\n\t Long Longnum=longnum; //auto-boxing\r\n\t \r\n\t System.out.println(longnum);\r\n\t System.out.println(Longnum);\r\n\t \r\n\t Boolean Booleanresult=false;\r\n\t boolean boolresult=Booleanresult; //unboxing\r\n\t \r\n//\t Methods for wrapper classes:\r\n //max_value: returns the max value of the primitive\r\n\t char maximumChar=Character.MAX_VALUE;\r\n\t System.out.println(maximumChar);\r\n\t \r\n\t//min_value: returns the minimum value of primitive.\r\n\t \r\n\t int minimum=Integer.MIN_VALUE;\r\n\t System.out.println(minimum);\r\n\t \r\n\t byte miniByte=Byte.MIN_VALUE;\r\n\t System.out.println(miniByte);\r\n\t \r\n\t//parse methods: converts String values to primitives, nad returns values as primitives.\r\n\t \r\n\t //parseInt(\"strValue\"):takes the String and converts it to int.\r\n\t \r\n\t Integer num1=Integer.parseInt(\"123\"); //auto-boxing\r\n\t System.out.println(num1+1); //124\r\n\t \r\n\t //parseByte(\"strValue\"):takes a string value and converts it to primitive returning a byte value.\r\n\t \r\n\t int num3=Byte.parseByte(\"19\");\r\n\t System.out.println(num3+1); //20\r\n\t \r\n\t //parseShort(\"strValue\"):takes a string value and converts it to primitive returning a short value.\r\n\t \r\n\t short num4=Short.parseShort(\"123\");\r\n\t System.out.println(num4+5); //128\r\n\t \r\n\t //parseBoolean(\"strValue\"): takes string value and converts it to boolean primitive.\r\n\t boolean A=Boolean.parseBoolean(\"CybertekBatch12\"); //any string value other than true, it will return false\r\n\t System.out.println(A); //false\r\n\t \r\n\t boolean B=Boolean.parseBoolean(\"TrUe\");\r\n\t System.out.println(B); //parseBoolean method ignores the case sensitivity in this case.\r\n\t \r\n\t \r\n//\t ValueOf methods: converts String value to Wrapper class value.\r\n\t \r\n\t int z=Integer.valueOf(\"1234\");\r\n\t System.out.println(z);\r\n\t \r\n\t boolean result1=Boolean.valueOf(\"TRUE\"); //this method also ignores the case sensitivity and \r\n\t //since the result is primitive, it prints out the exact one as the string\r\n\t System.out.println(result1);\r\n\t \r\n\t \r\n\t int totalNum=100;\r\n\t \r\n}", "@Override\r\n\tpublic Class<?> mapPrimitive2Wrapper(Class<?> pri) {\n\t\treturn _DefUtil.primitiveTypeMap.get(pri);\r\n\t}", "public interface CalcPrimitive<T extends Number> {\n\t/**\n\t * Basic arithmetic operation which adds two numbers\n\t * \n\t * @param first\n\t * the addition operand\n\t * @param second\n\t * the addition operand\n\t * @return first + second\n\t */\n\tpublic T sum(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which subtracts two numbers\n\t * \n\t * @param first\n\t * the subtraction operand\n\t * @param second\n\t * the subtraction operand\n\t * @return first - second\n\t */\n\tpublic T sub(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which multiplies two numbers\n\t * \n\t * @param first\n\t * the multiplication operand\n\t * @param second\n\t * the multiplication operand\n\t * @return first * second\n\t */\n\tpublic T mul(T first, T second);\n\n\t/**\n\t * Basic arithmetic operation which divides two numbers\n\t * \n\t * @param first\n\t * the division operand\n\t * @param second\n\t * the division operand\n\t * @return first / second\n\t */\n\tpublic T div(T first, T second);\n\n\t/**\n\t * Basic operation which calculates the cosine of the value\n\t * \n\t * @param value\n\t * the operand of the cosine function in radians\n\t * @return the cosine of the value\n\t */\n\tpublic T cos(T value);\n\n\t/**\n\t * Basic operation which calculates the (value)^e\n\t * \n\t * @param value\n\t * the operand of the calculation\n\t * @return (value)^e\n\t */\n\tpublic T exp(T value);\n\n\t/**\n\t * Basic operation which calculates the square root of a value.\n\t * \n\t * @param value\n\t * the operand of the square root function\n\t * @return the square root of value\n\t */\n\tpublic T sqrt(T value);\n\n\t/**\n\t * Convert a String to a T value\n\t * \n\t * @param str\n\t * a String for converting\n\t * @return the value of the specified String as a T\n\t * @throws NumberFormatException\n\t * when str is incorrect\n\t */\n\tpublic T getFromString(String str) throws NumberFormatException;\n\n\t/**\n\t * Check a String on a possibility of converting\n\t * \n\t * @param str\n\t * a String for check\n\t * @return true for correct str and false for incorrect\n\t */\n\tpublic boolean isCorrect(String str);\n\n\t/**\n\t * Convert a T value to a String\n\t * \n\t * @param value\n\t * a T object to converting\n\t * @return the value of the specified number as a String\n\t */\n\tpublic String getString(T value);\n}", "public PrimObject primitive307(PrimContext context) {\n PrimClass aSuperclass = (PrimClass) context.argumentAt(0);\n PrimClass theClass = (PrimClass) context.receiver();\n theClass.superclass(aSuperclass);\n return theClass;\n }", "public interface PrimitiveSerializationTag {\n byte VOID = 0;\n byte VERSION = (byte) 0xFF;\n byte TRUE = (byte) 'T'; // kTrue\n byte FALSE = (byte) 'F'; // kFalse\n byte UNDEFINED = (byte) '_'; // kUndefined\n byte NULL = (byte) '0'; // kNull\n byte INT32 = (byte) 'I'; // kInt32\n byte UINT32 = (byte) 'U'; // kUint32\n byte DOUBLE = (byte) 'N'; // kDouble\n byte BIG_INT = (byte) 'Z'; // kBigInt\n byte UTF8_STRING = (byte) 'S'; // kUtf8String\n byte ONE_BYTE_STRING = (byte) '\"'; // kOneByteString\n byte TWO_BYTE_STRING = (byte) 'c'; // kTwoByteString\n byte PADDING = (byte) '\\0'; // kPadding\n byte DATE = (byte) 'D'; // kDate\n byte THE_HOLE = (byte) '-'; // kTheHole\n byte OBJECT_REFERENCE = (byte) '^'; // kObjectReference\n byte HOST_OBJECT = (byte) '\\\\'; // kHostObject\n}", "@Override\n public void preprocess() {\n }", "public static void main(String[] args) {\n\t\tInteger i =new Integer(10);\r\n\t\tInteger i1=new Integer(\"10\");\r\n\t\tSystem.out.println(\" \" +i+ +i1);\r\n\t\tBoolean b= new Boolean(true);\r\n\t\tBoolean b1 =new Boolean(\"true\");\r\n\t\tSystem.out.println( b +\"\"+b1);\r\n\t\tint iii=new Integer(10);//Auto-unboxing\r\nInteger iiiii =10;//Auto-boxing\r\n\r\n\t}", "public void quickBoxIfNecessary(ClassNode type, MethodVisitor mv) {\n String descr = getTypeDescription(type);\n if (type == boolean_TYPE) {\n boxBoolean(mv);\n } else if (isPrimitiveType(type) && type != VOID_TYPE) {\n ClassNode wrapper = TypeUtil.wrapSafely(type);\n String internName = getClassInternalName(wrapper);\n mv.visitTypeInsn(Opcodes.NEW, internName);\n mv.visitInsn(Opcodes.DUP);\n if (type == double_TYPE || type == long_TYPE) {\n mv.visitInsn(Opcodes.DUP2_X2);\n mv.visitInsn(Opcodes.POP2);\n } else {\n mv.visitInsn(Opcodes.DUP2_X1);\n mv.visitInsn(Opcodes.POP2);\n }\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, internName, \"<init>\", \"(\" + descr + \")V\");\n }\n }", "public PrimObject primitive352(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value > argValue);\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) > aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\">\", rightOperand);\n }\n }", "@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}", "public Object getRawValue();", "public static void main(String[] args) {\n\t\tint a = 100;\n\t\tInteger b = a;//autoboxing\n\t\tint c=b.intValue();//unboxing\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(b);\n\t\tSystem.out.println(c);\n\t}", "public static void main(String[] args) {\n\n Integer num1 = 100;\n double num2 = num1;\n System.out.println(num2);\n\n float f = 0.5f;\n Float fl = f;\n System.out.println(fl);\n\n System.out.println(Byte.MAX_VALUE);\n\n // parse method --> converting String value to primitives, returne primitive\n // valueOf --> converting String to Wrapper class, return Wrapper class\n\n String str1 = \"123\";\n int result = Integer.parseInt(str1);\n System.out.println(result+1);\n\n String str2 = \"true\";\n boolean r1 = Boolean.parseBoolean(str2);\n System.out.println(r1);\n\n // parse method not case sencetive\n String str3 = \"FaLse\"; // it is work\n boolean r2 = Boolean.parseBoolean(str3);\n System.out.println(r2);\n\n String s1 = \"100.5\";\n Double c1 = Double.parseDouble(s1);\n System.out.println(c1 + 1); // it is call auto boxing\n Double c2 = Double.valueOf(s1); // this in not auto and not unboxing\n\n System.out.println(c1);\n System.out.println(c2);\n\n String s2 = \"TrUe\";\n Boolean b1 = Boolean.valueOf(s2);\n System.out.println(b1); // no sensetive\n\n Double [] arr = new Double[3];\n System.out.println(Arrays.toString(arr));\n // default value of wrapper class always --> null, null, null\n\n String name = \"string\";\n String name1 = new String(\"string\");\n\n Integer I1 = new Integer(\"123\");\n\n System.out.println(addNum(12,13));\n System.out.println(addNum(15.3,7.4));\n \n }", "@Test\n\tpublic void testPrimitives() throws Exception {\n\t\ttestWith(TestClassWithPrimitives.getInstance());\n\t}", "public PrimObject primitive350(PrimContext context) {\n final Integer value = (Integer) this.javaValue;\n final PrimObject argument = context.argumentAt(0);\n final PrimClass argClass = argument.selfClass();\n if (argClass.equals(resolveObject(\"Integer\"))) {\n Integer argValue = (Integer) context.argumentJavaValueAt(0);\n return smalltalkBoolean(value < argValue);\n }\n else {\n //Converet types using next smalltalk code:\n // <code> (aNumber adaptInteger: self) < aNumber adaptToInteger </code>\n PrimObject leftOperand = argument.perform0(\"adaptInteger\", this);\n PrimObject rightOperand = argument.perform0(\"adaptInteger\");\n return leftOperand.perform0(\"<\", rightOperand);\n }\n }", "public PrimitiveType getPrimitiveType();", "public static void main(String[] args) {\n\t\t\n\t\tbyte b1 = 12;\n\t\tshort s1 = b1;\n\t\tint i1 = b1;\n\t\tfloat f1 = b1;\n\t\t\n\t\t/*\n\t\t byte < short < int < long < float < double\n\t\n\t\t Buyuk data type'larini kucuk data type'larina cevrime isini Java otomatik olarak yapmaz.\n\t\t Bu cevirmeyi biz asagidaki gibi kod yazarak yapariz. Bunun ismi \"Explicit Narrowing Casting\" dir\n\t \n\t\t */\n\t\t\n\t\tshort s2 = 1210; \n\t\tbyte b2 = (byte)s2;\n\t\t\n\t}", "IntegerValue getValueObject();", "public T casePrimitiveDefinition(PrimitiveDefinition object)\n {\n return null;\n }", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "PRE createPRE();", "void post(Post post) {\n if (post instanceof Video) {\n vd.compressVideo((Video) post);\n } else if (post instanceof Image) {\n id.decorateImage((Image) post);\n } else if (post instanceof Text) {\n tg.checkGrammar((Text) post);\n }\n }", "private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }", "@Override\r\n\tpublic Value interpret() {\n\t\treturn null;\r\n\t}", "@Test\r\n public void testIsPrimitiveOrWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveOrWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveOrWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveOrWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveOrWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveOrWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveOrWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveOrWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveOrWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertTrue(\"boolean\", Classes.isPrimitiveOrWrapper(Boolean.TYPE));\r\n assertTrue(\"byte\", Classes.isPrimitiveOrWrapper(Byte.TYPE));\r\n assertTrue(\"char\", Classes.isPrimitiveOrWrapper(Character.TYPE));\r\n assertTrue(\"short\", Classes.isPrimitiveOrWrapper(Short.TYPE));\r\n assertTrue(\"int\", Classes.isPrimitiveOrWrapper(Integer.TYPE));\r\n assertTrue(\"long\", Classes.isPrimitiveOrWrapper(Long.TYPE));\r\n assertTrue(\"double\", Classes.isPrimitiveOrWrapper(Double.TYPE));\r\n assertTrue(\"float\", Classes.isPrimitiveOrWrapper(Float.TYPE));\r\n assertTrue(\"Void.TYPE\", Classes.isPrimitiveOrWrapper(Void.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveOrWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveOrWrapper(Void.class));\r\n assertFalse(\"String.class\", Classes.isPrimitiveOrWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveOrWrapper(this.getClass()));\r\n }", "boolean hasPrimitive();", "public PrimitivePropertyTest(String testName)\n {\n super(testName);\n }", "public static void main (String[] args){\n\n ArrayList<Integer> studentNumbers1 = new ArrayList<>();\n studentNumbers1.add(25);\n System.out.println(studentNumbers1.get(0)); // <- unboxing\n /**\n * solution 2 : create custom wrapper class - intWrapper\n */\n ArrayList<intWrapper> studentNumbers2 = new ArrayList<>();\n /**\n * studentNumbers2.add(12); <- Autoboxing\n * java is automatically boxing primitive data type to Object\n * error : intWrapper class does not have any add function so, we can do \"Boxing\" in the parameter\n * with create new object with int value\n */\n studentNumbers2.add(new intWrapper(12)); // <- Boxing\n System.out.println(studentNumbers2.get(0).getIntValue()); // <-Unboxing\n\n\n /**\n * Autoboxing testing with Double\n */\n ArrayList<Double> demoList = new ArrayList<>();\n demoList.add(25.5);\n demoList.add(new Double(25.2));\n /**\n * Java compiler convert the code like below.\n * Below command is done while autoboxing\n */\n demoList.add(Double.valueOf(10.3));\n System.out.println(demoList.get(0)); // <-Autoboxing\n System.out.println(demoList.get(0).doubleValue()); // <- command is done while autoboxing\n\n }", "int mo16689b(T t);", "protected boolean isPrimitiveObject(Object object) {\r\n return PropertyType.PRIMITIVE.equals(determinePropertyType(object));\r\n }", "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "void typePromition(int a, long b){\n\t\tSystem.out.println(\"Method-5 (TypePromotion) Result is: \" + (a+b));\n\t}", "public void testAssertPropertyReflectionEquals_equalsPrimitive() {\r\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\r\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "public void preprocess() {\n }", "@Override\n public boolean ll_isPrimitiveType(int typeCode) {\n return !ll_isRefType(typeCode);\n }", "public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }", "@Override\n public Object preProcess() {\n return null;\n }", "public PrimObject primitive110(PrimContext context) {\n if (this.equals(context.argumentAt(0)))\n return classLoader().trueInstance();\n else\n return classLoader().falseInstance();\n }", "@Test\n void shouldReturnPrimitiveTypeOnly() {\n assertThat(TypeVisitor.gatherAllTypes(int.class), contains(int.class));\n assertThat(TypeVisitor.gatherAllTypes(double.class), contains(double.class));\n assertThat(TypeVisitor.gatherAllTypes(char.class), contains(char.class));\n }", "@Override\n public void preMathTypeDec(MathTypeDec data) {\n super.preMathTypeDec(data);\n }", "public static void main(String[] args) {\n\t\tbyte datoByte = 2; // Primitivo\n\t\tByte datoByteWrapper = 3; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoByte);\n\t\tSystem.out.println(\"Wrapper: \" + datoByteWrapper);\n\t\t// Conversiones\n\t\tbyte datoByte1 = 5;\n\t\tByte datoConvertido = datoByte1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoConvertido);\n\t\t// Conversiones 2\n\t\tByte datoConvertido1 = 6;\n\t\tbyte datoByte2 = datoConvertido1.byteValue();\n\t\tSystem.out.println(\"Dato Byte: \" + datoConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// short\n\t\tshort datoShort = 1; // Primitivo\n\t\tShort datoShortWrapper = 1; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + datoShort);\n\t\tSystem.out.println(\"Wrapper: \" + datoShortWrapper);\n\t\t// Conversiones\n\t\tshort datoShort1 = 4;\n\t\tShort shortConvertido = datoShort1;\n\t\tSystem.out.println(\"Dato Convertido: \" + datoShort1);\n\t\t// Conversiones 2\n\t\tShort shortConvertido1 = 6;\n\t\tshort datoShort2 = shortConvertido1.shortValue();\n\t\tSystem.out.println(\"Dato Short: \" + shortConvertido1);\n\t\tSystem.out.println();\n\n\t\t// int\n\t\tint edad = 45; // Primitivo\n\t\tInteger edadWrapper = 48; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + edad);\n\t\tSystem.out.println(\"Wrapper: \" + edadWrapper);\n\t\t// Conversiones\n\t\tint edad1 = 4;\n\t\tInteger integerConvertido = edad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + edad1);\n\t\t// Conversiones 2\n\t\tInteger integerConvertido1 = 6;\n\t\tint edad2 = integerConvertido1.intValue();\n\t\tSystem.out.println(\"Int Convertido: \" + integerConvertido1);\n\t\tSystem.out.println();\n\t\t\n\t\t// long\n\t\tlong valorGrande = 12321; // Primitivo\n\t\tLong valorGrandeWrapper = 123123L; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorGrande);\n\t\tSystem.out.println(\"Wrapper: \" + valorGrandeWrapper);\n\t\t// Conversiones\n\t\tlong valorGrande1 = 4;\n\t\tLong longConvertido = valorGrande1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorGrande1);\n\t\t// Conversiones 2\n\t\tLong longConvertido1 = 23423L;\n\t\tlong valorGrande2 = longConvertido1.longValue();\n\t\tSystem.out.println(\"Int Convertido: \" + longConvertido1);\n\t\tSystem.out.println();\n\n\t\t// boolean\n\t\tboolean valorVerdad = true; // Primitivo\n\t\tBoolean valorVerdadWrapper = false; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorVerdad);\n\t\tSystem.out.println(\"Wrapper: \" + valorVerdadWrapper);\n\t\t// Conversiones\n\t\tboolean valorVerdad1 = true;\n\t\tBoolean booleanConvertido = valorVerdad1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorVerdad1);\n\t\t// Conversiones 2\n\t\tBoolean booleanConvertido1 = false;\n\t\tboolean valorVerdad2 = booleanConvertido1.booleanValue();\n\t\tSystem.out.println(\"Int Convertido: \" + booleanConvertido1);\n\t\tSystem.out.println();\n\n\t\t// float\n\t\tfloat valor = 1; // Primitivo\n\t\tFloat valorWrapper = 9F; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valor);\n\t\tSystem.out.println(\"Wrapper: \" + valorWrapper);\n\t\t// Conversiones\n\t\tfloat valor1 = 23;\n\t\tFloat floatConvertido = valor1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valor1);\n\t\t// Conversiones 2\n\t\tFloat floatConvertido1 = 65F;\n\t\tfloat valor2 = floatConvertido1.floatValue();\n\t\tSystem.out.println(\"Int Convertido: \" + floatConvertido1);\n\t\tSystem.out.println();\n\n\t\t// double\n\t\tdouble valorDecimal = 12.34; // Primitivo\n\t\tDouble valorDecimalWrapper = 34.78; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + valorDecimal);\n\t\tSystem.out.println(\"Wrapper: \" + valorDecimalWrapper);\n\t\t// Conversiones\n\t\tdouble valorDecimal1 = 23.65;\n\t\tDouble doubleConvertido = valorDecimal1;\n\t\tSystem.out.println(\"Dato Convertido: \" + valorDecimal1);\n\t\t// Conversiones 2\n\t\tDouble doubleConvertido1 = 65.78;\n\t\tdouble valorDecimal2 = doubleConvertido1.doubleValue();\n\t\tSystem.out.println(\"Int Convertido: \" + doubleConvertido1);\n\t\tSystem.out.println();\n\n\t\t// char\n\t\tchar letraAlfabeto = 'J'; // Primitivo\n\t\tCharacter letraAlfabetoWrapper = 'C'; // Wrapper\n\t\tSystem.out.println(\"Primitivo: \" + letraAlfabeto);\n\t\tSystem.out.println(\"Wrapper: \" + letraAlfabetoWrapper);\n\t\t// Conversiones\n\t\tchar letraAlfabeto1 = 'F';\n\t\tCharacter charConvertido = letraAlfabeto1;\n\t\tSystem.out.println(\"Dato Convertido: \" + letraAlfabeto1);\n\t\t// Conversiones 2\n\t\tCharacter charConvertido1 = 'R';\n\t\tchar letraAlfabeto2 = charConvertido1.charValue();\n\t\tSystem.out.println(\"Int Convertido: \" + charConvertido1);\n\n\t}", "@Test\n public void shouldIncludeValuesFromFieldWithBinaryDocValues() {\n }", "@Test\n void testAssertPropertyReflectionEquals_equalsPrimitive() {\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\n }", "void visitRealValue(RealValue value);", "public abstract ValueType getValueType();", "@Test\r\n public void testIsPrimitiveWrapper() {\n assertTrue(\"Boolean.class\", Classes.isPrimitiveWrapper(Boolean.class));\r\n assertTrue(\"Byte.class\", Classes.isPrimitiveWrapper(Byte.class));\r\n assertTrue(\"Character.class\", Classes.isPrimitiveWrapper(Character.class));\r\n assertTrue(\"Short.class\", Classes.isPrimitiveWrapper(Short.class));\r\n assertTrue(\"Integer.class\", Classes.isPrimitiveWrapper(Integer.class));\r\n assertTrue(\"Long.class\", Classes.isPrimitiveWrapper(Long.class));\r\n assertTrue(\"Double.class\", Classes.isPrimitiveWrapper(Double.class));\r\n assertTrue(\"Float.class\", Classes.isPrimitiveWrapper(Float.class));\r\n \r\n // test primitive classes\r\n assertFalse(\"boolean\", Classes.isPrimitiveWrapper(Boolean.TYPE));\r\n assertFalse(\"byte\", Classes.isPrimitiveWrapper(Byte.TYPE));\r\n assertFalse(\"char\", Classes.isPrimitiveWrapper(Character.TYPE));\r\n assertFalse(\"short\", Classes.isPrimitiveWrapper(Short.TYPE));\r\n assertFalse(\"int\", Classes.isPrimitiveWrapper(Integer.TYPE));\r\n assertFalse(\"long\", Classes.isPrimitiveWrapper(Long.TYPE));\r\n assertFalse(\"double\", Classes.isPrimitiveWrapper(Double.TYPE));\r\n assertFalse(\"float\", Classes.isPrimitiveWrapper(Float.TYPE));\r\n \r\n // others\r\n assertFalse(\"null\", Classes.isPrimitiveWrapper(null));\r\n assertFalse(\"Void.class\", Classes.isPrimitiveWrapper(Void.class));\r\n assertFalse(\"Void.TYPE\", Classes.isPrimitiveWrapper(Void.TYPE));\r\n assertFalse(\"String.class\", Classes.isPrimitiveWrapper(String.class));\r\n assertFalse(\"this.getClass()\", Classes.isPrimitiveWrapper(this.getClass()));\r\n }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tbyte b=3;\n\t\tshort s=34;\n\t\tint i=125;\n\t\t\n\t}", "public void addToPrimitive(int add) {\n primitiveCounter += add;\n }", "public interface ValueProcessor {\n public void process(Object original, String type, String value);\n }", "public void process(Object value) {\n\t\t//empty\n\t}", "public ScalarType copyValue();", "public static void main(String[] args) {\n\n Box<Integer> boxWithIntegers = new Box<>();\n boxWithIntegers.set(9);\n\n Box<Double> boxWithDoubles = new Box<>();\n boxWithDoubles.set(9.0);\n\n }", "public PrimObject primitive111(PrimContext context) {\n return this.selfClass();\n }", "public boolean isPrimitive(Class paramClass) {\n/* 113 */ if (paramClass == null) {\n/* 114 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 117 */ return paramClass.isPrimitive();\n/* */ }", "private static void increasePrimitive(int value) {\n value++;\n }", "public TypeNativePrimitiveObjectWrapperRuntimeImpl(TypeNativePrimitiveObjectWrapperImpl typeDec,Class javaClass,boolean isPrimary,RuntimeContext ctx)\n {\n super(typeDec,javaClass,isPrimary,ctx);\n }", "@Override\n\tprotected void generatePrimitives(SoAction action) {\n\n\t}", "public Object objectValue();", "public interface ScalarType extends java.io.Serializable\n{\n /** create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want \n scalars of your scalar type to be passed by reference. */\n public ScalarType copyValue(); \n\n /** convert the scalar to an int */\n public int intValue();\n\n /** convert the scalar to a long */\n public long longValue();\n\n /** convert the scalar to a double */\n public double doubleValue();\n\n /** convert the scalar to a string */\n public String toString();\n\n /** convert the scalar to an object value *shrug* */\n public Object objectValue();\n\n /** returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking\n functionality */\n public Class getType();\n}", "public abstract Object adjust(Object value, T type);", "public T casePreprocess(Preprocess object)\n\t{\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n int numero=10;\n //Objetos\n Integer entero = numero;\n //literal entera para hacer calculos\n System.out.println(\"entero = \" + entero);\n //literal entera como cadena de texto\n System.out.println(\"entero = \" + entero.toString());\n //conversion a double\n System.out.println(\"entero double = \" + entero.doubleValue());\n\n //UnBoxing(de Object a primitivo)\n \n //Variables\n int entero2 = entero;\n System.out.println(\"entero2 = \" + entero2);\n }", "void mo16691c(T t);", "PrimitiveType createPrimitiveType();", "public static void main(String[] args) {\n \n int entero=10;\n Integer entero2=20;\n System.out.println(\"entero2 = \" + entero2);\n System.out.println(\"entero2 = \" + entero2.toString());\n System.out.println(\"entero2 = \" + entero2.doubleValue());\n \n int entero3=entero2;//unboxing, se recupera el valor de entero2\n System.out.println(\"entero3 = \" + entero3);\n }", "private static native void PeiLinNormalization_0(long I_nativeObj, long T_nativeObj);", "public final JavaliParser.primitiveType_return primitiveType() throws RecognitionException {\n\t\tJavaliParser.primitiveType_return retval = new JavaliParser.primitiveType_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken tok=null;\n\n\t\tObject tok_tree=null;\n\t\tRewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,\"token 92\");\n\t\tRewriteRuleTokenStream stream_90=new RewriteRuleTokenStream(adaptor,\"token 90\");\n\t\tRewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:2: (tok= 'int' -> Identifier[$tok, $tok.text] |tok= 'float' -> Identifier[$tok, $tok.text] |tok= 'boolean' -> Identifier[$tok, $tok.text] )\n\t\t\tint alt40=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\talt40=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\talt40=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\talt40=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 40, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt40) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:4: tok= 'int'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,92,FOLLOW_92_in_primitiveType2636); \n\t\t\t\t\tstream_92.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 562:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:563:5: tok= 'float'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,90,FOLLOW_90_in_primitiveType2651); \n\t\t\t\t\tstream_90.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 564:7: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:565:4: tok= 'boolean'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,86,FOLLOW_86_in_primitiveType2669); \n\t\t\t\t\tstream_86.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 566:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}" ]
[ "0.61249393", "0.59469455", "0.57614076", "0.57416904", "0.5685847", "0.567158", "0.5652791", "0.56463534", "0.5633164", "0.56253844", "0.5594358", "0.5493579", "0.53920025", "0.5385012", "0.5346848", "0.5330347", "0.53291154", "0.53257596", "0.53145176", "0.53111845", "0.52962595", "0.5288179", "0.527092", "0.52591974", "0.52587545", "0.52549195", "0.52453953", "0.5230739", "0.52053297", "0.5201168", "0.51597935", "0.51521087", "0.51489776", "0.51472664", "0.51375294", "0.5134421", "0.5130604", "0.51302296", "0.51223457", "0.5115044", "0.510484", "0.5101601", "0.5096385", "0.5081966", "0.5078783", "0.50749135", "0.5069802", "0.506568", "0.5054603", "0.50471836", "0.5029467", "0.50223076", "0.5010423", "0.5000668", "0.49890333", "0.49833745", "0.49541774", "0.49410528", "0.49403504", "0.49387738", "0.49340695", "0.4922142", "0.49193525", "0.49148396", "0.49148396", "0.49148396", "0.49148396", "0.49133164", "0.49101526", "0.4907401", "0.4894176", "0.48901674", "0.48876873", "0.48866832", "0.48556992", "0.48527855", "0.4849314", "0.48388138", "0.48348677", "0.4829367", "0.4818927", "0.481702", "0.4814033", "0.48100924", "0.48093516", "0.48000014", "0.47925898", "0.47879717", "0.47878835", "0.47837475", "0.47828785", "0.47801822", "0.47782227", "0.4776243", "0.47761226", "0.4772875", "0.47681502", "0.4766594", "0.4765305", "0.4763401", "0.4761189" ]
0.0
-1
Add new Users to Database
@Before public void fillSomeDataIntoOurDb() { entityManager.persist(ago); entityManager.persist(teacherAgo); entityManager.persist(agoSubject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public void insertUser() {}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "void add(User user) throws SQLException;", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"ram@gmail.com\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"seth@gmail.com\", 50), new User(\"Sita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"ganesh@gmail.com\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"kiran@gmail.com\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"ram@gmail.com\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"sita@gmail.com\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"seth@gmail.com\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"lakshman@gmail.com\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"ganesh@gmail.com\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "public int addUser(Users users);", "private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}", "private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }", "void addUser(User user);", "void addUser(User user);", "public void addUser() {\n\t\tthis.users++;\n\t}", "public void addUser(User user);", "public void newUser(User user) {\n users.add(user);\n }", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }", "public void addUser(UserModel user);", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void addusers(User user){\n SQLiteDatabase db = this.getReadableDatabase();\n ContentValues values=new ContentValues();\n\n values.put(KEY_NAME, user.getName());\n values.put(KEY_PASS,user.getPasscode());\n values.put(KEY_PHOTO, user.getImage() );\n\n\n db.insert(TABLE_USERS, null, values);\n db.close();\n }", "public void addUser(IndividualUser u) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Users (userName, firstName, lastName, friends) VALUES (?,?,?,?);\");\n s.setString(1, u.getId());\n s.setString(2, u.getFirstName());\n s.setString(3, u.getLastName());\n s.setString(4, u.getFriends().toString());\n s.execute();\n s.close();\n\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\n\tpublic String createUser(User users) {\n\t\tuserRepository.save(users);\n\t\treturn \"Save Successful\";\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public void addUser(User user) {\n\t\t\r\n\t}", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public void insert(User user);", "void registerUser(User newUser);", "public void saveNewUser(String username) {\r\n\r\n\t\ttry {\r\n\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t statement.executeUpdate(\"insert into users values(null, '\" + username + \"')\");\r\n\t\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t // if the error message is \"out of memory\", \r\n\t // it probably means no database file is found\r\n\t System.err.println(e.getMessage());\r\n\t \r\n\t }\r\n\r\n\t}", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public void addUser(User user) {\n try (PreparedStatement pst = this.conn.prepareStatement(\"INSERT INTO users (name, login, email, createDate)\"\n + \"VALUES (?, ?, ?, ?)\")) {\n pst.setString(1, user.getName());\n pst.setString(2, user.getLogin());\n pst.setString(3, user.getEmail());\n pst.setTimestamp(4, user.getCreateDate());\n pst.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public boolean addNewUser(UserDetails ud) {\n try {\n con = (Connection) DriverManager.getConnection(url, this.usernamel, this.passwordl);\n String query = \"INSERT INTO user VALUES(?,?,?,?,?,?,?,?)\";\n pst = (com.mysql.jdbc.PreparedStatement) con.prepareStatement(query);\n pst.setInt(1, ud.getEmpID());\n pst.setString(2, ud.getEmployeeType());\n pst.setString(3, ud.getName());\n pst.setString(4, ud.getAddress());\n pst.setInt(5, ud.getMobile());\n pst.setString(6, ud.getNic());\n pst.setString(7, ud.getUsername());\n pst.setString(8, ud.getPassword());\n pst.executeUpdate();\n return true;\n } catch (Exception ex) {\n //System.out.print(ex);\n return false;\n } finally {\n try {\n if (pst != null) {\n pst.close();\n }\n if (con != null) {\n con.close();\n }\n } catch (Exception e) {\n }\n }\n }", "public void addNewUser(User user) throws SQLException {\n PreparedStatement pr = connection.prepareStatement(Queries.insertNewUser);\n pr.setString(1, user.getUserFullName());\n pr.setString(2, user.getUserEmail());\n pr.setInt(3, user.getPhoneNumber());\n pr.setString(4, user.getUserLoginName());\n pr.setString(5, user.getUserPassword());\n pr.execute();\n pr.close();\n }", "public void create(Users users) {\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n session.save(users);\n transaction.commit();\n } catch (HibernateException e) {\n e.getMessage();\n transaction.rollback();\n } finally {\n session.close();\n }\n }", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "public void addUser(User user){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(USER_NAME,user.getName());\n values.put(USER_PASSWORD,user.getPassword());\n db.insert(TABLE_USER,null,values);\n db.close();\n }", "public void registerUser(User newUser) {\r\n userRepo.save(newUser);\r\n }", "void addNewUser(User user, int roleId) throws DAOException;", "public int insertUser(User newUser) {\r\n\r\n try {\r\n BusTrackerDB = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(\"username\", newUser.getUsername());\r\n values.put(\"password\", newUser.getPassword());\r\n\r\n BusTrackerDB.insert(\"user\", null, values);\r\n } catch (SQLiteException e) { return 0; }\r\n\r\n BusTrackerDB.close();\r\n\r\n return 1;\r\n }", "public int insertUser(final User user);", "public void addUserData(HttpServletRequest request) {\n\n String userName = request.getParameter(\"userName\");\n String password = request.getParameter(\"userPassword\");\n String address = request.getParameter(\"userAddress\");\n String phone = request.getParameter(\"userPhone\");\n String email = request.getParameter(\"userEmail\");\n\n userDao = new UserDao();\n //user = new User(0, userName, password, address, phone, email);\n //userDao.addUser(user);\n\n log.info(user.toString());\n }", "private static void saveNewUserTest(Connection conn) {\n\n\t\tUser user1 = new User();\n\t\tuser1.setUsername(\"john\");\n\t\tuser1.setPassword(\"123\");\n\t\tuser1.setEmail(\"john@wp.pl\");\n\t\ttry {\n\t\t\tuser1.saveToDB(conn);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void addUser(String name,String password) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_USERNAME, name); // UserName\n values.put(KEY_PASSWORD,password);\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n //db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}", "public boolean addUsers(List<User> users);", "public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }", "public void createUser(User user) {\n\n\t}", "@Override public void registerNewUser(String username, String password)\r\n throws RemoteException, SQLException {\r\n gameListClientModel.registerNewUser(username, password);\r\n }", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "private void setupUsersInRoomDB() {\n Log.d(TAG, \"setupUsersInRoomDB: start to setup list of 200 user\");\n userList = new ArrayList<>();\n int j = 0;\n for (int i = 0; i < 200; i++) {\n switch (j) {\n case 0:\n Log.d(TAG, \"setupUsersInRoomDB: case 0 set the user with image one\");\n userList.add(new User(\"user\" + i, getImageOne()));\n j++;\n break;\n case 1:\n userList.add(new User(\"user\" + i, getImageTwo()));\n j++;\n break;\n case 2:\n userList.add(new User(\"user\" + i, getImageThree()));\n j = 0;\n break;\n }\n }\n\n db.userDao().insertListOfUser(userList);\n Log.d(TAG, \"setupUsersInRoomDB: insert list of users in room database\");\n Shared.sharedSave(MainActivity.this, \"usersdb\", USERS_EXIST);\n Toast.makeText(getApplicationContext(), \"finish set database\", Toast.LENGTH_LONG).show();\n }", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "boolean addUser(int employeeId, String name, String password, String role);", "public Boolean addUser(User user) throws ApplicationException;", "public void addUser(User user) {\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(UserDBHelper.COLUMN_NAME, user.getName());\n values.put(UserDBHelper.COLUMN_SURNAME, user.getSurname());\n values.put(UserDBHelper.COLUMN_EMAIL, user.getEmail());\n values.put(UserDBHelper.COLUMN_PASS, user.getPass());\n db.insert(UserDBHelper.TABLE_NAME, \"\", values); // Prevent from -1 exception\n db.close();\n }", "public void buildUsers() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS users (id TEXT, name TEXT,\"\n + \" cell TEXT, password INT, stripe_id TEXT, url TEXT,\"\n + \" PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "private void addUserToDatabase( DatabaseReference postRef) {\n\n // check username, password cannot be null and may not have spaces\n final String usernameChecked = checkNullString(usernameText.getText().toString());\n final String password = checkNullString(passwordText.getText().toString());\n final String confirmPassword = checkNullString(confirmPasswordText.getText().toString());\n\n if (usernameChecked == null || password == null) {\n Toast.makeText(this, \"Entries may not be null, and may not have spaces!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (!password.equals(confirmPassword)){\n Toast.makeText(this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (users.contains(usernameChecked)){\n Toast.makeText(this, \"Username is already taken\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // initialize data for SentCount\n postRef\n .child(\"Users\")\n .child(usernameChecked)\n .runTransaction(new Transaction.Handler() {\n\n @NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData currentData) {\n User newUser = new User(usernameChecked, password);\n currentData.setValue(newUser);\n return Transaction.success(currentData);\n }\n\n @Override\n public void onComplete(@Nullable DatabaseError error, boolean committed,\n @Nullable DataSnapshot currentData) {\n Log.d(TAG, \"postTransaction:onComplete:\" + currentData);\n Toast.makeText(getApplicationContext(), \"Sign up successful!\", Toast.LENGTH_LONG);\n finish();\n }\n });\n }", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "private void writeNewUser(String userId, String name, String email) {\n User user = new User(name, email);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Name\").setValue(name);\n\n mDatabase.child(\"users\")\n .child(userId)\n .child(\"Email\").setValue(email);\n\n\n }", "@PostMapping(\"/users\")\n public UsersResponse createNewUser(@RequestBody NewUserRequest request) {\n User user = new User();\n user.setName(request.getName());\n user.setAge(request.getAge());\n user = userRepository.save(user);\n return new UsersResponse(user.getId(), user.getName() + user.getAge());\n }", "public void createUser(User user);", "public void insertNewUser(String username, String password, String emailAddress) {\r\n\t\tConnection c = getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ptsmt = (PreparedStatement)c.prepareStatement(\"INSERT INTO user(userName, password, emailAddress) VALUES (?, ?, ?)\");\r\n\t\t\tptsmt.setString(1, username );\r\n\t\t\tptsmt.setString(2,password );\r\n\t\t\tptsmt.setString(3, emailAddress);\r\n\t\t\tptsmt.execute();\r\n\t\t\t\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "@Override\n\tpublic int insertUser(String username, String password) {\n\t\treturn userMapper.insertUser(username, password);\n\t}", "@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }", "public void insertUsers(User user){\n Tag Tag=null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.COLUMN_NAME3,user.getUsername());\n values.put(databaseValues.COLUMN_NAME1,user.getName());\n values.put(databaseValues.COLUMN_NAME2,user.getSurname());\n values.put(databaseValues.COLUMN_NAME4,user.getPassword());\n values.put(databaseValues.COLUMN_NAME5,user.getConfirmPassword());\n Log.e(String.valueOf(Tag), user.getName());\n Log.e(String.valueOf(Tag), user.getSurname());\n Log.e(String.valueOf(Tag), user.getUsername());\n Log.e(String.valueOf(Tag), user.getPassword());\n Log.e(String.valueOf(Tag), user.getConfirmPassword());\n db.insert(databaseValues.TABLE_NAME, null, values);\n db.close();\n }", "void addUser(Username username) throws UserAlreadyExistsException;", "public UserRegister(String userFirstName, String userLastName, String userEmail, String userPhoneNo, String userName, String userPassword) throws Exception { \r\n\t\t//super(userName, userPassword);\r\n\t\t// add new user to database\r\n\t\ttry {\r\n\t\tString str = \"INSERT INTO tblusers (userName,userPassword, userFirstName, userLastName, userEmail, userPhoneNo, userDateJoined)\" + \r\n\t\t\t\t\"VALUES ('\" + userName + \"', '\" + userPassword + \"', '\" + userFirstName + \"', '\" + userLastName + \"',\" + \r\n\t\t\t\t\" '\" + userEmail + \"', '\" + userPhoneNo + \"', NOW() );\";\r\n\t\tDBConnect.runUpdateQuery(str);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t\t//System.out.println(e.toString());\r\n\t\t}\r\n\r\n\t}", "public void addUser(String name, String email, String uid, String created_at,String address,String number) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, name); // Name\n values.put(KEY_EMAIL, email); // Email\n values.put(KEY_UID, uid); // Email\n values.put(KEY_CREATED_AT, created_at); // Created At\n values.put(KEY_ADDRESS, address);\n values.put(KEY_NUMBER, number);\n\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public void addData(String User, String password) throws SQLException\n {\n }", "Boolean registerNewUser(User user);", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "public boolean addUser(User newUser) {\n boolean addResult = false;\n\tString sql = \"INSERT INTO users\"\n + \"(user_name, hashed_password, email, hashed_answer, is_activated, pubkey) VALUES\"\n + \"(? , ? , ? , ? , ?, ?)\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, newUser.getUserName());\n this.statement.setString(2, newUser.getHashedPassword());\n this.statement.setString(3, newUser.getEmail()); \n this.statement.setString(4, newUser.getHashedAnswer()); \n this.statement.setInt(5, newUser.getIsActivated()); \n this.statement.setString(6, \"\");\n this.statement.executeUpdate();\n addResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return addResult; \n }", "@Override\n\tpublic void insert(UsersDto dto) {\n\t\tsession.insert(\"users.insert\", dto);\n\t}", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "@GetMapping(\"/addUser\")\n public String home() {\n User user = new User();\n user.setUserName(\"Gitika\");\n user.setPassword(passwordEncoder.encode(\"saurabh321\"));\n user.setActive(true);\n user.setRoles(\"Role_Admin\");\n userRepository.save(user);\n return \"User created successfully\";\n }", "public static boolean addUser(UserDetails newUser){\n\t\t\t\t\t\t\n\t\t//getting attributes of UserDetails class with relevant data\n\t\t int id = newUser.getId();\n\t\t String name = newUser.getName(); \n\t\t String email = newUser.getEmail();\n\t\t String address = newUser.getAddress();\n\t\t String phone = newUser.getPhone(); \n\t\t String username = newUser.getUsername(); \n\t\t String password = newUser.getPassword();\n\t\t\t\n\t\ttry {\n\t\t\n\t\t\t //connecting to DB\n\t\t c = DatabaseConnection.getConnection();\n\t\t\t stmt = c.createStatement();\n\t\t\t String sqlStatement = \"insert into user values('\"+id+\"','\"+name+\"','\"+email+\"','\"+address+\"','\"+phone+\"','\"+username+\"','\"+password+\"')\";\n\t\t\t rsI = stmt.executeUpdate(sqlStatement);\n\t\t\t\t\n\t\t\t if(rsI>0) {\n\t\t\t\t status = true;\n\t\t\t }\n\t\t\t\n\t\t\t else {\n\t\t\t\t status = false;\t\n\t\t\t }\n\t\t\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\treturn status;\n\t}", "public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "public void addUser(String id, String display_name, String phone, String national_number, String country_prefix, String created_at) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(User.KEY_UID, id); // FirstName //values.put(User.KEY_FIRSTNAME, id); // FirstName\r\n values.put(\"display_name\", display_name); // LastName\r\n values.put(\"phone\", phone); // Email\r\n values.put(\"national_number\", national_number); // UserName\r\n values.put(\"country_prefix\", country_prefix); // Email\r\n values.put(User.KEY_CREATED_AT, created_at); // Created At\r\n\r\n // Inserting Row\r\n db.insert(User.TABLE_USER_NAME, null, values);\r\n db.close(); // Closing database connection\r\n }", "public void fillUsers(int totalEntries) {\n\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n storeOperations.createAccount(\"user_\" + i, \"password_\" + i, Fairy.create().person().getFirstName(), Fairy.create().person().getLastName());\n }\n }", "@Override\r\n\t@Transactional(rollbackFor=Exception.class)\r\n\tpublic int insertUser(TUsers users) {\n\t\tdao.insertUser(users);\r\n\t\tint i=10/0;\r\n\t\tdao.insertUser(users);\r\n\t\treturn users.getId();\r\n\t}", "@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}", "@Override\n\tpublic int insertUsers(User user) {\n\t\treturn userDao.insertUsers(user);\n\t}", "public static void addUser(String newUsername, String newPassword, String newFullname) {\n //local database variables\n Statement stmt = null;\n ResultSet rs = null;\n //defaulting highest id to 0\n //before new user can be added, application must know what is the curent highest id\n int highestId = 0;\n //nested query to retrieve user detials with the highest id\n String searchQuery = \"select * from users where UserId = (select max(UserId) from users)\";\n //displaying the query as a control\n System.out.println(\"Query: \" + searchQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt = currentCon.createStatement();\n rs = stmt.executeQuery(searchQuery);\n //if at least one user is present in the database,\n //result set will not be empty\n boolean more = rs.next();\n //if user found\n if (more) {\n //assigning the user id to the highest value +1\n highestId = rs.getInt(\"UserId\") + 1;\n System.out.println(\"Current highest id \" + highestId);\n //if no user found in the db, first id must be set to 1\n } else {\n highestId = 1;\n }\n\n }\n //catching exception if any and displaying the error stack trace\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n //some exception handling\n //cloaing the connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n //preparing some objects for connection \n Statement stmt2 = null;\n //since the next user's id was found\n //new user can be persisted with the username, password, and fullname passed to\n //the user controller form the web form\n //greeting will be set to the default value for each new user\n String insertQuery =\n \"insert into users values ('\" + highestId + \"','\" + newUsername + \"','\" + newPassword + \"','\" + newFullname\n + \"','This is the default greeting')\";\n //displaying the query\n System.out.println(\"Query: \" + insertQuery);\n\n try {\n //connect to DB \n currentCon = ConnectionManager.getConnection();\n stmt2 = currentCon.createStatement();\n //executing query\n stmt2.executeUpdate(insertQuery);\n\n }\n //catching exception if any\n catch (Exception ex) {\n System.out.println(\"An Exception has occurred! \" + ex);\n }\n\n //some exception handling\n //closing the databse connection\n finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (Exception e) {\n }\n rs = null;\n }\n\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) {\n }\n stmt = null;\n }\n\n if (currentCon != null) {\n try {\n currentCon.close();\n } catch (Exception e) {\n }\n\n currentCon = null;\n }\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public void registerNew(User newuser){\r\n\r\n\t\tString query=\" insert into user (email,fname,lname,phone,passord)\"\t\t\r\n\t\t\t\t+ \" values (?,?,?,?,?)\";\r\n\t\ttry \r\n\t\t{\t\t\r\n\t\t\tmyConnection = DriverManager.getConnection(db,user,password);\r\n\t\t\tPreparedStatement statement = myConnection.prepareStatement(query);\r\n\r\n\t\t\tstatement.setString(1,newuser.getEmail());\r\n\t\t\tstatement.setString(2,newuser.getfName());\r\n\t\t\tstatement.setString(3,newuser.getlName());\r\n\t\t\tstatement.setString(4,newuser.getPhone());\r\n\t\t\tstatement.setString(5,newuser.getPass());\r\n\t\t\tstatement.execute();\r\n\t\t}\r\n\t\tcatch (SQLException e )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"something went wrong writting to DB\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}" ]
[ "0.7682193", "0.7596417", "0.7500842", "0.7423641", "0.7353942", "0.7350971", "0.7289702", "0.7249748", "0.72043157", "0.7181923", "0.712002", "0.70132464", "0.6982739", "0.6982739", "0.69772", "0.69242", "0.6922169", "0.69152594", "0.69060683", "0.68772477", "0.6865801", "0.68449277", "0.68385196", "0.68221146", "0.6817893", "0.67967343", "0.6777306", "0.67577136", "0.6756901", "0.67528486", "0.67462057", "0.67428756", "0.6739975", "0.67328614", "0.6727528", "0.6726303", "0.6724978", "0.6724688", "0.67075574", "0.6703987", "0.6700563", "0.6683824", "0.6683214", "0.6677925", "0.6666105", "0.66596293", "0.6656693", "0.66431755", "0.6640649", "0.6637763", "0.66347474", "0.66312265", "0.6630042", "0.6627085", "0.66238374", "0.66140705", "0.6610998", "0.6598887", "0.6598746", "0.65946025", "0.65861875", "0.6581358", "0.6576024", "0.6575409", "0.65741074", "0.65678144", "0.6563184", "0.6562561", "0.6555335", "0.6550362", "0.6548418", "0.65455514", "0.6542009", "0.6531812", "0.65268916", "0.6516479", "0.6502217", "0.65015864", "0.6499688", "0.6498831", "0.6493962", "0.6491915", "0.6487049", "0.6481296", "0.6475603", "0.64755857", "0.64751655", "0.6474839", "0.6472645", "0.6455412", "0.64528644", "0.6451637", "0.64476895", "0.6440421", "0.64399165", "0.64367324", "0.6433653", "0.64320767", "0.6428715", "0.64286345", "0.6425936" ]
0.0
-1
Search for specific User in Database according to username
@Test public void testFindByFirstName() throws Exception { Optional<User> user = users.findByUsername("agooniaOn"); assert user.isPresent(); assert user.get().equals(ago); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AgtUser findUserByName(String username);", "public User search_userinfo(String user_name);", "public User queryUserByUsername(String username);", "List<User> searchUsersByUsername(String username);", "public int search_userid(String user_name);", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "public User findByUserName(String username) throws Exception;", "public User getUserByUserName(String username);", "@Override\n @Query(\"SELECT u FROM User u WHERE u.login = LOWER(:username)\")\n User loadUserByUsername(@Param(\"username\") String username) throws UsernameNotFoundException;", "@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}", "User findByUsername(String username) throws UserDaoException;", "private User findByName(String username) {\r\n\t\tCriteriaBuilder cb = entityManager.getCriteriaBuilder();\r\n\t\tCriteriaQuery cq = cb.createQuery(User.class);\r\n\t\tRoot<User> user = cq.from(User.class);\r\n\t\tcq.where(user.get(User_.username).in(username));\r\n\r\n\t\tTypedQuery<User> tq = entityManager.createQuery(cq);\r\n\t\t\r\n\t\treturn tq.getSingleResult();\r\n\t}", "User findUserByUsername(String username);", "@Override\n\tpublic void findUserByUsername(String username) {\n\n\t}", "public User getSpecificUser(String username);", "@Override\n\tpublic User findByName(String username) {\n\t\treturn userDao.findByName(username);\n\t}", "@Override\r\n\tpublic User findByUsername(String username) throws SQLException {\n\t\tUserDao userDao = (UserDao) BeanFactory.getBean(\"userDao\");\r\n\t\treturn userDao.findByUsername(username);\r\n\t}", "User findByUsername(String userName);", "@Override\n\tpublic User findUserByUsername(String username) throws SQLException {\n User user = null;\n String sql = \"SELECT * FROM user WHERE username = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, username);\n \n \n ResultSet resultSet = statement.executeQuery();\n \n while (resultSet.next()) {\n String usrname = resultSet.getString(\"username\");\n String pwd = resultSet.getString(\"password\");\n \n user = new User(usrname, pwd);\n }\n \n resultSet.close();\n statement.close();\n \n return user;\n\t}", "public boolean searchUser(String username)\n\t{\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// SQL queries\n\t\t// Gets all rows from PageVisited\n\t\tString searchString = \"SELECT * FROM User WHERE username = ?\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(searchString);\n\t\t\tps.setString(1, username);\n\t\t\trs = ps.executeQuery();\n\t\t\t\n\t\t\t// If we get some result, it means we have already seen this user\n\t\t\t// return true\n\t\t\tboolean foundMatch = false;\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\tString usernameValue = rs.getString(\"username\");\n\t\t\t\tif(username.contentEquals(usernameValue))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// if we get a result with no rows, return false\n\t\t\tif(!foundMatch)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn false; \n\t}", "public User findByUsername(String username);", "public User findByUsername(String username);", "public User findByUsername(String username);", "public User findByUsername(String username);", "@Override\r\n\tpublic User findUserByUsername(String username) {\n\t\tSystem.out.println(\"aa\");\r\n\t\treturn dao.selectUserByUsername(username);\r\n\t}", "public User getUserByUsername(String username);", "public SecurityUser findByName(String username);", "List<User> findAllByUsernameContains(String username);", "public String searchName(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, name from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname, name;\n name = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n name = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n\n return name;\n }", "User findByUsername(String username);", "User findByUsername(String username);", "User findByUsername(String username);", "User findByUsername(String username);", "User findByUsername(String username);", "User findByUsername(String username);", "public boolean findUserBYName(String name);", "List<UserRepresentation> searchUserAccount(final String username);", "public boolean findbyUser(String username) {\n\t\tString sql=\"select username from SCOTT.USERS where USERNAME='\"+username+\"'\";\n\t\t\n\t\t Dbobj dj=new Dbobj();\n\t\t JdbcUtils jdbcu=new JdbcUtils();\n\t\t dj=jdbcu.executeQuery(sql);\n\t\t ResultSet rs=dj.getRs(); \n\t\t System.out.println(\"\"+sql);\t\n\t\t String t=\"\";\n\t\t try {\n\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tt=rs.getString(1);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t if (t.isEmpty()) {\n\t\t\t return false;\n\t\t }else{\n\t\t\t return true; \n\t\t }\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}", "@Override\n public List<User> findByName(String username){\n try {\n return runner.query(con.getThreadConnection(),\"select * from user where username like ?\",new BeanListHandler<User>(User.class),username);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }", "User getByUsername(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "public static User findUserByName(String username) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByName = \"SELECT * FROM public.member \"\n + \"WHERE name = '\" + username + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByName);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n\n return user;\n }", "Login findByUserName (String username);", "User findByUserName(String userName);", "User findByUserName(String userName);", "public User getUserByName(String username);", "public User getUserByName(String username);", "private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }", "public User getUserByUserName(String userName);", "public List<User> searchUser(String searchValue);", "public User searchByUsername(String username)\n {\n String query = \"SELECT * FROM user WHERE username = ?\";\n RowMapper<User> userRowMapper = new BeanPropertyRowMapper<>(User.class); // a collection type that holds the results of the query\n User user; // list of users that will be returned\n try\n {\n user = template.queryForObject(query, userRowMapper, username); // call the database and assign the results to the userList\n } catch (EmptyResultDataAccessException e)\n {\n user = null; // return null\n }\n return user;\n }", "@Override\n\tpublic List<UserManage> findUserByUsername(String username){\n\t\tList<UserManage> list = null;\n\t\ttry {\n\t\t\tlist = userDao.findUserByUsername(username);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}", "public User readByUsername(String username) throws DaoException;", "@Override\r\n\tpublic Users findByName(String username) {\n\t\t\r\n\t\tCriteria criteria=sessionFactory.getCurrentSession().createCriteria(Users.class);\r\n\t\t\r\n\t\tcriteria.add(Restrictions.eqOrIsNull(\"username\", username));\r\n\t\t\r\n\t\treturn (Users) criteria.uniqueResult();\r\n\t}", "public User getByUserName(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql = \"from User WHERE emailid = :userame\";\n\t\tUser user = (User)session.createQuery(hql).setParameter(\"userame\", username).getSingleResult();\n\t\treturn user;\n\t}", "User findByUsername(String username) throws DataAccessException;", "public Users findByUsername(String username) {\n\tthis.createConnection();\n\n try {\n Connection con = this.getCon();\n \tPreparedStatement stmnt = con.prepareStatement(this.getAllQuery() + \" where username=?;\");\n stmnt.setString(1, username);\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getErrorCode() + \":\" + e.getMessage());\n return new Users();\n }\n }", "User loadUserByUserName(String userName);", "public boolean existsUser(String username);", "@Override\r\n\tpublic User findByUsername(String username) {\n\t\treturn userDAO.findByUsername(username);\r\n\t}", "boolean existsByUsername(String username);", "@Override\r\n\tpublic User getByUsername(String username) throws UsernameNotFoundException {\r\n\t\tQuery query = sessionfactory.getCurrentSession().createQuery(\"FROM User WHERE username = :username\");\r\n\t\tquery.setParameter(\"username\", username);\r\n\t\tUser user = (User) query.uniqueResult();\r\n\t\tif (user == null) {\r\n\t\t\tthrow new UsernameNotFoundException(\"User with username '\" + username + \"' does not exist.\");\r\n\t\t}\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic User findUser(String username, String password) throws SQLException {\n User user = null;\n String sql = \"SELECT * FROM user WHERE username = ? AND password = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, username);\n statement.setString(2, password);\n \n \n ResultSet resultSet = statement.executeQuery();\n \n while (resultSet.next()) {\n String usrname = resultSet.getString(\"username\");\n String pwd = resultSet.getString(\"password\");\n \n user = new User(usrname, pwd);\n }\n \n resultSet.close();\n statement.close();\n \n return user;\n\t}", "User browseUserByUsername(String username);", "public boolean existsByUsername(String username);", "public User getUser(String username);", "@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}", "@Override\n\tpublic User findByUsername(String username) {\n\t\treturn userDao.findByUsername(username);\n\t}", "@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName\")\n User findByUsername(@Param(\"userName\") String userName);", "public User findByUserName(String userName) {\n logger.log(Level.INFO, \"suppp it works\");\n List<User> users = entityManager.createNamedQuery(User.FIND_BY_USERNAME)\n .setParameter(\"userName\", userName)\n .getResultList();\n if (users.isEmpty()) {\n return null;\n }\n return users.get(0);\n }", "User findByUsername(String username, String password) throws Exception;", "User findUserModelByUsername(String username);", "@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }", "public User findUser(String username) {\n if (userList.containsKey(username)) {\n return userList.get(username);\n } else {\n throw new NoSuchElementException(\"User Not Found.\");\n }\n }", "@NotNull TUser findByUserName(String username) throws NotFoundException, ErrorConnectionException, TException;", "public User findByUsername(String username) {\n List<User> users = em.createQuery(\"select c from User c where c.username=:username \")\n .setParameter(\"username\",username)\n .getResultList();\n if(users.size()>0){\n return users.get(0);\n }\n else{\n return null;\n }\n }", "public User getUserByUsername(String username) {\n\t\tString sql = \"SELECT u FROM User u WHERE u.username LIKE :username\";\n\t\tQuery query = em.createQuery(sql, User.class);\n\t\treturn (User) query.setParameter(\"username\", username).getSingleResult();\n\t}", "@Override\r\n\tpublic LoginUser selectByUsername(String username) {\n\t\tlogger.info(\"根据用户名获得用户对象...\");\r\n\t\tList<LoginUser> userList = loginUserDao.selectByUsername(username);\r\n\t\tif(null != userList && !userList.isEmpty() && userList.size() > 0){\r\n\t\t\treturn userList.get(0);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "User loadUser( String username ) throws UserNotFoundException;", "@Override\n\tpublic User getByUserName(String username) {\n\t\tUser user = userDao.getByUserName(username);\n\t\treturn user;\n\t}", "@Override\n\tpublic User getUserByCredentials(String userName, String password) {\n\t\tList<User> userList = new ArrayList<User>();\n\t\tString query = \"SELECT u FROM User u\";\n\t\tuserList = em.createQuery(query, User.class).getResultList();\n\t\tUser returnUser = null;\n\t\tfor (User user : userList) {\n\t\t\tif (user.getUserName().equals(userName) && user.getPassword().equals(password)) {\n\t\t\t\tSystem.out.println(user);\n\t\t\t\treturnUser = user;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not found\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnUser;\n\t}", "User get(String username) throws UserNotFoundException, SQLException;", "@Override\n\tpublic User queryOne(String username) {\n\t\tUser user = dao.queryOne(username);\n\t\treturn user;\n\t}", "User findUserByName(String name);", "@Override\n public User getUserByUsername(String name) {\n \tSession session = this.sessionFactory.getCurrentSession(); \n \tQuery query = session.createQuery(\"from User where username=:username\");\n\t\tquery.setParameter(\"username\", name);\n\t\tUser u = (User) query.uniqueResult();\n logger.info(\"User loaded successfully, User details=\"+u);\n return u;\n }", "User getUserByUsername(String name) throws InvalidUserException;", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "public Utente retriveByUsername(String user) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_User, Utente.class);\n query.setParameter(\"username\", user); //parameters by name \n return query.getSingleResult();\n\t}", "boolean exists(String username);", "@Override\n public User findByUsername( String username ) {\n return this.userRepository.findByUsername( username );\n }", "User find(String username, String password);", "@Override\r\n\tpublic User findUser(String name) {\n\t\tSession session=DaoUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.\r\n\t\t\r\n\t\t\r\n\t\treturn user;\r\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "@Override\n\tpublic User findUserByUserName(String userName) throws Exception {\n\t\treturn userDao.findUserByUserName(userName);\n\t}", "@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}", "User getUser(String username);", "Optional<User> findByUsername(String username);", "Optional<User> findByUsername(String username);" ]
[ "0.7787462", "0.7744386", "0.7733535", "0.7684741", "0.76158655", "0.7581814", "0.7514661", "0.7507297", "0.7506287", "0.7504628", "0.74986786", "0.7458742", "0.74377203", "0.74261826", "0.7426101", "0.74149704", "0.7413798", "0.74135184", "0.74113345", "0.74103314", "0.73857707", "0.73857707", "0.73857707", "0.73857707", "0.7376931", "0.73735905", "0.7370989", "0.73610675", "0.7357085", "0.7345128", "0.7345128", "0.7345128", "0.7345128", "0.7345128", "0.7345128", "0.73424876", "0.7341919", "0.73399997", "0.7321499", "0.7309736", "0.73088574", "0.72958815", "0.72958815", "0.72958815", "0.7253209", "0.72387683", "0.72179", "0.72179", "0.7176634", "0.7176634", "0.717017", "0.7139109", "0.708542", "0.7081867", "0.70788205", "0.7072669", "0.70555145", "0.7023308", "0.7013599", "0.7011255", "0.7001013", "0.6978474", "0.69666946", "0.696206", "0.69584256", "0.6957738", "0.69464827", "0.69290704", "0.69182634", "0.6918146", "0.6909825", "0.69024193", "0.6897375", "0.6888819", "0.68864346", "0.6883117", "0.6871954", "0.6854216", "0.68537796", "0.6852204", "0.6836098", "0.6835832", "0.68259555", "0.6824826", "0.6823056", "0.68094844", "0.68050414", "0.68034667", "0.6802224", "0.67941064", "0.6785936", "0.67850107", "0.6778055", "0.6777968", "0.67700684", "0.6769951", "0.6768836", "0.67675745", "0.67663425", "0.6766064", "0.6766064" ]
0.0
-1
///////////////////////////////////////////////////////////////////////////// Methods // ///////////////////////////////////////////////////////////////////////////// Default constructor:
public HotelDatabase() { this.HOTEL = new ArrayList<String>(Arrays.asList("HOTEL", "HOTEL_NAME", "BRANCH_ID", "PHONE")); this.ROOM = new ArrayList<String>(Arrays.asList("ROOM", "HOTEL_NAME", "BRANCH_ID", "TYPE", "CAPACITY")); this.CUSTOMER = new ArrayList<String>(Arrays.asList("CUSTOMER", "C_ID", "FIRST_NAME", "LAST_NAME", "AGE", "GENDER")); this.RESERVATION = new ArrayList<String>(Arrays.asList("RESERVATION", "C_ID", "RES_NUM", "PARTY_SIZE", "COST")); this.HOTEL_ADDRESS = new ArrayList<String>(Arrays.asList("HOTEL_ADDRESS", "HOTEL_NAME", "BRANCH_ID", "CITY", "STATE", "ZIP")); this.HOTEL_ROOMS = new ArrayList<String>(Arrays.asList("HOTEL_ROOMS", "HOTEL_NAME", "BRANCH_ID", "TYPE", "QUANTITY")); this.BOOKING = new ArrayList<String>(Arrays.asList("BOOKING", "C_ID", "RES_NUM", "CHECK_IN", "CHECK_OUT", "HOTEL_NAME", "BRANCH_ID", "TYPE")); this.INFORMATION = new ArrayList<String>(Arrays.asList("INFORMATION", "HOTEL_NAME", "BRANCH_ID", "TYPE", "DATE_FROM", "DATE_TO", "NUM_AVAIL", "PRICE")); this.NUMBERS = new ArrayList<String>(Arrays.asList("BRANCH_ID", "CAPACITY", "C_ID", "AGE", "RES_NUM", "PARTY_SIZE", "COST", "ZIP", "QUANTITY", "NUM_AVAILABLE", "PRICE")); this.DATES = new ArrayList<String>(Arrays.asList("CHECK_IN", "CHECK_OUT", "DATE_FROM", "DATE_TO")); // INDEXING: 0 1 2 3 4 5 6 7 this.ALL = new ArrayList<ArrayList<String>>(Arrays.asList(HOTEL, ROOM, CUSTOMER, RESERVATION, HOTEL_ADDRESS, HOTEL_ROOMS, BOOKING, INFORMATION)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "defaultConstructor(){}", "void DefaultConstructor(){}", "private Default()\n {}", "public Basic() {}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public CyanSus() {\n\n }", "public Pitonyak_09_02() {\r\n }", "public Demo() {\n\t\t\n\t}", "public Curso() {\r\n }", "public PSRelation()\n {\n }", "public Tbdtokhaihq3() {\n super();\n }", "public CSSTidier() {\n\t}", "public Orbiter() {\n }", "public Anschrift() {\r\n }", "public Chick() {\n\t}", "public Pasien() {\r\n }", "public Generic(){\n\t\tthis(null);\n\t}", "public Main() {\n\t\tsuper();\n\t}", "private Rekenhulp()\n\t{\n\t}", "public Odontologo() {\n }", "public SgaexpedbultoImpl()\n {\n }", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "private Instantiation(){}", "private Main() {\n\n super();\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Libro() {\r\n }", "public Parser()\n {\n //nothing to do\n }", "private TMCourse() {\n\t}", "public Aanbieder() {\r\n\t\t}", "public Cohete() {\n\n\t}", "public Coche() {\n super();\n }", "public Chauffeur() {\r\n\t}", "public WordList() {\t\t//Default constructor\n\t}", "public Lanceur() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Mannschaft() {\n }", "private SingleObject()\r\n {\r\n }", "private Main ()\n {\n super ();\n }", "private Converter()\n\t{\n\t\tsuper();\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public JSFOla() {\n }", "public Tbdcongvan36() {\n super();\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Mitarbeit() {\r\n }", "public Magazzino() {\r\n }", "public Main() {\r\n\t}", "public Livro() {\n\n\t}", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }", "public Person() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "public Content() {\n\t}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public _355() {\n\n }", "public Book() {\n\t\t// Default constructor\n\t}", "private MApi() {}", "@Override\n public void init() {}", "public Ruby() {}", "private XMLUtils()\r\n\t{\r\n\t}", "public ContentKj () {\n\t\tsuper();\n\t}", "private Node() {\n\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public lo() {}", "O() { super(null); }", "@Override\n\t\tpublic void init() {\n\t\t}", "private ARXDate() {\r\n this(\"Default\");\r\n }", "public mapper3c() { super(); }", "private Composite() {\n }", "public ObjectFactory() {\n\t}", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public SlanjePoruke() {\n }", "public BasicElementList() {\n\t}", "public Node() {\n\t}", "public BasicLineParser() {\n/* 99 */ this(null);\n/* */ }", "public Demo3() {}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public BasicLoader() {\n }", "public CMN() {\n\t}", "public Soil()\n\t{\n\n\t}", "Parent()\n\t{\n\t\tSystem.out.println(\"This is parent's default constructor\");\n\t}", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public Phl() {\n }", "public Node() {\r\n\t}", "public Node() {\r\n\t}", "public Node(){\n\n\t\t}", "public ObjectFactory() {\r\n\t}", "public Instance() {\n }", "public Connection() {\n\t\t\n\t}", "public XMLDocument ()\r\n\t{\r\n\t\tthis (DEFAULT_XML_VERSION, true);\r\n\t}", "public Sandwich()\n\t{super();\n \n\t\t\n\t}", "public D() {}", "private UI()\n {\n this(null, null);\n }", "public ExamMB() {\n }", "public RngObject() {\n\t\t\n\t}", "public Data() {\n }", "public Data() {\n }", "public Trening() {\n }" ]
[ "0.82295674", "0.7904703", "0.7856697", "0.76563156", "0.7597494", "0.7433682", "0.7383116", "0.7369288", "0.72609824", "0.72455734", "0.72444767", "0.72009623", "0.71994257", "0.7159459", "0.71512246", "0.71375954", "0.71221894", "0.71214974", "0.71116364", "0.7099242", "0.7097525", "0.7092231", "0.7077519", "0.7072101", "0.70717275", "0.7071364", "0.7010352", "0.70037156", "0.6999797", "0.69947916", "0.698961", "0.6985556", "0.6982562", "0.6975497", "0.697168", "0.6971334", "0.6965171", "0.695496", "0.69527596", "0.69471747", "0.69345224", "0.6932254", "0.6923691", "0.69174945", "0.6911662", "0.69116557", "0.69081384", "0.6903098", "0.6899474", "0.6899288", "0.68971556", "0.68924326", "0.68894434", "0.6886012", "0.68800926", "0.68773055", "0.6874424", "0.6868696", "0.6867221", "0.68670547", "0.686673", "0.68665147", "0.6863607", "0.68623346", "0.68559", "0.68500334", "0.68441546", "0.6841243", "0.6840666", "0.6838876", "0.6837915", "0.6834681", "0.6832024", "0.682163", "0.68193644", "0.6818983", "0.6817882", "0.68150616", "0.6813678", "0.6808525", "0.6804495", "0.6801682", "0.6800526", "0.67977935", "0.67955446", "0.67942446", "0.67939633", "0.67939633", "0.6790741", "0.67874396", "0.6786011", "0.6784823", "0.67810804", "0.67786443", "0.6778365", "0.6775995", "0.67750734", "0.6774253", "0.67730594", "0.67730594", "0.6772317" ]
0.0
-1
Runs the program from the command line:
public static void main(String[] args) { // Initialize Database instance: HotelDatabase hotelDB = new HotelDatabase(); Scanner scan = new Scanner(System.in); // Get the connection: hotelDB.username = "anowilat"; hotelDB.password = "doopee"; Connection connection = hotelDB.getConnection(hotelDB.username, hotelDB.password); try { // Populate DateList and assign generic values to price: hotelDB.populateDemo(connection, LocalDate.parse("2018-12-01"), LocalDate.parse("2018-12-31")); //hotelDB.searchArea(connection, "Long Beach", "CA", 94103); //hotelDB.createHotel(connection); //hotelDB.showTable(connection); //hotelDB.searchCustomerReservations(connection, 2); //hotelDB.searchHotelReservations(connection, , int branchID, LocalDate checkIn, LocalDate checkOut) //hotelDB.searchAvailabilityType(connection, "Four Seasons Hotel", 1, "Single Suite", LocalDate.parse("2018-12-01"), LocalDate.parse("2018-12-01")); } catch (SQLException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}", "void main(CommandLine cmd);", "public static void main(String[] args) throws IOException{\r\n\t\tparseOption(args);\r\n\t\trun(args);\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Running my program\");\n System.out.println(args.length);\n for (int i = 0; i < args.length; i++) {\n System.out.println(i + \" => \" + args[i]);\n }\n }", "public static void main(String[] args) {\n\t\tif(args == null || args.length == 0){\n\t\t\tprintRunOptions();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t System.out.println(\"Current dir using System:\"\t + currentDir);\n\n\n\t\tswitch(args[0]){\n\t\tcase \"-testCGRAVerilog\":\n\t\tcase \"-simple\":\n\t\t\tsimpleRun(args);\n\t\t\tbreak;\n\t\tcase \"-simpleSpeedup\":\n\t\t\tsimpleSpeedupRun(args);\n\t\t\tbreak;\n\t\tcase \"-sweep\":\n\t\t\tlocalParallelSweep(args);\n\t\t\tbreak;\n\t\tcase \"-sweepRemote\":\n\t\t\tparallelSweep(args);\n\t\t\tbreak;\n\t\tcase \"-synthesize\":\n\t\t\tstandaloneSynthesize(args);\n\t\t\tbreak;\n\t\tcase \"-test\":\n\t\t\ttest(args);\n\t\t\tbreak;\n\t\tcase \"-speedup\":\n\t\t\tspeedup(args);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong run options\");\n\t\t\tprintRunOptions();\n\t\t\treturn;\n\t\t}\n\n\n\t}", "public static void main(String[] args) {\n\t launch(args);\n\t }", "public static void main(String[] args) {\n\t launch(args);\n\t }", "public static void main(String[] args) {\n //launch it\n launch();\n }", "public static void main(String[] args) {\n new Main(args).run();\n }", "public static void main(String... args) {\n doMain().run();\n }", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}", "public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}", "public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}", "public static void main(String[] args) {\r\n\t\tlaunch(args);\r\n\t}", "public static void main(String[] args){\n\t\tnew VanRentalSystem().run(args[0]);\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.exit(createCommandLine().execute(args));\r\n\t}", "public static void main (String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\r\n \r\n }", "public static void main(String[] args) throws IOException\r\n {\r\n main(Integer.parseInt(args[0]));\r\n }", "public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\r\n\t}", "public void main(String[] args) {\n try {\n execute(null, args);\n } catch (Exception e) {\n CommandLineHelper.handleException(e);\n }\n }", "public void main(String[] args) {\n\t}", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n\t\tlaunch(args);\n\t}", "public static void main(String[] args) {\n new Program();\n }", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(String[] args) {\n launch(args);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tlaunch(args);\r\n\r\n\t}", "public static void main(String[] args) {\r\n\t launch(args);\r\n\t}", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args) {\r\n launch(args);\r\n }", "public static void main(String[] args)\r\n {\r\n launch(args);\r\n }", "public static void main(String[] args) {\n Run();\n }", "public static void main(String[] args) {\n launch(args); \n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n launch(args);\n }", "public static void main(String[] args)\r\n {\r\n launch(args);\r\n }", "public static void main(String[] args)\n {\n launch(args);\n }", "public static void main(String[] args)\n {\n launch(args);\n }", "public static void main(String[] args)\n {\n launch(args);\n }", "public static void main(String[] argv){\n\t}", "public static void main(String[] args)\n {\n launch(args);\n }", "public static void main(String[] args) {\n new Main().run();\n }", "public static void main(String[] args)\n\t{\n\t\tlaunch(args);\n\t}", "public static void main(String[] args)\n\t{\n\t\tlaunch(args);\n\t}" ]
[ "0.7831166", "0.7468436", "0.7399159", "0.7347767", "0.7305641", "0.71860313", "0.71860313", "0.71803504", "0.71715933", "0.71701914", "0.7144737", "0.71443516", "0.71443516", "0.71443516", "0.71443516", "0.71298593", "0.71278", "0.7125891", "0.7109419", "0.7106908", "0.7102722", "0.7102722", "0.71014386", "0.7097013", "0.70951486", "0.70951486", "0.70951486", "0.70951486", "0.70951486", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7089354", "0.7086793", "0.70803887", "0.70803887", "0.70803887", "0.7072278", "0.70701283", "0.7060481", "0.7060481", "0.7060481", "0.7060481", "0.7060481", "0.7060481", "0.7060481", "0.70597786", "0.70503986", "0.7047758", "0.7040156", "0.70309883", "0.70309883", "0.7028779", "0.7028779", "0.7028779", "0.7028779", "0.7028779", "0.7028779", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.70284253", "0.7023822", "0.70179206", "0.70179206", "0.70179206", "0.7012163", "0.7010499", "0.7009488", "0.69980204", "0.69980204" ]
0.0
-1
Creates a list of entries for dates from a start and end date:
public void populateDemo(Connection connection, LocalDate start, LocalDate end) throws SQLException { DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "DateList", null); if (rs != null){ while (!start.isAfter(end)){ String sql = "INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))"; String sql1 = "INSERT INTO Information VALUES('Westin Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)"; String sql2 = "INSERT INTO Information VALUES('Westin Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 300)"; String sql3 = "INSERT INTO Information VALUES('Westin Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)"; String sql4 = "INSERT INTO Information VALUES('Westin Hotel', 2, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)"; String sql5 = "INSERT INTO Information VALUES('Westin Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 15, 400)"; String sql6 = "INSERT INTO Information VALUES('Westin Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)"; String sql7 = "INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 20, 800)"; String sql8 = "INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)"; String sql9 = "INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 25, 1000)"; String sql10 = "INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)"; String sql11 = "INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 350)"; String sql12 = "INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Twin Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 250)"; PreparedStatement pStmt = connection.prepareStatement(sql); PreparedStatement pStmt1 = connection.prepareStatement(sql1); PreparedStatement pStmt2 = connection.prepareStatement(sql2); PreparedStatement pStmt3 = connection.prepareStatement(sql3); PreparedStatement pStmt4 = connection.prepareStatement(sql4); PreparedStatement pStmt5 = connection.prepareStatement(sql5); PreparedStatement pStmt6 = connection.prepareStatement(sql6); PreparedStatement pStmt7 = connection.prepareStatement(sql7); PreparedStatement pStmt8 = connection.prepareStatement(sql8); PreparedStatement pStmt9 = connection.prepareStatement(sql9); PreparedStatement pStmt10 = connection.prepareStatement(sql10); PreparedStatement pStmt11 = connection.prepareStatement(sql11); PreparedStatement pStmt12 = connection.prepareStatement(sql12); pStmt.clearParameters(); pStmt1.clearParameters(); pStmt2.clearParameters(); pStmt3.clearParameters(); pStmt4.clearParameters(); pStmt5.clearParameters(); pStmt6.clearParameters(); pStmt7.clearParameters(); pStmt8.clearParameters(); pStmt9.clearParameters(); pStmt10.clearParameters(); pStmt11.clearParameters(); pStmt12.clearParameters(); pStmt.setString(1, start.toString()); pStmt1.setString(1, start.toString()); pStmt2.setString(1, start.toString()); pStmt3.setString(1, start.toString()); pStmt4.setString(1, start.toString()); pStmt5.setString(1, start.toString()); pStmt6.setString(1, start.toString()); pStmt7.setString(1, start.toString()); pStmt8.setString(1, start.toString()); pStmt9.setString(1, start.toString()); pStmt10.setString(1, start.toString()); pStmt11.setString(1, start.toString()); pStmt12.setString(1, start.toString()); start = start.plusDays(1); pStmt.setString(2, start.toString()); pStmt1.setString(2, start.toString()); pStmt2.setString(2, start.toString()); pStmt3.setString(2, start.toString()); pStmt4.setString(2, start.toString()); pStmt5.setString(2, start.toString()); pStmt6.setString(2, start.toString()); pStmt7.setString(2, start.toString()); pStmt8.setString(2, start.toString()); pStmt9.setString(2, start.toString()); pStmt10.setString(2, start.toString()); pStmt11.setString(2, start.toString()); pStmt12.setString(2, start.toString()); try { pStmt.executeUpdate(); pStmt1.executeUpdate(); pStmt2.executeUpdate(); pStmt3.executeUpdate(); pStmt4.executeUpdate(); pStmt5.executeUpdate(); pStmt6.executeUpdate(); pStmt7.executeUpdate(); pStmt8.executeUpdate(); pStmt9.executeUpdate(); pStmt10.executeUpdate(); pStmt11.executeUpdate(); pStmt12.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); pStmt1.close(); pStmt2.close(); pStmt3.close(); pStmt4.close(); pStmt5.close(); pStmt6.close(); pStmt7.close(); pStmt8.close(); pStmt9.close(); pStmt10.close(); pStmt11.close(); pStmt12.close(); } } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }", "public List<Food> getPortionedFoodsInDateTimeRange(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToPortionedFoods(entriesInRange);\n }", "public List<Login> getUsers(Date startDate, Date endDate);", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public static List<Row> filterDate(List<Row> inputList, LocalDateTime startOfDateRange, LocalDateTime endOfDateRange) {\n\t\t//checks to ensure that the start of the range (1st LocalDateTime input) is before the end of the range (2nd LocalDateTime input)\n\t\tif(startOfDateRange.compareTo(endOfDateRange) > 0) {\n\t\t\t//if not, then send an error and return empty list\n\t\t\tGUI.sendError(\"Error: start of date range must be before end of date range.\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\n\t\tList<Row> outputList = new ArrayList<>();\n\n\t\t//iterate through inputList, adding all rows that fall within the specified date range to the outputList\n\t\tfor(Row row : inputList) {\n\t\t\tif(row.getDispatchTime().compareTo(startOfDateRange) >= 0 && row.getDispatchTime().compareTo(endOfDateRange) <= 0) {\n\t\t\t\toutputList.add(row);\n\t\t\t}\n\t\t}\n\n\t\t//outputList is returned after being populated\n\t\treturn outputList;\n\t}", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "public void createDateList(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"DATELIST\", null);\n\n if (rs != null) {\n\n System.out.print(\"Please provide a start date: \");\n LocalDate start = LocalDate.parse(scan.nextLine());\n\n System.out.print(\"Please provide an end date: \");\n LocalDate end = LocalDate.parse(scan.nextLine());\n\n while (!start.isAfter(end)){\n\n String sql = \"INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, start.toString());\n pStmt.setString(2, end.toString());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public List<Food> getFoodsInDateTimeRange(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToFoods(entriesInRange);\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "public java.util.List<DataEntry> findAll(int start, int end);", "private void getRecords(LocalDate startDate, LocalDate endDate) {\n foods = new ArrayList<>();\n FoodRecordDao dao = new FoodRecordDao();\n try {\n foods = dao.getFoodRecords(LocalDate.now(), LocalDate.now(), \"\");\n } catch (DaoException ex) {\n Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public static ArrayList<String> datespanToList(String datePattern,String dateSpan)\n\t{\n\t\tArrayList<String> listDate = new ArrayList<String>();\n\t\tString fromDate = \"\";\n\t\tString toDate = \"\";\n\t\tint index = dateSpan.indexOf(\"-\");\n\t\tif(index!=-1)\n\t\t{\n\t\t\tfromDate = dateSpan.substring(0,index);\n//\t\t\tSystem.out.println(\"fromDate=\"+fromDate);\n\t\t\ttoDate = dateSpan.substring(index+1);\n//\t\t\tSystem.out.println(\"toDate=\"+toDate);\n\t\t\tif(fromDate.compareTo(toDate)>0)\n\t\t\t\treturn listDate;\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tDate d;\n\t\t\ttry {\n\t\t\t\tSimpleDateFormat sf = new SimpleDateFormat(datePattern);\n\t\t\t\td = sf.parse(fromDate);\n\t\t\t\tc.setTime(d);\n//\t\t\t\tSystem.out.println(TimeOperator.timeFormatConvert(\"yyMMdd\",c.getTime()));\n\t\t\t\tString tempDate = \"\";\n\t\t\t\tfor(int i=1;i<5000;i++)//should not be more than 5000 days!\n\t\t\t\t{\n\t\t\t\t\ttempDate = TimeOperator.timeFormatConvert(datePattern,c.getTime());\n\t\t\t\t\tlistDate.add(tempDate);\n\t\t\t\t\tif(toDate.equals(tempDate))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tc.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tlistDate.add(dateSpan);\n\t\treturn listDate;\n\t}", "protected List<String> getAxisList(Date startDate, Date endDate, int calendarField) {\n List<String> stringList = new ArrayList<String>();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date tempDate = startDate;\n Calendar tempCalendar = Calendar.getInstance();\n tempCalendar.setTime(tempDate);\n\n while (tempDate.before(endDate)) {\n stringList.add(simpleDateFormat.format(tempDate));\n tempCalendar.add(calendarField, 1);\n tempDate = tempCalendar.getTime();\n }\n\n return stringList;\n }", "void setDateRange(Date start, Date end);", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public ArrayList<Event> getCalendarEventsBetween(Calendar startingDate, Calendar endingDate)\n {\n ArrayList<Event> list = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n Calendar eventCalendar = events.get(i).getCalendar();\n\n if(isSame(startingDate, eventCalendar) || isSame(endingDate, eventCalendar) ||\n (eventCalendar.before(endingDate) && eventCalendar.after(startingDate)))\n {\n list.add(events.get(i));\n }\n }\n return list;\n }", "public ArrayList<Event> getEventsByInterval(Calendar initial_date, Calendar final_date) {\n\t\tArrayList<Event> result = new ArrayList<Event>();\n\t\tboolean insert = true;\n\t\t\n\t\tfor (int i = 0; i < events.size(); i++) {\t\t\t\n\t\t\tif (initial_date != null && final_date != null) {\t\t\n\t\t\t\tif (!events.get(i).getInitial_date().after(initial_date)\n\t\t\t\t\t\t|| !events.get(i).getFinal_date().before(final_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t} else if (initial_date != null) {\n\t\t\t\tif (!events.get(i).getInitial_date().after(initial_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t} else if (final_date != null) {\n\t\t\t\tif (!events.get(i).getFinal_date().before(final_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (insert) {\n\t\t\t\tresult.add(events.get(i));\n\t\t\t}\n\t\t\tinsert = true;\n\t\t}\n\t\treturn result;\n\t}", "public List<ServiceType> getAllByDate(Date startDate , Date endDate) {\n\t\t// TODO Auto-generated method stub\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tsession.beginTransaction();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList <ServiceType> lst =(List<ServiceType>) session.createCriteria(ServiceType.class)\n\t\t.add(Restrictions.ge(\"createDate\", startDate))\n\t\t.add(Restrictions.lt(\"createDate\", endDate))\n\t\t.list();\n\t\tsession.close();\n\t\treturn lst;\n\t}", "@Override\n\tpublic List<Besoin> BesionByDate (String dateStart, String dateEnd) {\n\t\treturn dao.BesionByDate(dateStart, dateEnd);\n\t}", "public List<Idea> getIdeasPublishedBetween(Calendar start, Calendar end) throws DataAccessException {\n List<Idea> ret = new ArrayList<>();\n if (!start.after(end)) {\n try {\n String queryStr = \"select i from Idea i \"\n + \"where i.publishedDate > start and \"\n + \"i.publishedDate < end\";\n Object res = em.createQuery(queryStr)\n .getResultList();\n ret = (List<Idea>) res;\n } catch (PersistenceException | EJBException pe) {\n throw new DataAccessException(pe, \"Error getting ideas between dates\");\n }\n }\n return ret;\n }", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "default List<ZonedDateTime> getExecutionDates(ZonedDateTime startDate, ZonedDateTime endDate) {\n if (endDate.equals(startDate) || endDate.isBefore(startDate)) {\n throw new IllegalArgumentException(\"endDate should take place later in time than startDate\");\n }\n List<ZonedDateTime> executions = new ArrayList<>();\n ZonedDateTime nextExecutionDate = nextExecution(startDate).orElse(null);\n\n if (nextExecutionDate == null) return Collections.emptyList();\n while(nextExecutionDate != null && (nextExecutionDate.isBefore(endDate) || nextExecutionDate.equals(endDate))){\n executions.add(nextExecutionDate);\n nextExecutionDate = nextExecution(nextExecutionDate).orElse(null);\n }\n return executions;\n }", "private void generateMarkedDates() {\n this.markedDates = new HashMap<>();\n for (Task t : logic.getAddressBook().getTaskList()) {\n\n if (markedDates.containsKey(t.getStartDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getStartDate().getDate())) {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n\n if (markedDates.containsKey(t.getEndDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getEndDate().getDate())) {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n }\n }", "protected void addDateRange() {\n addFieldset(startDatePicker, \"Start Date\", \"startDate\");\n addFieldset(endDatePicker, \"End Date\", \"endDate\");\n }", "public List<Book> getBooksFilteredByDate(GregorianCalendar startDate, GregorianCalendar endDate)\r\n\t{\r\n\t\tList<Book> books = new ArrayList<Book>();\r\n\t\tif(startDate.compareTo(endDate) != -1) {\r\n\t\t\tbooks = null;\r\n\t\t}\r\n\t\tfor(Book book : items) {\r\n\t\t\tGregorianCalendar date = book.getPubDate();\r\n\t\t\tboolean beforeEnd = true;\r\n\t\t\tif(endDate != null) {\r\n\t\t\t\tbeforeEnd = date.compareTo(endDate) == -1;\r\n\t\t\t}\r\n\t\t\tboolean afterStart = date.compareTo(startDate) > -1;\r\n\t\t\tif(beforeEnd && afterStart) {\r\n\t\t\t\tbooks.add(book);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn books;\r\n\t}", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "List<Product> findAllByDateCreateBetween(Date startDate, Date endDate);", "List<Map<String, Object>> betweenDateFind(String date1, String date2) throws ParseException;", "public static Iterable<AnalyticsResults> getAllEvents(Date start, Date end) {\n\t\ttry {\n\t\t\treturn Common.query(\n\t\t\t\t\t\"{CALL GetAnalyticsForDateRange(?,?)}\",\n\t\t\t\t\tprocedure -> {\n\t\t\t\t\t\tprocedure.setDate(1, start);\n\t\t\t\t\t\tprocedure.setDate(2, end);\n\t\t\t\t\t},\n\t\t\t\t\tAnalyticsResults::listFromResults\n\t\t\t);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"GetAnalyticsForDateRange\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t}", "public Collection<BaseData> getBaseDataByDate(Date startDate, Date endDate){\n\t\tQuery query = em.createQuery(\"from BaseData c where c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (List<BaseData>)query.getResultList();\n\t}", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }", "@Override\n public List<Event> searchByInterval(Date leftDate, Date rightDate) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.dateBegin BETWEEN :leftDate and :rightDate \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"leftDate\", leftDate)\n .setParameter(\"rightDate\", rightDate);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "public List<DateType> toDateList() {\n List<DateType> result = new ArrayList<>();\n if (fromDate != null) {\n result.add(fromDate);\n }\n if (toDate != null) {\n result.add(toDate);\n }\n if (fromToDate != null) {\n result.add(fromToDate);\n }\n return result;\n }", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "public ArrayList<LogBean> queryLogByDate(int currentPage, Date start,\n\t\t\tDate end, int pageSize) {\n\t\treturn ld.getLogByDate(currentPage,start,end,pageSize);\n\t}", "@Query(value = \"SELECT DATE(created_on),value FROM lost_products WHERE created_on >= ? AND created_on<= ?\", nativeQuery = true)\n List<Object[]> getLostsBetweenDates(LocalDate startDate, LocalDate endDate);", "public List<TimeSheet> getTimeSheetsBetweenTwoDateForAllEmp(LocalDate startDate, LocalDate endDate) {\n log.info(\"Inside TimeSheetService#getTimeSheetByPid Method\");\n return timeSheetRepository.getTimeSheets(startDate, endDate);\n }", "private List<Long> makeListOfDatesLong(HashSet<Calendar> workDays) {\n List<Long> days = new ArrayList<>();\n if (workDays != null) {\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n //days.add(sdf.format(date.getTime()));\n days.add(date.getTimeInMillis());\n }\n }\n return days;\n }", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "static public Vector<File> searchDateFiles(File dir, Date beginDate, Date endDate, String prefix) {\n\n\t\tVector<File> toReturn=new Vector<File>();\n\n\t\t// if directory ha files \n\t\tif(dir.isDirectory() && dir.list()!=null && dir.list().length!=0){\n\n//\t\t\tserach only files starting with prefix\n\n\t\t\t// get sorted array\n\t\t\tFile[] files=getSortedArray(dir, prefix);\n\n\t\t\tif (files == null){\n\t\t\t\tthrow new SpagoBIServiceException(SERVICE_NAME, \"Missing files in specified interval\");\n\t\t\t}\n\n\t\t\t// cycle on all files\n\t\t\tboolean exceeded = false;\n\t\t\tfor (int i = 0; i < files.length && !exceeded; i++) {\n\t\t\t\tFile childFile = files[i];\n\n\t\t\t\t// extract date from file Name\n\t\t\t\tDate fileDate=null;\n\t\t\t\ttry {\n\t\t\t\t\tfileDate = extractDate(childFile.getName(), prefix);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tlogger.error(\"error in parsing log file date, file will be ignored!\",e);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// compare beginDate and timeDate, if previous switch file, if later see end date\n\t\t\t\t// compare then end date, if previous then endDate add file, else exit\n\n\t\t\t\t// if fileDate later than begin Date\n\t\t\t\tif(fileDate !=null && fileDate.after(beginDate)){\n\t\t\t\t\t// if end date later than file date\n\t\t\t\t\tif(endDate.after(fileDate)){\n\t\t\t\t\t\t// it is in the interval, add to list!\n\t\t\t\t\t\ttoReturn.add(childFile);\n\t\t\t\t\t}\n\t\t\t\t\telse { // if file date is later then end date, we are exceeding interval\n\t\t\t\t\t\texceeded = true;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "public DateRange getDateRange();", "public void addEvent(String date, String name, String start, String end) {\n\n // Create event based on the parameters\n Event event = new Event(name, start, end);\n\n Boolean foundEventList = false;\n\n for (EventList e : events) {\n if (e.getDate().equals(date)) {\n e.add(event);\n foundEventList = true;\n break;\n }\n }\n\n if (!foundEventList) {\n EventList eventList = new EventList(date);\n eventList.add(event);\n events.add(eventList);\n }\n\n update();\n }", "public List<String> getListOfAllWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.DAY_OF_MONTH, -7);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n }\n\n return list;\n }", "public List<String> getListOfWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n int count = 1;\n\n while (current.compareTo(first) > 0) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n\n if (count <= 4) {\n c.add(Calendar.DAY_OF_MONTH, -7);\n } else if (count <= 16) {\n c.add(Calendar.MONTH, -1);\n } else {\n c.add(Calendar.YEAR, -1);\n }\n\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n count++;\n }\n\n return list;\n }", "public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {\n\n ArrayList<String> yyyyMMList = new ArrayList<String>();\n try {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(dateFrom.split(\"-\")[0]), Integer.parseInt(dateFrom.split(\"-\")[1]) - 1, Integer.parseInt(dateFrom.split(\"-\")[2]));\n\n String yyyyTo = dateTo.split(\"-\")[0];\n String mmTo = Integer.parseInt(dateTo.split(\"-\")[1]) + \"\";\n if (mmTo.length() < 2) {\n mmTo = \"0\" + mmTo;\n }\n String yyyymmTo = yyyyTo + mmTo;\n\n while (true) {\n String yyyy = calendar.get(Calendar.YEAR) + \"\";\n String mm = (calendar.get(Calendar.MONTH) + 1) + \"\";\n if (mm.length() < 2) {\n mm = \"0\" + mm;\n }\n yyyyMMList.add(yyyy + mm);\n\n if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {\n break;\n }\n calendar.add(Calendar.MONTH, 1);\n }\n return yyyyMMList;\n } catch (Exception e) {\n throw new Exception(\"getYYYYMMList : dateFrom(yyyy-mm-dd)=\" + dateFrom + \" : dateTo(yyyy-mm-dd)\" + dateTo + \" : \" + e.toString());\n }\n }", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public List<String> retrieveByDate(List<String> jobId, String userId,\n Calendar startDate, Calendar endDate) throws DatabaseException, IllegalArgumentException;", "void generateResponseHistory(LocalDate from, LocalDate to);", "public String getInDateTimeRangeToString(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToString(entriesInRange);\n }", "public List<LocalDate> createLocalDates( final int size ) {\n\n\t\tfinal List<LocalDate> list = new ArrayList<>(size);\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tlist.add(LocalDate.ofEpochDay(i));\n\t\t}\n\n\t\treturn list;\n\t}", "public static SortedMap<Date, Set<Task>> calendar(Iterable<Task> tasks, Date start, Date end) throws Exception {\n TreeMap<Date, Set<Task>> calendar = new TreeMap<Date, Set<Task>>();\n for (Task task : Tasks.incoming(tasks, start, end))\n for (Date date : Tasks.events(task, start, end))\n if (!calendar.keySet().contains(date)) {\n Set<Task> tasksSet = new HashSet<>();\n tasksSet.add(task);\n calendar.put(date, tasksSet);\n } else {\n Set<Task> tasksSetNew = calendar.get(date);\n tasksSetNew.add(task);\n calendar.put(date, tasksSetNew);\n }\n return calendar;\n }", "@WebMethod public ArrayList<Event> getEvents(LocalDate date);", "public List<Reserva> getReservasPeriod(String dateOne, String dateTwo){\n /**\n * Instancia de SimpleDateFormat para dar formato correcto a fechas.\n */\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n /**\n * Crear nuevos objetos Date para recibir fechas fomateadas.\n */\n Date dateOneFormatted = new Date();\n Date dateTwoFormatted = new Date();\n /**\n * Intentar convertir las fechas a objetos Date; mostrar registro de\n * la excepción si no se puede.\n */\n try {\n dateOneFormatted = parser.parse(dateOne);\n dateTwoFormatted = parser.parse(dateTwo);\n } catch (ParseException except) {\n except.printStackTrace();\n }\n /**\n * Si la fecha inicial es anterior a la fecha final, devuelve una lista\n * de Reservas creadas dentro del intervalo de fechas; si no, devuelve\n * un ArrayList vacío.\n */\n if (dateOneFormatted.before(dateTwoFormatted)){\n return repositorioReserva.findAllByStartDateAfterAndStartDateBefore\n (dateOneFormatted, dateTwoFormatted);\n } else {\n return new ArrayList<>();\n }\n }", "public ArrayList<Salary> getSalariesByStartDateAndEndDateAndEmployeeId(String startDate,\n String endDate,\n String employeeId) {\n ArrayList<Salary> salaries = new ArrayList<>();\n for (Salary s : allSalaries.values()) {\n if (s.getEmployeeId().equals(employeeId)) {\n try {\n Date start = CalendarUtil.sdfDayMonthYear.parse(startDate);\n Date currentStart = CalendarUtil.sdfDayMonthYear.parse(EventRepository.getInstance()\n .getEventByEventId(s.getEventId()).getNgayBatDau());\n Date end = CalendarUtil.sdfDayMonthYear.parse(endDate);\n Date currentEnd = CalendarUtil.sdfDayMonthYear.parse(EventRepository.getInstance()\n .getEventByEventId(s.getEventId()).getNgayKetThuc());\n if ((start.compareTo(currentStart) <= 0 && currentStart.compareTo(end) <= 0) ||\n start.compareTo(currentEnd) <= 0 && currentEnd.compareTo(end) <= 0) {\n salaries.add(s);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n return salaries;\n }", "public Vector<Event> getEventsInDay(Date par){\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<Event> result = new Vector<Event>();\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n \n SimpleDateFormat format1 = new SimpleDateFormat(\"dd-MM-YY\");\n \n //build the sql statement\n String sql = \"select * from event where to_date('\" + format1.format(par) + \"','DD-MM-YY') \";\n sql+= \"between to_date(start_time,'DD-MM-YY') and to_date(end_time,'DD-MM-YY')\";\n \n \n //System.out.println(sql);\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql that is constructed using the supplied parameters\n st = con.prepareCall(sql);\n \n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n \n Event e = new Event(rs.getLong(\"id\"),rs.getString(\"id\") + \",\" + rs.getString(\"name\"),rs.getDate(\"start_time\"),rs.getDate(\"end_time\"));\n ;\n result.add(e);\n \n }\n \n }\n catch (SQLException e){\n e.printStackTrace();\n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n \n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n return result;\n \n \n }", "@Override\n public List<UserQuery> getQueries(LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserQuery.class));\n return handle.createQuery(UserQuery.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(UserQuery.class)\n .list();\n });\n }", "public List<Transaction> getTransactions(String startdate, String enddate) {\r\n List<Transaction> transactionList = null;\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE (trans.effdate BETWEEN :startdate AND :enddate) AND trans.category.extra = false AND trans.deleted = false ORDER BY trans.effdate, trans.category.sortId\");\r\n q.setParameter(\"startdate\", java.sql.Date.valueOf(startdate));\r\n q.setParameter(\"enddate\", java.sql.Date.valueOf(enddate));\r\n transactionList = (List<Transaction>) q.list();\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }", "private static List<DateRange> transformeAdvancedCase(\n final ZonedDateTime startRange,\n final ZonedDateTime endRange,\n final List<DateRange> reservedRanges) {\n\n final List<DateRange> availabilityRanges = new ArrayList<>();\n final List<DateRange> reservedRangesExtended = new ArrayList<>(reservedRanges);\n\n // if first DateRange starts after startRange\n if (reservedRanges.get(0).getStartDate().isAfter(startRange)) {\n // add a synthetic range that ends at startRange. Its startDate is not important\n final DateRange firstSyntheticDateRange = new DateRange(startRange.minusDays(1), startRange);\n reservedRangesExtended.add(0, firstSyntheticDateRange);\n }\n\n // if last DateRange ends before endRange\n if (reservedRanges.get(reservedRanges.size() - 1).getEndDate().isBefore(endRange)) {\n // add a synthetic range that starts at endRange. Its endDate is not important\n final DateRange lastSyntheticDateRange = new DateRange(endRange, endRange.plusDays(1));\n reservedRangesExtended.add(lastSyntheticDateRange);\n }\n\n Iterator<DateRange> iterator = reservedRangesExtended.iterator();\n DateRange current = null;\n DateRange next = null;\n\n while (iterator.hasNext()) {\n\n // On the first run, take the value from iterator.next(), on consecutive runs,\n // take the value from 'next' variable\n current = (current == null) ? iterator.next() : next;\n\n final ZonedDateTime startDate = current.getEndDate();\n\n if (iterator.hasNext()) {\n next = iterator.next();\n final ZonedDateTime endDate = next.getStartDate();\n DateRange availabilityDate = new DateRange(startDate, endDate);\n availabilityRanges.add(availabilityDate);\n }\n }\n\n return availabilityRanges;\n }", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "@Override\n\tpublic List<Affectation> getAllAfByKeyDate(String dateStart, String dateEnd) {\n\t\treturn dao.getAllAfByKeyDate(dateStart, dateEnd);\n\t}", "@Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n List<MeasurementEvent> findForPeriodTest(Date startDate, Date endDate);", "public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByStart(Date... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.START, values);\n }", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "public ArrayList<Foods> DataBaseLogFoodsGetFoods (long initialDate, long finalDate) {\n SQLiteDatabase db = this.getWritableDatabase();\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + COLUMN_DATE + \" BETWEEN \" +\n + initialDate + \" AND \" + finalDate + \" ORDER BY \" + COLUMN_DATE +\n \" ASC\";\n\n Cursor cursor = db.rawQuery(query, null);\n\n cursor.moveToFirst();\n int counter = cursor.getCount();\n ArrayList<Foods> foodsList = new ArrayList<>();\n for ( ; counter > 0; ) {\n if (cursor.isAfterLast()) break;\n Foods food = new Foods();\n food.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_ID)));\n food.setDate(cursor.getLong(cursor.getColumnIndex(COLUMN_DATE)));\n food.setName(cursor.getString(cursor.getColumnIndex(COLUMN_NAME)));\n food.setBrand(cursor.getString(cursor.getColumnIndex(COLUMN_BRAND)));\n food.setUnitsLogged(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS_LOGGED)));\n food.setCaloriesLogged(cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES_LOGGED)));\n food.setUnits(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS)));\n food.setUnitType(cursor.getString(cursor.getColumnIndex(COLUMN_UNIT_TYPE)));\n food.setCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES)));\n food.setMealTime(cursor.getString(cursor.getColumnIndex(COLUMN_MEAL_TIME)));\n food.setIsCustomCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_IS_CUSTOM_CALORIES)) == 1);\n foodsList.add(food);\n cursor.moveToNext();\n }\n\n cursor.close();\n db.close(); // Closing database connection\n return foodsList;\n }", "public java.util.List<Todo> findAll(int start, int end);", "@Override\n\tpublic List<Affectation> getAllAfByKeyDate(Date dateStart, Date dateEnd) {\n\t\treturn dao.getAllAfByKeyDate(dateStart, dateEnd);\n\t}", "public void fillList(int roomid, String inputdateTo, String inputdateFrom) {\n list = new ArrayList();\n Connection cnn = null;\n Statement st = null;\n ResultSet rs = null;\n\n String sql = \"select sche.scheduleID as ID,shift.shiftname as shiftname,lab.roomName as roomName,d.dateword as datework,\"\n + \" we.keyword as keywork,sche.status as status,sche.dateworkID sdateworkID from tbl_schedule as sche inner join \"\n + \" tbl_shiftname as shift on sche.shiftID=shift.shiftID inner \"\n + \" join tbl_labroom as lab on sche.roomID=lab.roomID inner join \"\n + \" tbl_datework as d on sche.dateworkID=d.datewordID inner join \"\n + \" days_week as we on d.dayID=we.dayID where lab.roomID=\" + roomid;\n if (inputdateTo.trim().length() > 3) {\n sql += \" and d.dateword >='\" + inputdateTo + \"'\";\n }\n if (inputdateFrom.trim().length() > 3) {\n sql += \" and d.dateword <='\" + inputdateFrom + \"'\";\n }\n sql += \" order by ID desc \";\n //String connectionURL = \"jdbc:odbc:sem4\";\n try {\n //Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n //cnn = DriverManager.getConnection(connectionURL, \"lab\", \"\");\n cnn = dbconnect.Connect();\n st = cnn.createStatement();\n rs = st.executeQuery(sql);\n int count = 0;\n String ID = \"\";\n String shiftname = \"\";\n String status = \"\";\n String roomName = \"\";\n String datework = \"\";\n String daysweek = \"\";\n int dateworkID = 0;\n SimpleDateFormat formarter = new SimpleDateFormat(\"EE, MMM d,yyyy\");\n while (rs.next()) {\n count = count + 1;\n ID += rs.getInt(\"ID\") + \"/\";\n shiftname += rs.getString(\"shiftname\") + \"/\";\n roomName = rs.getString(\"roomName\");\n\n datework = formarter.format(rs.getDate(\"datework\"));\n daysweek = rs.getString(\"keywork\");\n status += rs.getString(\"status\") + \"/\";\n dateworkID = rs.getInt(\"sdateworkID\");\n int totalShift = cntShiftShow();\n if (count % totalShift == 0) {\n list.add(new classSchedule(ID, shiftname, roomName, datework, daysweek, status, dateworkID));\n ID = \"\";\n shiftname = \"\";\n status = \"\";\n roomName = \"\";\n datework = \"\";\n daysweek = \"\";\n }\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(showSchedule.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public List<Timetable> getListSearch(String from, String to) throws Exception;", "@Override\r\n\tpublic List<HomePack> queryList(Date start,Date end,List<String> station) {\n\t\tList<HomePack> list = homePageDao.queryList(start,end,station);\r\n\t\treturn list;\r\n\t}", "@Override\r\n\tpublic List<Price> queryPriceBei(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryPriceBei(start,end);\r\n\t\treturn list;\r\n\t}", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "public static List<Long> getData_entryDates() {\r\n\t\treturn data_entryDates;\r\n\t}", "public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }", "public ArrayList<Menu> buscarPorFecha(Date fechaIni,Date fechaTer );", "@SuppressWarnings(\"unchecked\")\n public List<ConnectionMeterEvent> findConnectionMeterEventsForPeriod(LocalDate fromDate, LocalDate endDate) {\n StringBuilder queryString = new StringBuilder();\n queryString.append(\"SELECT cme FROM ConnectionMeterEvent cme \");\n queryString.append(\" WHERE cme.dateTime >= :fromDate \");\n // it is inclusive because i add a day to the endDate\n queryString.append(\" AND cme.dateTime < :endDate \");\n\n Query query = getEntityManager().createQuery(queryString.toString());\n query.setParameter(\"fromDate\", fromDate.toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"endDate\", endDate.plusDays(1).toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n\n return query.getResultList();\n }", "public ArrayList<ConsumptionInstance> generateConsumptionInstances(long start_time, long end_time) {\n GregorianCalendar c = (GregorianCalendar) this.start_date.clone();\n ArrayList<ConsumptionInstance> result = new ArrayList<>();\n Collections.sort(this.timings);\n\n while(c.getTimeInMillis() < end_time + Utility.MILLIS_IN_DAY) {\n for (TimeOfDay t : timings) {\n c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(t.getHour()));\n c.set(Calendar.MINUTE, Integer.valueOf(t.getMinute()));\n long millis = c.getTimeInMillis();\n\n if (start_time <= millis && millis < end_time) {\n ConsumptionInstance ci = new ConsumptionInstance(this.id, (GregorianCalendar) c.clone(),\n this.drug);\n if (deleted.contains(millis)) {\n ci.setDeleted(true);\n }\n result.add(ci);\n }\n }\n c.add(Calendar.DAY_OF_MONTH, this.interval);\n }\n\n return result;\n }", "public void AddAvailableDates()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < openDates.size(); i++)\n\t\t\t{\n\t\t\t\tboolean inTable = CheckAvailableDate(openDates.get(i)); \n\t\t\t\tif(inTable == false)\n\t\t\t\t{\n\t\t\t\t\tquery = \"INSERT INTO Available(available_hid, price_per_night, startDate, endDate)\"\n\t\t\t\t\t\t\t+\" VALUE(\"+hid+\", \"+price+\", '\"+openDates.get(i).stringStart+\"', '\"+openDates.get(i).stringEnd+\"')\";\n\t\t\t\t\tint result = con.stmt.executeUpdate(query); \n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public java.util.List<DataEntry> findAll(\n\t\tint start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);", "public List<Viaje> getClientTravelsInPeriod(String clientNif, Date initDate, Date endDate) {\n EntityManager em = getEntityManager();\n return em.createNamedQuery(\"Viaje.getClientTravelsByDate\")\n .setParameter(\"clientNif\", clientNif)\n .setParameter(\"initDate\", initDate)\n .setParameter(\"endDate\", endDate).getResultList();\n }", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfTransactionDate(LocalDate lowerInclusive, LocalDate upperInclusive) {\n return fetchRange(Income.INCOME.TRANSACTION_DATE, lowerInclusive, upperInclusive);\n }", "public ListDatesFiles(DataDate startDate, DownloadMetaData data, ProjectInfoFile project) throws IOException\r\n {\r\n sDate = startDate;\r\n mData = data;\r\n lDates = null;\r\n mapDatesFiles = null;\r\n mProject = project;\r\n mapDatesFiles = null;\r\n mapDatesFilesSet = new Boolean(false);\r\n }", "public void setDateRange(Date start, Date end)\n {\n descriptorManager.readFileDescriptors(start,end);\n }", "@Override\r\n\tpublic void getPhotosByDate(String start, String end) {\n\t\tDate begin=null;\r\n\t\tDate endz=null;\r\n\t\t/*check if valid dates have been passed for both of the variables*/\r\n\t\ttry {\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\r\n\t\t\tdateFormat.setLenient(false);\r\n\t\t\tbegin = dateFormat.parse(start);\r\n\t\t\tendz = dateFormat.parse(end);\r\n\t\t\t}\r\n\t\t\tcatch (ParseException e) {\r\n\t\t\t String error=\"Error: Invalid date for one of inputs\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t\t}\r\n\t\tif(begin.after(endz)){\r\n\t\t\tString error=\"Error: Invalid dates! Your start is after your end\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t}\r\n\t\t/*I don't need the this if but I'm going to keep it\r\n\t\t * to grind your gears*/\r\n\t\tif(endz.before(begin)){\r\n\t\t\tString error=\"Error: Invalid dates! Your end date is before your start\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t}\r\n\t\tString listPhotos=\"\";\r\n\t\tList<IAlbum> album1=model.getUser(userId).getAlbums();\r\n\t\tString success=\"\";\r\n\t\tString albumNames=\"\";\r\n\t//\tInteractiveControl.PhotoCompare comparePower=new InteractiveControl.PhotoCompare();\r\n\t\tfor(int i=0; i<album1.size();i++){\r\n\t\t\tIAlbum temp=album1.get(i);\r\n\t\t\tList<IPhoto> photoList=temp.getPhotoList();\r\n\t\t\tInteractiveControl.PhotoCompare comparePower=new InteractiveControl.PhotoCompare();\r\n\t\t\tCollections.sort(photoList, comparePower);\r\n\t\t\tfor(int j=0; j<photoList.size();j++){\r\n\t\t\t\tif(photoList.get(j).getDate().after(begin) && photoList.get(j).getDate().before(endz)){\r\n\t\t\t\t\t/* getPAlbumNames(List<IAlbum> albums, String photoId)*/\r\n\t\t\t\t\talbumNames=getPAlbumNames(album1, photoList.get(j).getFileName());\r\n\t\t\t\t\tlistPhotos=listPhotos+\"\"+photoList.get(j).getCaption()+\" - \"+albumNames+\"- Date: \"+photoList.get(j).getDateString()+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuccess=\"Photos for user \"+userId+\" in range \"+start+\" to \"+end+\":\\n\"+listPhotos;\r\n\t\tsetErrorMessage(success);\r\n\t\tshowError();\r\n\t\t\r\n\r\n\t}", "private List<Object[]> getAllVisitInfoFromDailyReportByStartDateAndEndDate(final Date startDate, final Date endDate,\n final Employee_mst selectedEmployee) {\n return this.dailyRepo\n .getAllVisitInfoFromDailyReportByStartDateAndEndDate(selectedEmployee.getEmp_code(), startDate, endDate)\n .getResultList();\n }", "public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }", "public ArrayList<Question> filterByStart(ArrayList<Question> input, LocalDate start) {\n\n /* The final filtered arrayList */\n ArrayList<Question> filtered = new ArrayList<>();\n\n /* Go through the entire input arraylist checking each question. */\n for (int i = 0 ; i < input.size(); i++) {\n\n /* If the question date is after the start date, then add it to the new ArrayList. */\n if (input.get(i).getDate().compareTo(start) >= 0) {\n filtered.add(input.get(i));\n }\n }\n\n return filtered;\n }", "Map<String, List<BuildDetails>> getProjectExecutions(String startDate,\n\t String endDate);", "@Override\n\tpublic List<Equipment> getEquipmentByDate(String dateStart, String dateEnd) {\n\t\treturn dao.getEquipmentByDate(dateStart, dateEnd);\n\t}" ]
[ "0.7009231", "0.69498444", "0.65329903", "0.64257705", "0.6372772", "0.63676393", "0.63311815", "0.6325997", "0.63009864", "0.62828755", "0.62800634", "0.62723625", "0.62187004", "0.61844546", "0.6177208", "0.6124976", "0.6123458", "0.609915", "0.6086441", "0.6063628", "0.6050861", "0.6034648", "0.6029146", "0.6022481", "0.5935598", "0.59334415", "0.5921383", "0.58778685", "0.58751714", "0.58743244", "0.587385", "0.58718973", "0.58252466", "0.58158296", "0.5806956", "0.5794042", "0.5784106", "0.57834864", "0.5774128", "0.5772442", "0.576444", "0.5761815", "0.57434297", "0.57416815", "0.5732643", "0.5720197", "0.5719714", "0.5716181", "0.5716159", "0.57124156", "0.5698675", "0.56752014", "0.56573856", "0.56504303", "0.56459", "0.56426364", "0.5639243", "0.563158", "0.56202847", "0.5611581", "0.5608703", "0.55994236", "0.5596644", "0.55959344", "0.5593229", "0.5566421", "0.55569774", "0.55564386", "0.55412674", "0.55358607", "0.55340767", "0.55188835", "0.5518385", "0.55099136", "0.55063206", "0.55057716", "0.549932", "0.54989845", "0.5481545", "0.54810697", "0.54797864", "0.547719", "0.5453572", "0.54521453", "0.5449021", "0.54472476", "0.54465145", "0.54455465", "0.54383224", "0.54231155", "0.54227215", "0.54193574", "0.5412026", "0.54091424", "0.540667", "0.540625", "0.54016167", "0.53952336", "0.53841996", "0.53768677" ]
0.54438865
88
Opens a connection to the DB:
public Connection getConnection(String username, String password) { Scanner scan = new Scanner(System.in); //System.out.print("Username: "); //this.username = scan.nextLine(); //System.out.print("Password: "); //this.password = scan.nextLine(); // Registering the JDBC Driver try { Class.forName(driver); } catch (ClassNotFoundException e) { e.printStackTrace(); } // Opening a connection to the database: Connection connection = null; try { connection = DriverManager.getConnection (jdbc_url, username, password); } catch (SQLException e) { e.printStackTrace(); } return connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection openConnection(){\n try {\n c = DriverManager.getConnection(\"jdbc:sqlite:LIB.db\");\n s = c.createStatement();\n\n System.out.println(\"Database connection open\");\n return c;\n }catch (SQLException e) {\n System.err.println(\"Opening connection failed: \" + e.getMessage());\n }\n return null;\n }", "public Connection openDBConnection() {\n try {\n // Load driver and link to driver manager\n Class.forName(\"oracle.jdbc.OracleDriver\");\n // Create a connection to the specified database\n Connection myConnection = DriverManager.getConnection(\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" +\n \"csci.cscioraclesrv.ad.csbsju.edu\",\"TEAM5\", \"mnz\");\n return myConnection;\n } catch (Exception E) {\n E.printStackTrace();\n }\n return null;\n }", "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }", "protected void openConnection() {\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:sqlite:\" + name);\n\t\t\tif (conn == null) {\n\t\t\t\tconnectionOpened = false;\n\t\t\t} else {\n\t\t\t\tconnectionOpened = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connect problem: \" + e.getMessage());\n\t\t\tconn = null;\n\t\t}\n\t}", "public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void openConnection(){\n\n\t\tString dbIP = getConfig().getString(\"mysql.ip\");\n\t\tString dbDB = getConfig().getString(\"mysql.databaseName\");\n\t\tString dbUN = getConfig().getString(\"mysql.username\");\n\t\tString dbPW = getConfig().getString(\"mysql.password\");\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://\" + dbIP + \"/\" + dbDB, dbUN, dbPW);\n\t\t\tgetLogger().info(\"Connected to databse!\");\n\t\t} catch (SQLException ex) {\n\t\t\t// handle any errors\n\t\t\tgetLogger().info(\"SQLException: \" + ex.getMessage());\n\t\t\tgetLogger().info(\"SQLState: \" + ex.getSQLState());\n\t\t\tgetLogger().info(\"VendorError: \" + ex.getErrorCode());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tgetLogger().info(\"Gabe, you done goof'd!\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void open()\n\t{\n\t\ttry\n\t\t{\n\t\t\tClass.forName(PATH_DRIVER_JDBC).newInstance();\n\t\t\tCONNECTION \t= DriverManager.getConnection(PATH_DB,USER,PASSWORT);\n\t\t\tSTATEMENT \t= CONNECTION.createStatement();\n\t\t\tlink = true;\n\t\t\n\t\t} catch (Exception e) \n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Connection openConnection() throws SQLException {\r\n\t\tConnection dbConnection = DriverManager.getConnection(databaseURL, username, password);\r\n\t\treturn dbConnection;\r\n\t}", "private void openConnection() {\n try {\n dbConnection\n = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n System.err.println(\"Exception in connecting to mysql database\");\n System.err.println(ex.getMessage());\n }\n }", "private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}", "private void openConnection () {\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(\n\t\t\t\t\tPasswordProtector.HOST,\n\t\t\t\t\tPasswordProtector.USER,\n\t\t\t\t\tPasswordProtector.PASSWORD);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t}\n\t}", "public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here */\n\t\t\tc = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:postgresql://localhost:5432/testdata\", \"postgres\",\n\t\t\t\t\t\" \");\n\n\t\t\tlogger.info(\"Opened database successfully\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstatus = OPEN_SUCCESS;\n\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection openConnection() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new oracle.jdbc.OracleDriver());\n\n String host = \"localhost\";\n String port = \"1521\";\n String dbName = \"xe\"; //\"coen280\";\n String userName = \"temp\";\n String password = \"temp\";\n\n // Construct the JDBC URL \n String dbURL = \"jdbc:oracle:thin:@\" + host + \":\" + port + \":\" + dbName;\n return DriverManager.getConnection(dbURL, userName, password);\n }", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "private void connectToDB() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n this.conn = DriverManager.getConnection(prs.getProperty(\"url\"),\n prs.getProperty(\"user\"), prs.getProperty(\"password\"));\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static Connection openConnection() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(DRIVER);\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn conn;\n\t\t\n\t}", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }", "public void openConnection() throws SQLException {\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n this.dbConnection = DriverManager.getConnection(\n this.url,\n this.username,\n this.password);\n\n this.dbConnection.setAutoCommit(false);\n this.connected = true;\n\n Logger logger = Logger.getAnonymousLogger();\n logger.log(Level.INFO, \"Database connection successful\");\n\n }", "public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public static void openConnection() {\n try {\n connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"kevin2000\");\n connection.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private static Connection connectToDB() {\n\t\t\tConnection con = null;\n\t\t\ttry {\n\t\t\t\t// Carichiamo un driver di tipo 1 (bridge jdbc-odbc).\n\t\t\t\t//String driver = \"sun.jdbc.odbc.JdbcOdbcDriver\";\n\t\t\t\tClass.forName(DRIVER);\n\t\t\t\t// Creiamo la stringa di connessione.\n\t\t\t\t// Otteniamo una connessione con username e password.\n\t\t\t\tcon = DriverManager.getConnection (URL, USER, PSW);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn con;\n\t\t}", "protected void openConnection() throws SQLException {\n connection = DriverManager.getConnection(\"jdbc:mysql://stusql.dcs.shef.ac.uk/team021\", \"team021\", \"5f4306d9\");\n }", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public Connection OpenConnection() {\n try {\n //obtenemos el driver para SQLSERVER\n Class.forName(driver);\n //obtenemos la conexion\n con = DriverManager.getConnection(url, user, pass);\n if (con != null) {\n System.out.println(\"OK base de datos \" + bd + \" listo\");\n }\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n }\n return con;\n }", "private void connect() {\n if (this.connection == null && !this.connected) {\n try {\n this.connection = DriverManager.getConnection(this.dbUrl, this.dbUser, this.dbPassword);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "public static Connection connectToDB(){\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:C:\\\\Users\\\\abbas\\\\Documents\\\\NetBeansProjects\\\\Plookify\\\\build\\\\classes\\\\Abbas\\\\plookifyDB.sqlite\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n } catch ( Exception e ) {\n System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n }\n //System.out.println(\"Opened database successfully\");\n return c;\n }", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "public Connection connect(String filename) throws SQLException {\n //System.out.printf(\"Connecting to the database %s.%n\", filename);\n /* \n * Connect to the database (file). If the file does not exist, create it.\n */\n Connection db_connection = DriverManager.getConnection(SQLITEDBPATH + filename);\n //System.out.printf(\"Connection to the database has been established.%n\");\n /* \n * Get the database metadata.\n */\n DatabaseMetaData meta = db_connection.getMetaData();\n //System.out.printf(\"The driver name is %s.%n\", meta.getDriverName());\n \n return db_connection;\n }", "public void openConnection() throws Exception {\r\n configProps.load(new FileInputStream(configFilename));\r\n\r\n jSQLDriver = configProps.getProperty(\"flightservice.jdbc_driver\");\r\n jSQLUrl = configProps.getProperty(\"flightservice.url\");\r\n jSQLUser = configProps.getProperty(\"flightservice.sqlazure_username\");\r\n jSQLPassword = configProps.getProperty(\"flightservice.sqlazure_password\");\r\n\r\n /* load jdbc drivers */\r\n Class.forName(jSQLDriver).newInstance();\r\n\r\n /* open connections to the flights database */\r\n conn = DriverManager.getConnection(jSQLUrl, // database\r\n jSQLUser, // user\r\n jSQLPassword); // password\r\n\r\n conn.setAutoCommit(true); //by default automatically commit after each statement\r\n\r\n /* You will also want to appropriately set the transaction's isolation level through:\r\n conn.setTransactionIsolation(...)\r\n See Connection class' JavaDoc for details.\r\n */\r\n }", "public Connection connect() throws SQLException {\n Connection connection = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + dbName;\n connection = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return connection;\n }", "public void open() throws SQLException {\n try {\n Class.forName(driverName);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n return;\n }\n con = DriverManager.getConnection(url, userId, password);\n stmt = con.createStatement();\n isOpen = true;\n }", "public void openConnection(){\r\n try {\r\n Driver dr = new FabricMySQLDriver();\r\n DriverManager.registerDriver(dr);\r\n log.info(\"registrable driver\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n try {\r\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n log.info(\"get connection\");\r\n } catch (SQLException e) {\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "protected Connection openConnection() throws PersistenceException {\n\n String connectionName = getConnectionName();\n if ( connectionName == null){\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using default connection\"));\n } else {\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using connection name: \" + connectionName));\n }\n Connection conn = Helper.createConnection(getConnectionFactory(),\n connectionName);\n try {\n \tif(useManualCommit) {\n \t\tconn.setAutoCommit(false);\n \t}\n return conn;\n } catch (SQLException e) {\n throw new PersistenceException(\"Error occurs when setting \"\n + (connectionName == null ? \"the default connection\"\n : (\"the connection '\" + connectionName + \"'\"))\n + \" to support transaction.\", e);\n }\n\n }", "@SuppressWarnings(\"finally\")\n\tprivate static Connection openConnection() throws SQLException\n\t{\n\t\tConnection conn = null;\n\t\ttry\n\t\t{\n\t\t\tString url = Constants.getDatabaseConnectionURL();\n\t\t\tString username = Constants.getDatabaseUserName();\n\t\t\tString password = Constants.getDatabasePassword();\t\n\t\t\tClass.forName(k_driver);\n\t\t\t\t\n\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t\n\t\t\tcurrSession = conn;\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Class Loader Exception!\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\treturn conn;\n\t\t}\n\t}", "public void openConnection() throws SQLException {\r\n if (getConnection() == null || getConnection().isClosed()) {\r\n LOG.ok(\"Get new connection, it is closed\");\r\n setConnection(getNativeConnection(config));\r\n }\r\n }", "public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }", "protected static Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:database1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(\"Connect: \" + e.getMessage());\n }\n return conn;\n }", "public Connection ConnectDB() throws SQLException {\r\n String db=\"jdbc:postgresql://localhost:5432/Employee\";\r\n String user=\"postgres\";\r\n String pass=\"admin\";\r\n\r\n return DriverManager.getConnection(db,user,pass);\r\n\r\n }", "protected static Connection connect() throws SQLException, ClassNotFoundException {\r\n String url = \"jdbc:sqlite:\" + databasePath;\r\n Connection conn;\r\n\r\n Class.forName(DRIVER);\r\n SQLiteConfig config = new SQLiteConfig();\r\n config.enforceForeignKeys(true);\r\n conn = DriverManager.getConnection(url, config.toProperties());\r\n\r\n return conn;\r\n }", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "public Connection connectdb(){\n Connection con = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n con = DriverManager.getConnection(url, user, pass);\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(ILocker.class.getName()).log(Level.SEVERE, null, ex);\n }\n return con;\n }", "public void connectToDb() {\n try {\n con = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro: \" + ex.getMessage(), \"Mensagem de Erro\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public static void openCon() throws ClassNotFoundException, SQLException {\r\n\t\tClass.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n\r\n\t\tconn = DriverManager.getConnection(AGlobalComponents.dbConString);\r\n\t\tif (conn != null) {\r\n\t\t\tSystem.out.println(\"Successfully: Connected to Database\");\r\n\t\t} else\r\n\t\t\tSystem.out.println(\"Connection returned null!\");\r\n\t}", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "private void connectToDB() throws Exception\n\t{\n\t\tcloseConnection();\n\t\t\n\t\tcon = Env.getConnectionBradawl();\n\t}", "private static Connection newConnection() throws SQLException {\n\t\tOracleDataSource ods = new OracleDataSource();\n\t\tods.setURL(dburl);\n\t\tConnection conn = ods.getConnection();\n\t\treturn conn;\n\t}", "public Connection connect(){\n try{\n \n Class.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n conn = DriverManager.getConnection(dbUrl, name, pass);\n System.out.println(\"connected\");\n }\n catch(Exception e){\n System.out.println(\"connection problem\");\n }\n return conn;\n }", "private void open_db() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\"); \n Con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/projectlaundry\",\"root\",\"\");\n stm = Con.createStatement();\n }\n catch (Exception e){\n JOptionPane.showMessageDialog(null,\"Koneksi gagal\");\n System.out.println(e.getMessage());\n }\n }", "private Connection getDBConnection(){\n\t\tConnection conn = null;\n\t\t\t\t\n\t\ttry{\n\t\t\t\t// name of the database\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch(ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\t\n\t\ttry{\n\t\t\t// type of the database file\n\t\t\tString url = \"jdbc:sqlite:vehicles.sqlite\";\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn conn;\n\t}", "protected void OpenDBConnection() throws SQLException {\n\n connection = DriverManager.getConnection(\n \"jdbc:mysql://107.180.47.119:3306/ConcessionStand?useUnicode=true&characterEncoding=utf-8\" ,\n \"ConcessionWorker\" , \"CWoonrck066#\");\n\n System.out.println(\"Connected to database.\");\n stmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n stmt2 = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n System.out.println(\"Created statement.\");\n }", "public void connectToDatabase(){\n\t\ttry{\n\t\t connection = DriverManager.getConnection(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());\n\t\t System.out.println(\"Successfully connected to database.\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"An error occurred while attempting to connect to the database.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private static Connection connect(String url) throws SQLException {\n\ttry {\r\n\t\tDatabaseUtil.loadDatabaseDriver(url);\r\n\t} catch (ClassNotFoundException e) {\r\n\t\tlog.error(\"Could not find JDBC driver class.\", e);\r\n\t\tthrow (SQLException) e.fillInStackTrace();\r\n\t}\r\n\r\n\t// Step 2: Establish the connection to the database.\r\n\tString username = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.username\");\r\n\tString password = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.password\");\r\n\tlog.debug(\"connecting to DATABASE: \" + OpenmrsConstants.DATABASE_NAME\r\n\t\t\t+ \" USERNAME: \" + username + \" URL: \" + url);\r\n\treturn DriverManager.getConnection(url, username, password);\r\n}", "public void open() {\n if (mDB == null || !mDB.isOpen()) {\n Log.d(this.getClass().getName(), \"open new DB connection\");\n mDB = mDBHelper.getWritableDatabase();\n }\n }", "public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }", "public Connection connectToDb() {\n\t\ttry {\n\t\t\t // load the SQLite-JDBC driver using the current class loader\n\t\t Class.forName(\"org.sqlite.JDBC\");\n\t\t myDb = DriverManager.getConnection(\"jdbc:sqlite:Auth.db\");\n\t\t Statement statement = myDb.createStatement();\n\t\t statement.setQueryTimeout(30); // set timeout to 30 seconds.\n\t\t return myDb;\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(null,\n\t \t\t \"Cannot Connect to DB\",\n\t \t\t \"Error\",\n\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t}", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "public static void establishConnection()throws IOException, SQLException {\n connection= DriverManager.getConnection(\n Configuration.fileReader(\"dbhostname\"),\n Configuration.fileReader(\"dbusername\"),\n Configuration.fileReader(\"dbpassword\"));\n statement=connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n }", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "private static void connectDatabase(){\n\t\t// register the driver\n\t\ttry{\n\t\t\tClass.forName(DRIVER).newInstance();\n\t\t\tconnection = DriverManager.getConnection(CONNECTION_URL);\n\t\t} catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Connection getConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:sqlite:\" + dbName);\n } catch (SQLException e) {\n return null;\n }\n }", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }", "private void makeConnection() {\n try {\n InitialContext ic = new InitialContext();\n DataSource ds = (DataSource) ic.lookup(dbName);\n\n con = ds.getConnection();\n } catch (Exception ex) {\n throw new EJBException(\"Unable to connect to database. \" + ex.getMessage());\n }\n }", "private static Connection connect(){\n Connection conn = null;\n try{\n Class.forName(\"org.sqlite.JDBC\");\n conn = DriverManager.getConnection(\"jdbc:sqlite:devices.db\");\n } catch (ClassNotFoundException | SQLException e){\n System.out.println(e.toString());\n }\n return conn;\n }", "private static void connect() {\n\t\ttry {\n\t\t\tif (connection == null) {\n\t\t\t\tClass.forName(\"org.mariadb.jdbc.Driver\");\n\t\t\t\tconnection = DriverManager.getConnection(url, user, password);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "public void connectDB() {\n\t\tSystem.out.println(\"CONNECTING TO DB\");\n\t\tSystem.out.print(\"Username: \");\n\t\tusername = scan.nextLine();\n\t\tConsole console = System.console(); // Hides password input in console\n\t\tpassword = new String(console.readPassword(\"Password: \"));\n\t\ttry {\n\t\t\tDriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t} catch(Exception Ex) {\n\t\t\tSystem.out.println(\"Error connecting to database. Machine Error: \" + Ex.toString());\n\t\t\tEx.printStackTrace();\n\t\t\tSystem.out.println(\"\\nCONNECTION IS REQUIRED: EXITING\");\n\t\t\tSystem.exit(0); // No need to make sure connection is closed since it wasn't made\n\t\t}\n\t}", "public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }", "public DatabaseManager() {\n try {\n con = DriverManager.getConnection(DB_URL, \"root\", \"marko\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "static Connection getDBConnection(){\r\n\t\t if(mainConnection != null)\r\n\t\t\t return mainConnection;\r\n\t\t \r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// loading Oracle Driver\r\n\t\t \t\tSystem.out.print(\"Looking for Oracle's jdbc-odbc driver ... \");\r\n\t\t\t \tDriverManager.registerDriver(new oracle.jdbc.OracleDriver());\r\n\t\t\t \tSystem.out.println(\", Loaded.\");\r\n\r\n\t\t\t\t\tString URL = \"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\t\t \tString userName = \"system\";\r\n\t\t\t \tString password = \"password\";\r\n\r\n\t\t\t \tSystem.out.print(\"Connecting to DB...\");\r\n\t\t\t \tmainConnection = DriverManager.getConnection(URL, userName, password);\r\n\t\t\t \tSystem.out.println(\", Connected!\");\r\n\t\t \t\t}\r\n\t\t \t\tcatch (Exception e)\r\n\t\t \t\t{\r\n\t\t \t\tSystem.out.println( \"Error while connecting to DB: \"+ e.toString() );\r\n\t\t \t\te.printStackTrace();\r\n\t\t \t\tSystem.exit(-1);\r\n\t\t \t\t}\r\n\t\t\t\treturn mainConnection;\r\n\t\t \r\n\t}", "public DbConnection() throws SQLException, ClassNotFoundException {\r\n\t\tClass.forName (DRIVER);\r\n\t\tconn = DriverManager.getConnection(CONNECTION, \"JavaDev\", \"password\");\r\n\t\tstmt = conn.createStatement();\r\n\t}", "private void connect() {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n this.conn = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n } catch (ClassNotFoundException | SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }", "public Connection connectToDB() throws SQLException {\n\n\t if (conn == null) try {\n\n\t Class.forName(DRIVERCLASS);\n\t \n\t //system.out.println(\"驱动加载成功\");\n\t \n\t //system.out.println(\"数据库连接建立成功\");\n\t \n\t conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n\n\t connset.add(conn);\n\n\t } \n\n\t catch (ClassNotFoundException ex) {\n\t \t\n\t //system.out.println(\"加载数据库驱动程序异常\");\n\t \n\t ex.printStackTrace();\n\n\t }\n\n\t return conn;\n\n\t }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "private Connection connect() {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/paymentdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}", "public static Connection getConnection() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString dbDirectory = \"C:/Users/MAX-Student/Desktop/java/db\";\r\n\t\t\tSystem.setProperty(\"derby.system.home\", dbDirectory);\r\n\r\n\t\t\t// set the db url, username, and password\r\n\t\t\tString url = \"jdbc:derby:InspirationalDB\";\r\n\t\t\tString username = \"\";\r\n\t\t\tString password = \"\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\r\n\t\t\treturn connection;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\tfor (Throwable t : e)\r\n\t\t\t\tt.printStackTrace(); // for debugging\r\n\t\t\treturn null;\r\n\t\t }\r\n\t}", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "@Override\n public void openConnection() throws DAOManagerException {\n try {\n connection = ds.getConnection();\n //save autocommit value\n this.autoCommit = connection.getAutoCommit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't get connection \", e);\n throw new DAOManagerException(e);\n }\n\n }", "private Connection connect() throws SQLException {\n\n\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/Duncan/Desktop/TBAG.db;create=true\");\t\n\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:derby:/Users/adoyle/Desktop/TBAG.db;create=true\");\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/kille/Desktop/TBAG.db;create=true\");\t\t\n\t\t\t//Connection conn = DriverManager.getConnection(\"jdbc:derby:C:/Users/jlrhi/Desktop/TBAG.db;create=true\");\n\n\t\t\t\n\t\t\t// Set autocommit() to false to allow the execution of\n\t\t\t// multiple queries/statements as part of the same transaction.\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\treturn conn;\n\t\t}", "private Connection connect(String dbName) {\r\n\t\tString url = \"jdbc:sqlite:\" + dbName; // dbName is looked in project folder\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\t// create a connection to the db\r\n\t\t\tconn = DriverManager.getConnection(url);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace(System.out);\t\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public Connection connect() {\n\t\t\n\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Creating connection\");\n\t\treturn connection;\n\n\t}", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}", "public static Connection createConnection() throws Exception {\n \tClass.forName(DRIVER);\n \treturn DriverManager.getConnection(DBURL, USERNAME, PASSWORD); \t\n }", "private Connection createConnection() {\r\n\tConnection result = null;\r\n\r\n\ttry {\r\n\t Class.forName(\"org.sqlite.JDBC\");\r\n\t result = DriverManager.getConnection(\"jdbc:sqlite:\" + fileName);\r\n\t} catch (Exception e) {\r\n\t result = null;\r\n\t}\r\n\r\n\treturn result;\r\n }", "public static Connection getConnection() {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/soccer\" ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }" ]
[ "0.7745923", "0.77101445", "0.77081215", "0.76783997", "0.7673112", "0.7658179", "0.7584413", "0.7556184", "0.75390625", "0.7524674", "0.7474249", "0.74229884", "0.74071205", "0.7403742", "0.73491544", "0.73395264", "0.7323137", "0.72986937", "0.7296593", "0.7246668", "0.7230053", "0.72277576", "0.7224956", "0.72095984", "0.7198484", "0.7186183", "0.7185419", "0.71815884", "0.71544284", "0.71542835", "0.7150781", "0.71472424", "0.7143089", "0.7138911", "0.7133606", "0.71305656", "0.7128499", "0.71199733", "0.7108345", "0.7104732", "0.7090849", "0.70876026", "0.7054938", "0.7052925", "0.70387304", "0.70331573", "0.70298016", "0.70182884", "0.70150787", "0.7004477", "0.6997764", "0.698765", "0.69786733", "0.69773716", "0.69728917", "0.69584644", "0.69503164", "0.6950117", "0.69377285", "0.6923166", "0.69163054", "0.6914611", "0.6911255", "0.6909933", "0.6904114", "0.6899088", "0.6896737", "0.6879704", "0.6877309", "0.6870884", "0.68466944", "0.6843367", "0.6841921", "0.68389255", "0.68358546", "0.6827458", "0.6826837", "0.6823916", "0.68230164", "0.68165076", "0.6815928", "0.6810562", "0.6793512", "0.6788239", "0.678637", "0.6785263", "0.67831856", "0.6781251", "0.6780019", "0.67743474", "0.6768632", "0.6768172", "0.67673224", "0.6766077", "0.6765559", "0.6764507", "0.67567384", "0.6755761", "0.67479044", "0.67477167", "0.67465055" ]
0.0
-1
Closes a DB Connection:
public void close(Connection connection) throws SQLException { try { connection.close(); } catch (SQLException e) { throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeDBConnection() {\r\n\t\ttry {//如果连接有效(存在),关闭他\r\n\t\t\tif (dbConnection != null /*&& !dbConnection.isClosed()*/){\r\n\t\t\t\tdbConnection.close();// Return to connection pool\r\n\t\t\t\tdbConnection = null; //Make sure we don't close it twice\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tErrorLog.log(\"Database->closeDBConnection:\" + e.getMessage()+\"//\"+ e);\r\n\t\t}\r\n\t}", "public void closeDB() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tconn = null;\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Failed to close database connection: \" + e);\n\t\t}\n\t}", "public void closeDB() throws SQLException\r\n {\r\n conn.close();\r\n }", "public void close() {\n try {\n connect.close();\n } catch (SQLException ex) {\n System.err.println(\"Error while closing db connection\" + ex.toString());\n }\n }", "public void closeConnection() {\n try {\n //check if the connection is not null close it and make it null.\n if (this.dbConnection != null) {\n this.dbConnection.close();\n this.dbConnection = null;\n }\n } catch (SQLException ex) {\n System.err.println(\"Exception in closing the connection\");\n System.err.println(ex.getMessage());\n }\n }", "private void closeConnection() { // TEMPORARILY PUBLIC\n if (db != null) {\n db.close();\n }\n }", "public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}", "public final void close() {\n\t\ttry {\n\t\t\tcon.commit( ); // Commit any updates\n\t\t\tcon.close ( );\n\t\t}\n\t\tcatch ( Exception e ) {\n\t\t\tnotify( \"Db.close\", e );\n\t\t};\n\t}", "public void closeConnection() {\n client.close();\n System.out.println(\"Connection to db closed.\");\n }", "private void closeDatabase() {\r\n try {\r\n if ( connect != null ) {\r\n connect.close();\r\n }\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: Could not close database connection, \" + e.getMessage() );\r\n } finally {\r\n connect = null;\r\n }\r\n }", "public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }", "public void closeCon(){\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmyConnection.close();\r\n\r\n\t\t}\r\n\r\n\t\tcatch (SQLException e )\r\n\t\t{\r\n\t\t\tSystem.out.println(\"something went wrong with closing DB connection\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void closeConnection() {\n try {\n String token = conn.toString();\n conn.close();\n log.info(\"Database Connection Closed. ID: {} \", token);\n } catch (Exception e) {\n log.error(\"Error closing the database connection. \\n Trace: {}\", ExceptionUtilities.stacktraceToString(e));\n }\n }", "public void disconnectDB() {\n try {\n this.conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n if (this.conn != null) {\n try {\n this.conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n }", "protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}", "public static void closeConnection(){\n try {\n if (connection != null) {\n connection.close();\n System.out.println(\"Database Connection closed\");\n }\n } catch (SQLException e) {\n // connection close failed.\n System.err.println(e.getMessage());\n }\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR: cannot close connection to local database\");\n\t\t}\n\t}", "public void closeDB() {\n\t\tboolean gotSQLExc = false;\n\t\ttry {\n\t\t\tconn.close();\n //DriverManager.getConnection(\"jdbc:derby:;shutdown=true\"); \n \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tif (e.getSQLState().equals(\"XJ015\") ) {\t\t\n\t gotSQLExc = true;\n\t } else e.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void close()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.conexao.close();\n\t\t\tSystem.out.println(\"\\n\"+nomeDao+\" desconectado!\\n\");\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tSystem.out.println(\"\\nNao ha conexao \"+nomeDao+\" a ser fechada!\\n\");\n\t\t}\n\t}", "public void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdatabaseConnection.close();\n\t\t}\n\t\tcatch (SQLException currentSQLError)\n\t\t{\n\t\t\tdisplaySQLErrors(currentSQLError);\n\t\t}\n\t}", "public void closeConnection() throws SQLException;", "public void close () throws IOException , GateException {\n try{\n conn.close();\n }\n catch (SQLException e){\n log.error(\"Problem closing database connection\", e);\n System.exit(5);\n }\n\n }", "public void close() throws SQLException;", "public void close() {\n \t\tdb.close();\n \t}", "public void close() {\n try {\n con.close();\n } catch (SQLException se) { /*can't do anything */ }\n try {\n stmt.close();\n } catch (SQLException se) { /*can't do anything */ }\n }", "public static void closeDatabase() {\n\t\ttry {\n\t\t\tif (status == OPEN_SUCCESS) {\n\t\t\t\tif (stmt != null)\n\t\t\t\t\tstmt.close();\n\t\t\t\tif (c != null)\n\t\t\t\t\tc.close();\n\t\t\t\tlogger.info(\"Closed database successfully\");\n\t\t\t} else {\n\t\t\t\tlogger.warn(\"Can not close: previous operation failed.\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static void close_DB() {\n try {\n for (int i=0; i<conns; i++) {\n if (con_pool[i]!=null)\n con_pool[i].close();\n }\n } catch (SQLException ex) {\n Logger.getLogger(DB_Backend.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void close()\r\n {\r\n try\r\n {\r\n connection.close();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }", "public void close() {\n if (db.isOpen()) {\n db.close();\n }\n }", "public void closeConnection(Connection conn) throws SQLException;", "public void close() {\n\t\t\tdb.close();\n\t\t}", "public void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() throws SQLException {\n conn.close();\r\n }", "public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }", "public void closeConnection() throws SQLException {\n\t\tDatabase.closeConnection();\n\t}", "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().close();\r\n }\r\n }catch(Exception e){};\r\n \r\n connections_.clear();\r\n }", "private void closeConnection(Connection dbConnection) throws SQLException {\r\n\t\tif (dbConnection != null) {\r\n\t\t\tdbConnection.close();\r\n\t\t}\r\n\t}", "public void close() throws SQLException {\r\n connection.close();\r\n }", "private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void closeDB() {\n/* 29 */ Connection conn = null;\n/* 30 */ PreparedStatement pstmt = null;\n/* 31 */ ResultSet rs = null;\n/* */ \n/* */ try {\n/* 34 */ if (rs != null) rs.close(); \n/* 35 */ if (pstmt != null) pstmt.close(); \n/* 36 */ if (conn != null) conn.close(); \n/* 37 */ System.out.println(\"DB 접속 해제\");\n/* 38 */ } catch (Exception e) {\n/* 39 */ e.printStackTrace();\n/* */ } \n/* */ }", "public void close() {\n db.close();\n }", "public void close() {\n db.close();\n }", "private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}", "void close() throws SQLException;", "public void closeConnection() {\n try {\n con.close();\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public void close () throws SQLException {\r\n\t\tconn.close();\r\n\t}", "public void closeConnection() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException sqlEx) {\n dbg(\"closeConnection-->SQLException raised while closing conn =\" + sqlEx.getMessage());\n }\n }\n }", "public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }", "public void close() throws SQLException {\n connection.close();\n }", "public void close(){\n this.db.close();\n }", "public void closeConnection() throws SQLException {\n if(connected) {\n dbConnection.close();\n }\n Logger logger = Logger.getAnonymousLogger();\n logger.log(Level.INFO, \"Closed connection successfully\");\n }", "public void close() throws SQLException{\n\t\tconn.close();\n\t}", "public static void dbClose(String databaseName) throws Exception {\n DataBaseConnection.closeConnection(databaseName);\n }", "public void close() {\r\n\t\ttry {\r\n\t\t\trs.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tst.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tconn.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void closeConnection() throws SQLException{\n getConnection().close();\n }", "public void close(){\n\t\tif(tr != null && tr.inTransaction()){\n\t\t\ttr.rollback();\n\t\t}\n\t\ttry{\n\t\t\tif(db != null)\n\t\t\t\tdb.close();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void close() throws SQLException {\n dataBaseConnector.close();\n }", "public void closeConnection() {\n try {\n if (db.isOpen())\n db.close();\n } catch(SQLException e) {\n Log.e(TAG, e.getMessage());\n }\n }", "public void closeConnection() {\n\t\ttry{\n\t\t\tif(this.connection!=null)\n\t\t\t\tthis.connection.close();\n\t\t}catch(SQLException se){\n\t\t\tse.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() {\n\t\tif (conn != null) {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch(SQLException se){\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t} \n\t}", "public static void closeConnection(){\r\n\t\tif(connection != null)\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "public void disconnect(){\n try {\n if(conn!=null){\n conn.close();\n System.out.println(\"Closed connection to the Database\");\n }else{\n System.out.println(\"Not closed connection to the Database\");\n }\n } catch (SQLException e) {\n System.out.println(\"ERROR, Cannot close the connection\" + e.getSQLState());\n }\n catch (NullPointerException e){\n System.out.println(\"ERROR, Not Created previous connection to the database\");\n e.getStackTrace();\n }\n }", "public void close(){\r\n if(conn!=null){\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n System.out.println(\"Error al cerrar la base de datos: \\n\"+ex.getMessage());\r\n }\r\n }\r\n }", "public void connectionClose() {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void closeConnection()\n {\n try{\n if(statement!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close statement ex:\"+ se.getMessage());\n }// do nothing\n try{\n if(connection!=null)\n connection.close();\n }catch(SQLException se){\n System.out.println(\"Close connection ex:\"+ se.getMessage());\n }//end finally try\n }", "public void close() {\r\n closeDatabase();\r\n }", "private static void disconnectDatabase(){\n\t\ttry{\n\t\t\tif (connection != null) connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void closeDBConnection() throws SQLException {\n if (sessionFactory.getCurrentSession() != null && sessionFactory.getCurrentSession().isOpen()) {\n sessionFactory.getCurrentSession().close();\n }\n }", "public void closeConnection() {\n //It's important to close the connection when you are done with it\n try {\n connection.close();\n DriverManager.getConnection(JDBC_URL + \";shutdown=true\"); // shut Derby down, See: https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html#shutdown\n } catch (SQLException ignore) {\n LOGGER.log(Level.SEVERE, \"Unable to close DB connection due to error {0}\", ignore.getMessage());\n\n // Alternative: Cascade the original exception (or rewrap it as a more specific exception)\n // Here, we just log it \n }\n }", "@Override\n public void close() {\n closeDB();\n }", "@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n {\r\n\t\t\t// Ignore, shutting down anyway\r\n }\r\n }", "public void closeConnection()\n {\n try { \n if(crowdCon != null) {\n crowdCon.close();\n crowdCon = null;\n }\n } catch (SQLException ex) {\n }\n }", "@Override public void close() throws SQLException {\r\n connection.close();\r\n connection = null;\r\n }", "public void closeConnection() {\n if (this.connection != null && this.connected) {\n try {\n this.connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }", "private void closeConnection() {\n try {\n bufferedWriter.close();\n } catch (IOException e) {\n System.err.println(\"Cannot close connection to MS SQL DB\");\n e.printStackTrace();\n }\n System.out.println(\"Close connection to MS SQL DB\");\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t}\n\t\tconn = null;\n\t}", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void close() throws SQLException {\n stmt.close();\n con.close();\n isOpen = false;\n }", "public void close() throws SQLException {\n\t}", "public void close() {\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException e) {\n logger.error(\"Failed to close the connection.\");\n }\n }\n }", "public void closeConnection(){\n try {\n connection.close();\n } catch (SQLException ex) {\n System.out.println(\"SQLException in closeConnection()\");\n }\n }", "public static void closeConnection()\n\t{\n\t\ttry\n\t\t{\n\t\t\tconnect.close();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection(){\r\n if (connection != null)\r\n try{\r\n log.info(\"close connection\");\r\n connection.close();\r\n }\r\n catch (SQLException e){\r\n log.error(e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "private void closeDirtyConnection() {\n\t\ttry {\n\t\t\tif (dirtyConnection != null) {\n\t\t\t\tdirtyConnection.close();\n\t\t\t}\n\t\t} catch (DatabaseException e) {\n\t\t} finally {\n\t\t\tdirtyConnection = null;\n\t\t}\n\t}", "@Override\n public void disconnect() {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // close connection and statement, shutdown driver\n try {\n statement.close();\n connection.close();\n DriverManager.getConnection(\"jdbc:derby:\" + db_name + \";shutdown=true\");\n is_open = false;\n } catch (SQLException e) {\n System.out.println(\"Java DB connection did not shutdown successfully.\");\n }\n\n //System.out.println(\"Java DB connection shutdown successfully!\");\n\n }", "public void close()\r\n {\r\n DBHelper.close();\r\n }", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}", "public void close()\n {\n DBHelper.close();\n }", "public void close()\n {\n DBHelper.close();\n }", "public void close()\n\t{\n\t\thdbTsDb.closeConnection();\n\t\thdbTsDb = null;\n\t\tif (timeSeriesDAO != null)\n\t\t\ttimeSeriesDAO.close();\n\t}", "public synchronized void close() {\n\n mOpenCounter--;\n\n if(mOpenCounter == 0) {\n // Closing database\n mDatabase.close();\n }\n }", "public void close(Connection c){\n try {\n c.close();\n }catch (SQLException e){\n e.getStackTrace();\n System.out.println(e.getMessage());\n }\n System.out.println(\"Database connection close!\");\n }", "public void close() {\n\t\tdbHelper.close();\n\t}", "@Override\n\tpublic void closeDB() {\n\t\tcommonDao.closeDB();\n\t}", "public void close() {\r\n\t\tthis.mDbHelper.close();\r\n\t}", "public void closeConnection();", "public void close() {\n\t\t_dbHelper.close();\n\t}", "public void close()\n\n {\n DBHelper.close();\n }", "public static void close()\n\t{\n\t\t\n\t\ttry \n\t\t{\t\t\t\n\t\t\t\n\t\t\tif (RESULT_SET != null)\n\t\t\t{\n\t\t\t\tRESULT_SET.close();\n\t\t\t}\n\t\t\t\n\t\t\tSTATEMENT.close();\n\t\t\tCONNECTION.close();\t\t\n\t\t\n\t\t} catch (Exception e)\n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void close_Connection(){\n\t\ttry{\n\t\t\toutfile.close();\n\t\t\tcon.close();\n\t\t\tSystem.out.println(\"MYSQL is disconnected\");\n\t\t//Catch SQL exception\t\t\n\t\t}catch(SQLException sqle){ \n\t\t\tsqle.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//Catch I/O exception\t\n\t\tcatch(IOException ioe){ \n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\t\t\n\t}" ]
[ "0.792744", "0.78044206", "0.7801315", "0.7586211", "0.75819975", "0.75160503", "0.75097805", "0.74814534", "0.74734175", "0.74518985", "0.74308205", "0.742912", "0.74058485", "0.7370651", "0.73587173", "0.7353992", "0.7347404", "0.7305299", "0.7301487", "0.7274735", "0.72492874", "0.72345847", "0.7222495", "0.7219258", "0.72191226", "0.72156215", "0.720212", "0.71858984", "0.7184546", "0.71751773", "0.7170532", "0.71704304", "0.71500075", "0.7149912", "0.71413577", "0.71386725", "0.7131331", "0.7129436", "0.71246284", "0.7119893", "0.71123827", "0.71123827", "0.71111536", "0.70998275", "0.7095045", "0.7087898", "0.70821524", "0.70641464", "0.70637476", "0.7063183", "0.70471454", "0.7039305", "0.70282143", "0.70274824", "0.70255613", "0.702063", "0.7019022", "0.70181596", "0.701437", "0.7010611", "0.70078015", "0.6997618", "0.6988214", "0.69827026", "0.6979055", "0.6976964", "0.6973981", "0.697087", "0.69705003", "0.69597775", "0.69537693", "0.6951523", "0.69365895", "0.6927629", "0.69217205", "0.6918577", "0.6910051", "0.6903439", "0.6903012", "0.6898847", "0.68916327", "0.6876325", "0.687342", "0.685491", "0.68546206", "0.6838869", "0.6837985", "0.68041956", "0.67988664", "0.67988664", "0.67937154", "0.6793331", "0.67863", "0.6785642", "0.67805624", "0.676257", "0.67592716", "0.6742121", "0.67393494", "0.6730327", "0.6709786" ]
0.0
-1
Inserts a new customer into the CUSTOMER table:
public void createCustomer(Connection connection) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()) { String sql = "INSERT INTO Customer VALUES (?, ?, ?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a unique Customer ID: "); setCID(Integer.parseInt(scan.nextLine())); pStmt.setInt(1, getCID()); System.out.print("Please provide a first name: "); setFirstName(scan.nextLine()); pStmt.setString(2, getFirstName()); System.out.print("Please provide a last name: "); setLastName(scan.nextLine()); pStmt.setString(3, getLastName()); System.out.print("Please provide an age: "); setAge(Integer.parseInt(scan.nextLine())); pStmt.setInt(4, getAge()); System.out.print("Please provide a gender: "); setGender(scan.next().charAt(0)); pStmt.setString(5, String.valueOf(getGender())); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void insert(Customer customer) throws SQLException {\r\n\r\n\t\tString insertSql = \"INSERT INTO \" + tableName\r\n\t\t\t\t+ \"(name, surname, birth_date, birth_place, address, city, province, cap, phone_number, newsletter, email)\"\r\n\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(insertSql);\r\n\t\t\tpreparedStatement.setString(1, customer.getName());\r\n\t\t\tpreparedStatement.setString(2, customer.getSurname());\r\n\t\t\tpreparedStatement.setDate(3, (Date) customer.getBirthdate());\r\n\t\t\tpreparedStatement.setString(4, customer.getBirthplace());\r\n\t\t\tpreparedStatement.setString(5, customer.getAddress());\r\n\t\t\tpreparedStatement.setString(6, customer.getCity());\r\n\t\t\tpreparedStatement.setString(7, customer.getProvince());\r\n\t\t\tpreparedStatement.setInt(8, customer.getCap());\r\n\t\t\tpreparedStatement.setString(9, customer.getPhoneNumber());\r\n\t\t\tpreparedStatement.setInt(10, customer.getNewsletter());\r\n\t\t\tpreparedStatement.setString(11, customer.getEmail());\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic int insertNewCustomer(Customer cust) throws CustException {\n\t\tmanager.persist(cust);\r\n\t\treturn 1;\r\n\t}", "@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "void insert(Customer customer);", "private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }", "void insertCustomer() {\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tString call = \"call insert_customer (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tcs = conn.prepareCall(call);\t\t\t\n\t\t\tArrayList <String> param = new ArrayList<String>(); \n\t\t\tparam.add(genderBox.getSelectedItem().toString());\n\t\t\tparam.add(titleBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldFirstName.getText());\t\t\t\n\t\t\tparam.add(fieldMidName.getText());\n\t\t\tparam.add(fieldLastName.getText());\n\t\t\tparam.add(fieldAddress.getText());\n\t\t\tparam.add(fieldCity.getText());\n\t\t\tparam.add(fieldState.getText());\n\t\t\tparam.add(fieldZipcode.getText());\n\t\t\tparam.add(fieldEmail.getText());\t\t\t\n\t\t\tparam.add(fieldUsername.getText());\n\t\t\tparam.add(fieldPassword.getText());\n\t\t\tparam.add(fieldTelephone.getText());\n\t\t\tparam.add(fieldMaidenName.getText());\n\t\t\tparam.add(fieldBirthday.getText());\n\t\t\tparam.add(cctypeBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldCCnumber.getText());\n\t\t\tparam.add(fieldCCV.getText());\n\t\t\tparam.add(fieldExpirDate.getText());\n\t\t\tparam.add(fieldSocialSecurity.getText() + \" \");\n\t\t\t\n\t\t\tfor (int i = 0; i < 20; i++) {\n\t\t\t\tcs.setString(i+1, param.get(i));\n\t\t\t}\n\t\t\tcs.executeUpdate();\n\t\t\tconn.commit();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Exception caught: \" + e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(this, \"User, \" + fieldUsername.getText() +\" already exists.\");\n\t\t} finally {\n\t\t\t\n\t\t}\n\t}", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "public boolean insertCustomer(Customer customer){\n\n ContentValues cv = new ContentValues();\n\n cv.put(\"customer_name\", customer.getName());\n cv.put(\"customer_description\", customer.getDescription());\n\n long insert = _db.insert(\"Customer\", null, cv);\n\n // Checks if rows have been updated.\n if(insert == -1){\n return false;\n }\n\n return true;\n }", "public int insertCustomer() {\n\t\treturn 0;\r\n\t}", "@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "public void addCustomer(int Id, String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward, Boolean reg) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.CUSTOMER \" + \"VALUES ('\" \n + Id + \"','\" + name + \"', '\" + dob + \"', '\" \n + gender + \"', '\" + number + \"', '\" \n + email + \"', '\" + address + \"', '\" \n + password + \"', '\" + promo + \"', '\"+ reward + \"', '\"+ reg \n + \"')\");\n\n }", "void insertCustomerDDPay(CustomerDDPay cddp);", "public void add(Customer customer) {\n\t\tSessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n\t\t//Step 2. Create/Obtain Session object\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//Step 3. Start/Participate in a Transaction\n\t\tTransaction tx = session.beginTransaction();\n\t\t\n\t\t//Now we can insert/update/delete/select whatever we want\n\t\tsession.save(customer); //save method generates insert query\n\t\t\n\t\ttx.commit();\n\t}", "public static void addCustomer(String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"INSERT INTO customers(Customer_Name, Address, Postal_Code, Phone, Created_By, Last_Updated_By, Division_ID) VALUES(?,?,?,?,?,?,?);\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setString(5,userName);\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "public void create(Customer customer) {\r\n this.entityManager.persist(customer);\r\n }", "@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tint result=0;\n\t\tConnection connection;\n\t\ttry {\n\t\t\tconnection = DBConnection.makeConnection();\n\t\t\tPreparedStatement Statement = connection.prepareStatement(INSERT_CUSTOMER_QUERY);\n\t\t\tStatement.setInt(1, customer.getCustomerId());\n\t\t\tStatement.setString(2, customer.getCustomerName());\n\t\t\tStatement.setString(3, customer.getCustomerAddress());\n\t\t\t\tStatement.setInt(4, customer.getBillAmount());\n\t\t\t\tresult=Statement.executeUpdate();\n\n\t\t} \n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\n\t\tif(result==0)\n\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void addCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_ADD_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.emailad);\n\t\t callStmt.setString(2,this.fname);\n\t\t callStmt.setString(3,this.lname);\n\t\t callStmt.setString(4,this.username);\n\t\t callStmt.setString(5,this.password);\n\t\t callStmt.setString(6,this.adminUsername);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}", "public boolean addCustomer(Customer customer) throws DatabaseOperationException;", "public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}", "public void addCustomerSQL(Connection connection) throws SQLException {\r\n String sql1 = \"INSERT INTO Customers (first_name, last_name, age, gender, money)\"\r\n + \" VALUES (?,?,?,?,?)\";\r\n PreparedStatement statement1 = connection.prepareStatement(sql1);\r\n for(int i = 0; i < customers.size();i++) {\r\n statement1.setString(1,customers.get(i).getF_Name());\r\n statement1.setString(2,customers.get(i).getL_Name());\r\n statement1.setInt(3,customers.get(i).getAge());\r\n statement1.setInt(4,customers.get(i).getGender());\r\n statement1.setDouble(5,customers.get(i).getMoney());\r\n int rows = statement1.executeUpdate();\r\n if (rows > 0) {\r\n System.out.println(\"new user added\");\r\n }\r\n }\r\n }", "@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }", "private Customer addCustomer(String title, String firstName, String lastName, String phone, String email, String addressLine1, String addressLine2, String city, String state, String postCode, String country) {\r\n out.print(title);\r\n out.print(firstName);\r\n out.print(lastName);\r\n out.print(phone);\r\n out.print(email);\r\n out.print(addressLine1);\r\n out.print(addressLine2);\r\n out.print(city);\r\n out.print(state);\r\n out.print(postCode);\r\n out.print(country);\r\n\r\n Customer customer = new Customer();\r\n customer.setCustomerTitle(title);\r\n customer.setCustomerFirstName(firstName);\r\n customer.setCustomerLastName(lastName);\r\n customer.setCustomerPhone(phone);\r\n customer.setCustomerEmail(email);\r\n customer.setCustomerAddressLine1(addressLine1);\r\n customer.setCustomerAddressLine2(addressLine2);\r\n customer.setCustomerCity(city);\r\n customer.setCustomerState(state);\r\n customer.setCustomerPostCode(postCode);\r\n customer.setCustomerCountry(country);\r\n\r\n em.persist(customer);\r\n return customer;\r\n }", "@Override\n\tpublic String insertNewCustomer(Customer c) {\n\n\t\tInteger id=dao.insertNewCustomer(c);\n\t\tif(id==null)\n\t\t\treturn \"User registratin failed\";\n\t\treturn \"User registration successfull having user ID - \"+id;\n\n\t}", "public Customermodel addCustomer(Customermodel customermodel) {\n\t\t return customerdb.save(customermodel);\n\t }", "public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}", "int insert(CustomerVisit record);", "@Override\n\tpublic void create(CustomerLogin customerLogin) {\n\t\tdao.insert(customerLogin);\n\t}", "int insert(OcCustContract record);", "public static boolean addCustomer(Customer customer) throws SQLException {\n \n if (customerInDatabase(customer.getCustomer())) {\n System.out.println(\"Customer \" + customer.getCustomer() + \" already in DB (addCustomer)\");\n return false;\n }\n else if (customer.getCustomer().isEmpty()) {\n System.out.println(\"Customer given is empty (addCustomer\");\n return false;\n }\n String insertStatement = \"INSERT INTO customer(customerName, addressId, active, createDate, createdBy, lastUpdateBy) \" +\n \"VALUES (?,?,?,?,?,?)\";\n \n DBQueryPrepared.setPreparedStatement(CONN, insertStatement);\n ps = DBQueryPrepared.getPreparedStatement();\n ps.setString(1, customer.getCustomer());\n ps.setString(2, String.valueOf(customer.getAddressId()));\n ps.setString(3, \"1\");\n ps.setString(4, model.timeConversion.getTime().toString());\n ps.setString(5, \"currentUser\");\n ps.setString(6, \"currentUser\");\n ps.execute();\n return true; \n }", "public static boolean addNewCustomer(String customerName, String customerAddress, String\n customerPostalCode, String customerPhoneNumber, Integer divisionID)\n {\n try {\n Statement statement = DBConnection.getConnection().createStatement();\n String addQuery = \"INSERT INTO customers SET Customer_Name='\" + customerName\n + \"', Address='\" + customerAddress\n + \"', Phone='\" + customerPhoneNumber\n + \"', Postal_Code='\" + customerPostalCode\n + \"', Division_ID=\" + divisionID;\n statement.execute(addQuery);\n if(statement.getUpdateCount() > 0)\n System.out.println(statement.getUpdateCount() + \" row(s) affected.\");\n else\n System.out.println(\"No changes were made.\");\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n }\n return false;\n }", "public Customer Create(Customer customer) {\n\t\tString sqlInsert = \"Insert into customers (name, email, address) values('\" + customer.getName()+ \"','\"\n\t\t+ customer.getEmail()+ \"','\"+ customer.getAddress()+\"')\";\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sqlInsert);\n\t\t\treturn readLatest();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "public static void createCustomer() throws IOException {\n\t\tString ssn = randomSSN();\n\t\twhile(SSNmap.containsKey(ssn)) {\n\t\t\tssn = randomSSN();\n\t\t}\n\t\tSSNmap.put(ssn, 1);\n\t\t\n\t\tString name = names[random(50)] + \" \" + names[random(50)];\n\t\tString address = randomNumber() + \" \" + streets[random(50)];\n\t\tString phone = randomPhone();\n\t\t\n\t\twriter.write(\"INSERT INTO Customer (Id, SSN, Name, Address, Phone) Values (\" + custId++ +\", '\" + ssn + \"', '\" \n\t\t\t\t+ name + \"', '\" + address + \"', '\" + phone +\"'\" + line);\n\t\twriter.flush();\n\t}", "public void addCustomer(CustomerSignup p)\n {\n Session session = this.sessionFactory.getCurrentSession();\n \n session.persist(p);\n \n CustomerLogin cl=new CustomerLogin();\n cl.setUsername(p.getUsername());\n cl.setPassword(p.getPassword());\n cl.setId(p.getId());\n session.persist(cl);\n \n Authorities a = new Authorities();\n a.setUsername(p.getUsername());\n a.setAuthority(\"ROLE_USER\");\n a.setId(p.getId());\n session.saveOrUpdate(a);\n\n session.flush();\n \n logger.info(\"Customer saved successfully, Customer Details=\"+p);\n }", "int insert(CustomerTag record);", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}", "public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public void registerCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_REGISTER_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.phoneno);\n\t\t callStmt.setString(2,this.emailad);\n\t\t callStmt.setString(3,this.fname);\n\t\t callStmt.setString(4,this.lname);\n\t\t callStmt.setString(5,this.username);\n\t\t callStmt.setString(6,this.password);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}", "@Override\n\tpublic void saveCustomer(Customer theCustomer){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n//\t\tcurrentSession.createQuery(\"from Customer c where c.firstName=\"+ theCustomer.getFirstName()).executeUpdate();\n\n\t\tQuery<Customer> query =\n\t\t\t\tcurrentSession.createQuery(\"select c from Customer c \"+\n\t\t\t\t\t\t\t\t\"where c.firstName =:theCustomerFirstName and \" +\n\t\t\t\t\t\t\t\t\"c.lastName =:theCustomerLastName and \" +\n\t\t\t\t\t\t\t\t\"c.email=:theCustomerEmail\",\n\t\t\t\t\t\t Customer.class);\n\n\t\t// set parameter on query\n\t\tquery.setParameter(\"theCustomerFirstName\", theCustomer.getFirstName());\n\t\tquery.setParameter(\"theCustomerLastName\", theCustomer.getLastName());\n\t\tquery.setParameter(\"theCustomerEmail\", theCustomer.getEmail());\n\n\t\ttry {\n\t\t\t// execute query and get instructor\n\t\t\tCustomer temp = query.getSingleResult();\n\t\t}\n\t\tcatch (Exception exe){\n\t\t\tlogger.log(Level.INFO,\"Already exists!!\");\n\t\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t}\n\t}", "public int addCustomer(Customer cus) {\n int n = 0;\n String preSQL = \"insert into Customer(cname,cphone,\"\n + \"cAddress,username,password,status)\"\n + \" values(?,?,?,?,?,?)\";\n try {\n // ? has index start 1\n PreparedStatement pre = conn.prepareStatement(preSQL);\n// pre.setDataType(index of ?, value);\n// dataType is data of ?\n pre.setString(1, cus.getCname());\n pre.setString(2, cus.getCphone());\n pre.setString(3, cus.getcAddress());\n pre.setString(4, cus.getUsername());\n pre.setString(5, cus.getPassword());\n pre.setInt(6, cus.getStatus());\n // execute\n n = pre.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(DAOCustomer.class.getName()).log(Level.SEVERE, null, ex);\n }\n// String sql=\"insert into Customer(cname,cphone,cAddress,username,password,status)\"\n// + \" values('\"+cus.getCname()+\"','\"+cus.getCphone()+\n// \"','\"+cus.getcAddress()+\"','\"+cus.getUsername()+\n// \"','\"+cus.getPassword()+\"',\"+cus.getStatus()+\")\";\n// try {\n// Statement state=conn.createStatement();\n// n=state.executeUpdate(sql);\n// } catch (SQLException ex) {\n// Logger.getLogger(DAOCustomer.class.getName()).log(Level.SEVERE, null, ex);\n// }\n return n;\n }", "void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public void addCustomer(Customer customer) {\r\n if (hasID(customer.getID())) {\r\n return;\r\n }\r\n\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] == null) {\r\n customers[i] = customer;\r\n return;\r\n }\r\n }\r\n\r\n System.err.println(\"No more room in database!\");\r\n }", "@Override\r\n\tpublic void insert(CustVO custVO) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(INSERT_STMT);\r\n\r\n\t\t\tpstmt.setString(1, custVO.getCust_acc());\r\n\t\t\tpstmt.setString(2, custVO.getCust_pwd());\r\n\t\t\tpstmt.setString(3, custVO.getCust_name());\r\n\t\t\tpstmt.setString(4, custVO.getCust_sex());\r\n\t\t\tpstmt.setString(5, custVO.getCust_tel());\r\n\t\t\tpstmt.setString(6, custVO.getCust_addr());\r\n\t\t\tpstmt.setString(7, custVO.getCust_pid());\r\n\t\t\tpstmt.setString(8, custVO.getCust_mail());\r\n\t\t\tpstmt.setDate(9, custVO.getCust_brd());\r\n\t\t\tpstmt.setDate(10, custVO.getCust_reg());\r\n\t\t\tpstmt.setBytes(11, custVO.getCust_pic());\r\n\t\t\tpstmt.setString(12, custVO.getCust_status());\r\n\t\t\tpstmt.setString(13, custVO.getCust_niname());\r\n\t\t\tSystem.out.println(\"HUHUHUHUH\");\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tSystem.out.println(\"HUHUHUHUH\"+se.toString());\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void createCustomersTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE customers \"\n\t\t\t\t\t+ \"(id INT GENERATED ALWAYS AS IDENTITY, \"\n\t\t\t\t\t+ \"name VARCHAR(40), \" + \"email VARCHAR(40), \"\n\t\t\t\t\t+ \"pass VARCHAR(40), \" + \"ssn VARCHAR(9), \"\n\t\t\t\t\t+ \"address VARCHAR(255), \" + \"hphone VARCHAR(10), \"\n\t\t\t\t\t+ \"cphone VARCHAR(10), \" + \"signuptime BIGINT, \"\n\t\t\t\t\t+ \"chkacct BIGINT, \" + \"savacct BIGINT, \" + \"cdacct BIGINT, \"\n\t\t\t\t\t+ \"hasStock VARCHAR(6))\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table users\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of user table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Override\n\tpublic void save(Customer customer) throws Exception {\n\t\tthis.getHibernateTemplate().save(customer);\n\t}", "public Boolean addCustomer(Customer customer){\n Boolean success = false;\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"INSERT INTO Customer(CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email)\" + \"VALUES(?,?,?,?,?,?,?)\");\n preparedStatement.setString(1, customer.getCustomerId());\n preparedStatement.setString(2, customer.getFirstName());\n preparedStatement.setString(3, customer.getLastName());\n preparedStatement.setString(4, customer.getCountry());\n preparedStatement.setString(5, customer.getPostalCode());\n preparedStatement.setString(6, customer.getPhoneNumber());\n preparedStatement.setString(7, customer.getEmail());\n\n int result = preparedStatement.executeUpdate();\n success = (result != 0);\n System.out.println(\"Added customer\");\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return success;\n\n }", "@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}", "public static void insertAddressSQL(Connection conn, String customerName, \r\n String address, String address2, String city, String country, \r\n String postalCode, String phone) throws SQLException {\r\n \r\n String insertCustomerStatement = \"INSERT INTO address \"\r\n + \"(addressId, address, address2, cityId, postalCode, phone,\"\r\n + \" createDate, createdBy, lastUpdate, lastUpdateBy)\"\r\n + \"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n \r\n //create prepared statement object\r\n setPreparedStatement(conn, insertCustomerStatement);\r\n \r\n //get prepared statement reference\r\n PreparedStatement ps = getPreparedStatement(); \r\n \r\n //determine date and time\r\n Timestamp currentDate = DateTime.currentDateTime();\r\n \r\n //key-value mapping\r\n ps.setInt(1, addressId);\r\n ps.setString(2, address); \r\n ps.setString(3, address2);\r\n ps.setInt(4, CitySQL.cityId); \r\n ps.setString(5, postalCode);\r\n ps.setString(6, phone);\r\n ps.setTimestamp(7, currentDate);\r\n ps.setString(8, SchedulingDesktopApp.currentUser);\r\n ps.setTimestamp(9, currentDate);\r\n ps.setString(10, SchedulingDesktopApp.currentUser);\r\n \r\n //execute prepared statement\r\n ps.execute();\r\n \r\n //affected rows\r\n rowsAffected();\r\n \r\n }", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "void createAndManageCustomer() {\r\n\t\tSystem.out.println(\"\\nCreating and managing a customer:\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c = new Customer2(\"Sami\", \"Cemil\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c);\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tc.setLastName(\"Kamil\");\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\tem.close();\r\n\t}", "Customer saveCustomer(Customer customer) throws CustomerExistsException;", "void insert(CusBankAccount record);", "@Override\n\t@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tcustomerDAO.saveCustomer(theCustomer);\n\t\t\n\t}", "@Transactional\n\t@Override\n\tpublic Customer createCustomer(String name) {\n\t\t\n\t\tvalidateName(name);\n\t\tLocalDateTime now = LocalDateTime.now();\n\t\tAccount account = new Account(5000.0, now);\n\t\taccountRepository.save(account);\n\t\tSet<Item> set = new HashSet<>();\n\t\tCustomer customer = new Customer(name, account,set);\n\t\tcustRepository.save(customer);\n\t\treturn customer;\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic void save(Customer customer) {\n\t\tcustomerDAO.save(customer);\n\t}", "public Customer putCustomer(final Customer customer) {\n return dbClient.put(customer);\n }", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "@Test(alwaysRun=true, priority=15,enabled=true)\n\tpublic void addNewCustomer() throws InterruptedException, IOException {\t\n\t\tadminPage.addNewCustomer(driver);\n\t}", "public boolean addCustomer(CustomerBean customer);", "public void save(Customer customer) {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//create account\n\t\tcurrentSession.save(customer);\n\t}", "@Override\n\tpublic void addCustomer(Customer customer) {\n\t\tcustomerDao.addCustomer(customer);\n\t}", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "public void register(Customer customer) {\n\t\tcustomerDao.register(customer);\r\n\t}", "@PostMapping(\"/customer\")\n\tpublic Customer createCustomer(@RequestBody Customer customer) {\n\t\treturn customerRepository.save(customer);\n\t}", "@Override\n\tpublic void create(Customer t) {\n\n\t}", "public int saveCustomer(String username,\n String custNm, String email){\n Statement statement = null;\n \n conn = Common.getConnection();\n \n int affectRow = 0;\n int nextId = getNextID();\n // StatusResponse response = new StatusResponse();\n try {\n System.out.println(\"NEXT ID \"+nextId);\n \n queryCreateCust = \"INSERT INTO TBBW_CUST(IDCUST,CUST_USERNAME,CUST_NM,CUST_EMAIL,STATUS,DATE_INSERT)\"+\n \" VALUES('\"+nextId+\"','\"+username+\"','\"+custNm+\"','\"+email+\"','NEW',SYSDATE)\";\n /* statement = Common.getConnection().prepareStatement(queryCreateCust);\n statement.setInt(1, nextId);\n statement.setString(2, username);\n statement.setString(3, custNm);\n statement.setString(4, email);\n statement.setString(5, \"NEW\");\n affectRow = statement.executeUpdate(); */\n \n statement = conn.createStatement();\n System.out.println(\"QCreateCust : \"+queryCreateCust);\n \n affectRow = statement.executeUpdate(queryCreateCust);\n statement.close();\n conn.close();\n \n // return list;\n } catch (SQLException exception) {\n try {\n statement.close();\n conn.close();\n // response.setStatusDesc(\"\"+exception.getMessage());\n // return null;\n } catch (SQLException ex) {\n Logger.getLogger(TbCMCountryCityTMP.class.getName()).log(Level.SEVERE, null, ex);\n // response.setStatusDesc(\"\"+ex.getMessage());\n }\n } \n \n return affectRow;\n }", "int insert(DepAcctDO record);", "private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }", "int insert(CCustomer record);", "public void registerCustomer(Customer customer) {\nSession session=sessionFactory.getCurrentSession();\n\t\t\n\t\tAuthorities authorities=new Authorities();\n\t\tauthorities.setRole(\"ROLE_USER\");\n\t\tauthorities.setUser(customer.getUser());//FK column in authorities table\n\t\t\n\t\tcustomer.getUser().setAuthorities(authorities);\n\t\tcustomer.getUser().setEnabled(true);\n\t\t\n\t\tCart cart=new Cart();\n\t\tcustomer.setCart(cart);\n\t\tcart.setCustomer(customer);\n\t\t\n\t\tsession.save(customer);\n\t\n\t\t\n\t}", "void insertBatch(List<Customer> customers);", "@PostMapping(\"/customers\")\n\tpublic Customer savecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomer.setId(0); //here 0 is not id, we are telling saveorupdate() DAO method to insert the customer object coz it inserts if id is empty(so give 0 or null)\n\t\tthecustomerService.saveCustomer(thecustomer);\n\t\treturn thecustomer;\n\t}", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// currentSession.save(theCustomer);\n\n\t\t// save/upate the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t}", "public void createCustomerTransaction(String customerId, TransactionData transData) {\n \t\n \tTransaction transEntity = new Transaction();\n \t\n \tBeanUtils.copyProperties(transData, transEntity);\n \ttransEntity.setCustomerId(customerId.trim().toUpperCase());\n \t//Save and flush\n \ttransactionRepository.saveAndFlush(transEntity);\n }", "@PostMapping(\"/customers\")\r\n\tpublic Customer addCustomer(@RequestBody Customer customer) {\n\t\tcustomer.setId(0);\r\n\t\t\r\n\t\tcustomerService.saveCustomer(customer);\r\n\t\treturn customer;\r\n\t}", "@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}", "@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t// save the customer ... finally LOL\n\t\tcurrentSession.save(theCustomer);\t\t\n\t}", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t//currentSession.save(theCustomer);\n\t}", "public void addCustomer(Customer customer) throws UserExistsException {\r\n if (customerExists(customer)){\r\n throw new UserExistsException(\"Customer \"+ customer.getF_Name()+\" already exists\");\r\n }\r\n customers.add(customer);\r\n }", "public boolean createCustomer() throws ClassNotFoundException, SQLException {\n\t\tString name = KeyboardUtil.getString(\"Enter your name\");\n\t\tString password = KeyboardUtil.getString(\"Enter your password\");\n\t\tString city = KeyboardUtil.getString(\"Enter your city\");\n\t\tString state = KeyboardUtil.getString(\"Enter your state\");\n\t\tint zip = KeyboardUtil.getInt(\"Enter ZIP\");\n\t\tString country = KeyboardUtil.getString(\"Enter your country\");\n\t\t\n\t\tCustomer newCust = new Customer(password, city, state, zip, country);\n\t\ttry {\n\t\t\tConnection con = DAO.getConnection();\n\t\t\tnewCust.setCustomerName(name);\n\t\t\tString insertQuery = \"insert into Customer(Customer_Name, Password, City, State, Zip, Country) values(?, ?, ?, ?, ?, ?)\";\n\t\t\tPreparedStatement stmt = con.prepareStatement(insertQuery);\n\t\t\tstmt.setString(1, newCust.getCusomerName());\n\t\t\tstmt.setString(2, newCust.getPassword());\n\t\t\tstmt.setString(3, newCust.getCity());\n\t\t\tstmt.setString(4, newCust.getState());\n\t\t\tstmt.setInt(5, newCust.getZip());\n\t\t\tstmt.setString(6, newCust.getCountry());\n\t\t\tstmt.executeUpdate();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(InvalidNameException e) {\n\t\t\tSystem.out.println(\"Name should not contain numbers or special characters and should be atleast 6 characters long!\");\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\treturn false;\n\t}", "@PostMapping(value = \"/customers\", consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void createCustomer(@RequestBody CustomerDTO custDTO) {\n\t\tlogger.info(\"Creation request for customer {}\", custDTO);\n\t\tcustService.createCustomer(custDTO);\n\t}", "public void register(Customer c) {\n\t\tUser.customers.add(c);\n\t}", "AccountModel addByCustomer(AccountModel account,String customerId) throws AccountException, CustomerException;", "@PostMapping( value = CustomerRestURIConstants.POST_CUSTOMER )\n\tpublic ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n\t\tlong id = customerService.save(customer);\n\t return ResponseEntity.ok().body(\"New Customer has been saved with ID:\" + id);\n\t}", "@Override\r\n\tpublic Customer addCustomer(Customer customer) {\r\n\r\n\t\tif (!inputValidator.nameValidator(customer.getName()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid Customer Name.\");\r\n\t\tif (!inputValidator.userIdValidator(customer.getUserId()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a Valid UserId.\");\r\n\t\tif (!inputValidator.contactValidator(customer.getContactNo()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Contact Number.\");\r\n\t\tif (!inputValidator.emailValidator(customer.getEmail()))\r\n\t\t\tthrow new EntityCreationException(\"Enter a valid Email.\");\r\n\t\tCustomer customer2 = customerRepository.save(customer);\r\n\t\treturn customer2;\r\n\r\n\t}", "@POST\n\t@Path(\"/post\")\n\t@Consumes(\"application/json\")\n\tpublic void postCustomer(String input)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Separate incoming data into individual strings\n\t\tString[] splited = input.split(\"\\\\s+\");\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Create a new row in the customers table\n\t\tdb.Create(\"INSERT INTO CUSTOMERS (FIRST, SECOND, NUMBER) VALUES ('\" + splited[0] + \"', '\" + splited[1] + \"', '\"\n\t\t\t\t+ splited[2] + \"')\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "@RequestMapping(value = \"/createCustomer\", method = RequestMethod.POST)\n\tpublic String createCustomer(@RequestBody Customer customer) throws Exception {\n\n\t\tlog.log(Level.INFO, \"Customer zawiera\", customer.toString());\n\t\tcustomerRepository.save(customer); // Zapis do bazy\n\t\tSystem.out.println(\"##################### Utworzono klienta: \" + customer);\n\t\treturn \"Klient zostal stworzony\" + customer;\n\t}", "@Override\n\tpublic void saveCustomer(AMOUNT theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// save the customer ... \n\t\tcurrentSession.save(theCustomer);\n\t}", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public void saveCustomer(Customer c) {\n database.saveCustomer(c.getCustomerID(), c.getName(), c.getAddress(), c.getEmail(), Customer.toBase64(c.getPassword()), c.getBirthday(), c.getPhoneNumber(), Customer.toBase64(c.getSalt()), -1);\n //TODO Implement a getter for getting the orderId so that it can be saved.\n }" ]
[ "0.7907412", "0.78804743", "0.77886474", "0.7765021", "0.7744843", "0.7271264", "0.7268109", "0.7226959", "0.71558654", "0.71238554", "0.71059453", "0.710524", "0.7097435", "0.70558554", "0.704711", "0.70429224", "0.7008716", "0.70046926", "0.6957874", "0.6940843", "0.6905746", "0.68895143", "0.6885937", "0.6883454", "0.686865", "0.6838355", "0.6837334", "0.6834727", "0.67909414", "0.676422", "0.6762506", "0.6754583", "0.6744013", "0.6742223", "0.6726832", "0.67185575", "0.6714997", "0.67055136", "0.6688484", "0.66830105", "0.66698635", "0.6664491", "0.66527736", "0.66522044", "0.66520363", "0.6636492", "0.6620078", "0.6607526", "0.6605779", "0.65797645", "0.6575999", "0.6541063", "0.65378296", "0.6528836", "0.6525546", "0.6516534", "0.65162075", "0.6513593", "0.650504", "0.64936286", "0.6492069", "0.6486844", "0.6484147", "0.648086", "0.6480088", "0.6479675", "0.6474088", "0.64728403", "0.64728403", "0.64728403", "0.64728403", "0.6465535", "0.64648473", "0.6458141", "0.6434492", "0.6428915", "0.6423304", "0.6422972", "0.6390064", "0.63765365", "0.63679576", "0.63458526", "0.6342428", "0.63351935", "0.6333324", "0.6329652", "0.631698", "0.6316609", "0.63148165", "0.63042605", "0.6303781", "0.62977576", "0.62930936", "0.628988", "0.62846947", "0.62843883", "0.6256431", "0.62555504", "0.6243926", "0.62404627" ]
0.687377
24
Updates Customer first name attribute given CID:
public void updateCustomerFirstName(Connection connection, int CID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()){ String sql = "UPDATE Customer SET first_name = ? WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a new first name: "); setFirstName(scan.nextLine()); pStmt.setString(1, getFirstName()); setCID(CID); pStmt.setInt(2, getCID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCustomerLastName(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET last_name = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new last name: \");\n setLastName(scan.nextLine());\n pStmt.setString(1, getLastName());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void updateCustomer(String id) {\n\t\t\n\t}", "public void changeFirstName(String newName) throws IOException {\n\t\t// update the customer's first name instance variable\n\t\tthis.firstName = newName;\n\t\t// write the changes to the customer's file\n\t\tthis.write();\n\t\t// update the custome's user name\n\t\tthis.updateUserName();\n\t}", "@Override\n public void setFirstName(java.lang.String firstName) {\n _entityCustomer.setFirstName(firstName);\n }", "@When(\"enter customer firstname {string}\")\n\tpublic void enter_customer_firstname(String fname) {\n\t\tsearchCust = new searchCustomerPage(driver);\n\t\tsearchCust.setFirstName(fname);\n\t}", "public void setCname(String cname) {\n this.cname = cname;\n }", "private void updateCustomerName(String firstName, String email, int position) {\n Customer c = listCustomers.get(position);\n c.setFirst_name(firstName);\n c.setMail(email);\n\n dbHelper.updateCustomer(c);\n\n //refreshing the list\n listCustomers.set(position, c);\n userRecyclerAdapter.notifyItemChanged(position);\n }", "public void updateCustomer(int phone, int discount, String name, String address, String group, int originalNumber)\n\t{\n\t\tCustomer customer = getCustomer(originalNumber);\n\t\tcustomer.setPhone(phone);\n\t\tcustomer.setDiscount(discount);\n\t\tcustomer.setName(name);\n\t\tcustomer.setAddress(address);\n\t\tcustomer.setGroup(group);\n\t}", "int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);", "public void setCname(String cname) {\r\n this.cname = cname == null ? null : cname.trim();\r\n }", "@When(\"Enter customer FirstName\")\n public void enter_customer_first_name() {\n\t logger.info(\"******Searching Customer by Name*******\");\n\t searchCust = new SearchCustomerPage(driver);\n\t searchCust.setFirstName(\"Victoria\");\n }", "public void setCustomerName(String name) {\r\n this.name.setText(name);\r\n }", "@Test\n\t// @Disabled\n\tvoid testUpdateCustomerbyFirstname() {\n\t\tCustomer customer = new Customer(1, \"jen\", \"cru\", \"951771122\", \"tom@gmail.com\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tMockito.when(custRep.save(customer)).thenReturn(customer);\n\t\tCustomer persistedCust = custService.updateFirstName(1, customer);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t\tassertEquals(\"jen\", persistedCust.getFirstName());\n\t}", "@CrossOrigin\n @RequestMapping(method = PUT, path = \"/customer\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<UpdateCustomerResponse> updateName(@RequestHeader(\"authorization\") final String authorization, @RequestBody UpdateCustomerRequest updateCustomerRequest) throws AuthorizationFailedException, UpdateCustomerException {\n String accessToken = utilityService.splitAuthorization(authorization);\n CustomerEntity customer = customerService.getCustomer(accessToken);\n String newFirstName = updateCustomerRequest.getFirstName();\n String newLastName = updateCustomerRequest.getLastName();\n // Check if the firstname entered is empty\n if (utilityService.isStringEmptyOrNull(newFirstName)) {\n throw new UpdateCustomerException(\"UCR-002\", \"First name field should not be empty\");\n } else {\n customer.setFirstName(newFirstName);\n customer.setLastName(newLastName);\n CustomerEntity updateCustomer = customerService.updateCustomer(customer);\n\n UpdateCustomerResponse response = new UpdateCustomerResponse();\n response.setId(updateCustomer.getUuid());\n response.setFirstName(updateCustomer.getFirstName());\n response.setLastName(updateCustomer.getLastName());\n response.setStatus(\"CUSTOMER DETAILS UPDATED SUCCESSFULLY\");\n return new ResponseEntity<UpdateCustomerResponse>(response, HttpStatus.OK);\n }\n\n }", "public void setFirstName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer first name can't be null.\" );\r\n else \r\n\t this.firstName = name; \r\n }", "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "@Override\n\tpublic Customer updateName(Long id, String name) \n\t{\n\t\tCustomer customer = customerRepo.findById(id);\n\t\tcustomer.setName(name);\n\t\tcustomer = customerRepo.updateCustomer(customer);\n\t\treturn customer;\n\t}", "public void setFirstName(String value) {\n setAttributeInternal(FIRSTNAME, value);\n }", "void updateCustomerById(Customer customer);", "public void setCustID(String custID) {\r\n this.custID = custID;\r\n }", "public static void updateCustomer(int customerID, String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"UPDATE customers SET Customer_Name = ?, Address = ?, Postal_Code = ?, Phone = ?, Last_Update = ?, Last_Updated_By = ?, Division_ID = ? WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setTimestamp(5, Timestamp.valueOf(LocalDateTime.now()));\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n ps.setInt(8, customerID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "public void setFirstName(java.lang.CharSequence value) {\n this.first_name = value;\n }", "public void setCustomer_Name(String customer_Name) {\n this.customer_Name = customer_Name;\n }", "public void setContactFirstName(String contactFirstName) {\n this.contactFirstName = contactFirstName;\n }", "public void setFirstName(String newFirstName) {\n this.firstName = newFirstName;\n }", "public Customer Update(int id, String attribute, Customer customer) {\n\t\t\n\t\tString sql = \"\";\n\t\t\n\t\tswitch(attribute) {\n\t\tcase \"NAME\":\n\t\t\tsql = \"UPDATE customers set name = '\"+ customer.getName() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"EMAIL\":\n\t\t\tsql = \"UPDATE customers set email = '\"+ customer.getEmail() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"ADDRESS\":\n\t\t\tsql = \"UPDATE customers set address = '\"+ customer.getAddress() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql);\n\t\t\treturn readById(id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "public void setContactFirstName(String contactFirstName) {\n \n this.contactFirstName = contactFirstName;\n\n }", "public void editStudentFirstName(Student changeStudent, String firstName)\n\t{\n\t\tchangeStudent.setStrNameFirst (firstName);\n\t\tthis.saveNeed = true;\n\n\n\t}", "public void setFirstName(String newFirstName) {\n _firstName = newFirstName;\n }", "public void setFirstName(java.lang.String newFirstName);", "@Override\n\tpublic void updateCustomer(Customer customer) throws Exception{\n\t\tConnection con = pool.getConnection();\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName()== null)\n\t\t\treturn;\n\t\t\t//throws Exception no customer found in DB\n\n\t\ttry {\n\t\t\tStatement st = con.createStatement();\n\t\t\tString update = String.format(\"update customer set CUST_NAME=('%s') where id in ('%d')\" +\n\t\t\t\" update customer set PASSWORD=('%s')\"\n\t\t\t\t\t+ \" where id in('%d')\",\n\t\t\t\t\tcustomer.getCustName(),\n\t\t\t\t\tcustomer.getId(),\n\t\t\t\t\tcustomer.getPassword(),\n\t\t\t\t\tcustomer.getId());\n\t\t\t\n\t\t\tst.executeUpdate(update);\n\t\t\tSystem.out.println(\"Customer updated successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to update A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\n\t}", "public void setFirstName(String newFirstName)\r\n {\r\n firstName = newFirstName;\r\n }", "public String getCustName() \r\n\t{\r\n\t\t\r\n\t\treturn custName;\r\n\t\t\r\n\t}", "@Test\r\n\tvoid testContactServiceUpdateFirstName() {\r\n\t\t// update contact first name\r\n\t\tcontactService.updateContactFirstName(id, id);\r\n\t\tassertTrue(contactService.getContactFirstName(id).equals(id));\r\n\t}", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "public void setFirstName(String fname) {\n\t\t System.out.println(\"method setFirstName(String fname) called.\");\n\t\t}", "public void updateCustomerGender(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET gender = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new gender: \");\n setGender(scan.next().charAt(0));\n pStmt.setString(1, String.valueOf(getGender()));\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void setFirstName(String fname){ firstName.set(fname); }", "private void formatCustomerName(String customerName) {\n\t\t// if the customer has a first and last name, separate them and\n\t\t// instantiate the respective instance variable\n\t\t// if the customer only has a first name, declare the last name to \"\"\n\t\t// (blank string)\n\t\tif (customerName.contains(\" \")) {\n\t\t\tthis.firstName = customerName.substring(0, customerName.indexOf(\" \")).toLowerCase();\n\t\t\tthis.lastName = customerName.substring(customerName.indexOf(\" \") + 1).toLowerCase();\n\t\t} else {\n\t\t\tthis.firstName = customerName.toLowerCase();\n\t\t\tthis.lastName = Customer.EMPTY_LAST_NAME;\n\t\t}\n\n\t\t// update the customer's username\n\t\tthis.updateUserName();\n\t}", "public static void setNewCustomer(String rfc, String name, String lastName, Double sal, String address) {\n\t\t\n\t\ttry\n\t\t{\n\t\t\tquery = \"DELETE FROM CREDIT.CUSTOMER WHERE RFC = '\" + rfc + \"'\";\n\t\t\tstmt.executeUpdate(query);\n\t\t\t\n\t\t\tquery = \"INSERT INTO CREDIT.CUSTOMER VALUES(\" + \"'\" + rfc + \"'\" + \", '\" + name + \"'\" + \", '\" + lastName + \"'\" + \", '\"\n\t\t\t\t\t+ getQualification(rfc) + \"'\" + \", sysdate\" + \", \" + sal + \"\" + \", '\" + address + \"'\" + \")\";\n\t\t\tstmt.executeUpdate(query);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void update(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"UPDATE customer SET name = ?, id = ?, phone = ? WHERE customer_key = ?\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.setInt(4, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Updated successfully.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Update error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "public void updateCustomerAge(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET age = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new age: \");\n setAge(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(1, getAge());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic Uni<Customer> updateCustomer(Customer customer) {\n\t\tFunction<Customer, Uni<? extends Customer>> update = entity -> {\n\t\t\tentity.setName(customer.getName());\n\t\t\tentity.setAddress(customer.getAddress());\n\t\t\treturn repo.flush().onItem().transform(ignore -> entity);\n\t\t};\n\t\treturn repo.findById(customer.getId()).onItem().ifNotNull().transformToUni(update);\n\t}", "public void setAmazonCustomerId(final SessionContext ctx, final Customer item, final String value)\n\t{\n\t\titem.setProperty(ctx, AmazoncoreConstants.Attributes.Customer.AMAZONCUSTOMERID,value);\n\t}", "@When(\"^user is on Your Personal Information Page, update First Name$\")\r\n\tpublic void updateFirstName() throws Exception {\n\t\tnew MyPersonalInformation(driver).updateFirstName();\r\n\t}", "void updateCustomer(int id, String[] updateInfo);", "protected void setFirstName(String first)\n {\n firstName = first;\n }", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "public void setcName(String cName) {\n this.cName = cName == null ? null : cName.trim();\n }", "@Override\n\tpublic void FirstName(String firstName) {\n\t\t\n\t}", "public void setPrimaryContact(String contact);", "void firstName( String key, String value ){\n developer.firstName = value;\n }", "public void setCustomerFullName(\n @Nullable\n final String customerFullName) {\n rememberChangedField(\"CustomerFullName\", this.customerFullName);\n this.customerFullName = customerFullName;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "@Override\n public java.lang.String getFirstName() {\n return _entityCustomer.getFirstName();\n }", "public void setFirstname(String firstname) {\r\n\t\tthis.firstname = firstname;\r\n\t}", "@PUT\n\t@Path(\"/update\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void putCustomer(String test)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Separate incoming data into individual strings\n\t\tString[] splited = test.split(\"\\\\s+\");\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Update the customers table\n\t\tdb.Update(\"UPDATE CUSTOMERS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE id='\" + splited[0] + \"'\");\n\n\t\t// Update the bookings table\n\t\tdb.Update(\"UPDATE BOOKINGS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE CUSTOMERID='\" + splited[0] + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "public static void update(Customer aCustomer) throws NotFoundException\r\n\t{\n\t\tphoneNumber = aCustomer.getPhoneNo();\r\n\t\tname = aCustomer.getName();\r\n\t\taddress = aCustomer.getAddress();\r\n\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlUpdate = \"Update CustomerTable \" +\r\n\t\t\t\t\t\t\t\t \" SET CustomerName = '\" + name +\"', \" +\r\n\t\t\t\t\t\t\t\t \" address = '\" + address +\"' \" +\r\n\t\t\t\t\t\t\t\t \" WHERE PhoneNo = '\" + phoneNumber + \"'\";\r\n\r\n\t\t// see if this customer exists in the database\r\n\t\t// NotFoundException is thrown by find method\r\n\t\ttry\r\n\t\t{\r\n\t\t\tCustomer c = Customer.find(phoneNumber);\r\n \t\t// if found, execute the SQL update statement\r\n \t\tint result = aStatement.executeUpdate(sqlUpdate);\r\n \t}\r\n\t\tcatch (SQLException e)\r\n\t\t\t{ System.out.println(e);\t}\r\n\t}", "public void setFirst_name(String first_name);", "public void setCustomersName(String customersName)\r\n {\r\n this.customersName = customersName;\r\n }", "public void update(Customer customer) {\n\n\t}", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void setCustomerName(String customerName) {\n this.customerName = customerName;\n }", "Employee setFirstname(String firstname);", "public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}", "public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}", "public void setFirstname(String firstname) throws SQLException\r\n\t{\r\n\t\tif (firstname == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET firstname =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, firstname);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setFirstname(String \"+ firstname + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}", "public void update(Customer customer) throws SQLException {\r\n\t\tString updateSql = \"UPDATE \" + tableName\r\n\t\t\t\t+ \" SET name=?,surname=?,birth_date=?,birth_place=?,address=?,city=?,province=?,\"\r\n\t\t\t\t+ \" cap=?,phone_number=?,newsletter=?,email=?\" + \"WHERE (id = ?)\";\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(updateSql);\r\n\t\t\tpreparedStatement.setString(1, customer.getName());\r\n\t\t\tpreparedStatement.setString(2, customer.getSurname());\r\n\t\t\tpreparedStatement.setDate(3, (Date) customer.getBirthdate());\r\n\t\t\tpreparedStatement.setString(4, customer.getBirthplace());\r\n\t\t\tpreparedStatement.setString(5, customer.getAddress());\r\n\t\t\tpreparedStatement.setString(6, customer.getCity());\r\n\t\t\tpreparedStatement.setString(7, customer.getProvince());\r\n\t\t\tpreparedStatement.setInt(8, customer.getCap());\r\n\t\t\tpreparedStatement.setString(9, customer.getPhoneNumber());\r\n\t\t\tpreparedStatement.setInt(10, customer.getNewsletter());\r\n\t\t\tpreparedStatement.setString(11, customer.getEmail());\r\n\t\t\tpreparedStatement.setInt(12, customer.getId());\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t}", "public String getCustomerName()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "public void setCustName(String custName) {\n\t\tthis.custName = custName;\n\t}", "public void setCName(String aValue) {\n String oldValue = cName;\n cName = aValue;\n changeSupport.firePropertyChange(\"cName\", oldValue, aValue);\n }", "public void setSrcFirstName(String value) {\r\n setAttributeInternal(SRCFIRSTNAME, value);\r\n }", "@Test\n public void testUpdateName() {\n System.out.println(\"updateName\");\n String name = \"Gert Madsen\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateName(customerID, name);\n assertEquals(\"Gert Madsen\", instance.getCustomer(customerID).getName());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void getCustomerID (){\n\t\t//gets the selected row \n\t\tint selectedRowIndex = listOfAccounts.getSelectedRow();\n\t\t//gets the value of the first element of the row which is the \n\t\t//customerID\n\t\tcustomerID = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 0);\n\t\tcustomerName = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 1);\n\t}", "void setFirstName(String firstName);", "public void setFirstName(String strFirstName){\n\t\tdriver.findElement(firstname).sendKeys(strFirstName);;\n\t}", "public boolean updateCustomer(String customerJSON);", "public com.politrons.avro.AvroPerson.Builder setFirstName(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.first_name = value;\n fieldSetFlags()[4] = true;\n return this; \n }", "public Customer displayCustomer(int cid);", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getCustName() {\n\t\treturn custName;\n\t}", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "public void prepareUpdate() {\r\n\t\tlog.info(\"prepare for update customer...\");\r\n\t\tMap<String, String> params = FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getRequestParameterMap();\r\n\t\tString id = params.get(\"customerIdParam\");\r\n\t\tlog.info(\"ID==\" + id);\r\n\t\tCustomer customer = customerService.searchCustomerById(new Long(id));\r\n\t\tcurrent.setCustomerId(customer.getCustomerId());\r\n\t\tcurrent.setCustomerCode(customer.getCustomerCode());\r\n\t\tcurrent.setCustomerName(customer.getCustomerName());\r\n\t\tcurrent.setTermOfPayment(customer.getTermOfPayment());\r\n\t\tcurrent.setCustomerGrade(customer.getCustomerGrade() != null ? customer.getCustomerGrade() : \"\");\r\n\t\tcurrent.setAddress(customer.getAddress());\r\n\t\tlog.info(\"prepare for update customer end...\");\r\n\t}", "int insertName(String cdNameSuffix, int idName, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle);", "public void setFirstName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, FIRSTNAME,value);\n\t}", "public void setFirstName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, FIRSTNAME,value);\n\t}", "public void setFirstName(String s) {\r\n\t\tfirstName = s;\t\r\n\t}", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public void setCustomer(\n @Nullable\n final String customer) {\n rememberChangedField(\"Customer\", this.customer);\n this.customer = customer;\n }", "public void setCustomer(au.gov.asic.types.AccountIdentifierType customer)\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n target = (au.gov.asic.types.AccountIdentifierType)get_store().add_element_user(CUSTOMER$0);\n }\n target.set(customer);\n }\n }" ]
[ "0.7198179", "0.63614714", "0.6355256", "0.62156636", "0.62081915", "0.6180937", "0.6153465", "0.6098878", "0.6069051", "0.60600865", "0.60570794", "0.6055961", "0.6025304", "0.59846747", "0.59285957", "0.59244835", "0.591013", "0.5893852", "0.58920664", "0.588477", "0.5883407", "0.58748734", "0.5869228", "0.5865191", "0.5846076", "0.5845519", "0.58414733", "0.58411556", "0.583925", "0.583578", "0.58273", "0.58213985", "0.58139396", "0.58084273", "0.5806948", "0.57634133", "0.5758575", "0.5757464", "0.57550603", "0.57423186", "0.57398176", "0.5727759", "0.572395", "0.56994796", "0.56913954", "0.5690521", "0.5688719", "0.5680067", "0.56604433", "0.5629007", "0.56260866", "0.56216854", "0.5616696", "0.56111354", "0.5605281", "0.5604251", "0.55998826", "0.5598617", "0.55852187", "0.55763024", "0.55744994", "0.55744994", "0.5568383", "0.55669796", "0.5564331", "0.5553904", "0.5552984", "0.5543697", "0.5543358", "0.55384254", "0.55250484", "0.5512899", "0.5507541", "0.55062944", "0.5499981", "0.5499981", "0.5497851", "0.5497229", "0.54939884", "0.54917157", "0.5490726", "0.5490026", "0.5478088", "0.547251", "0.54669666", "0.5462461", "0.54623145", "0.54462653", "0.54436105", "0.54431796", "0.54431796", "0.54425436", "0.5440525", "0.54334843", "0.54326683", "0.54326683", "0.54321617", "0.54319835", "0.5420461", "0.54184306" ]
0.7668589
0
Updates Customer last name attribute given CID:
public void updateCustomerLastName(Connection connection, int CID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()){ String sql = "UPDATE Customer SET last_name = ? WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a new last name: "); setLastName(scan.nextLine()); pStmt.setString(1, getLastName()); setCID(CID); pStmt.setInt(2, getCID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCustomerFirstName(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET first_name = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new first name: \");\n setFirstName(scan.nextLine());\n pStmt.setString(1, getFirstName());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void updateCustomer(String id) {\n\t\t\n\t}", "int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);", "public void setCname(String cname) {\n this.cname = cname;\n }", "public Customer Update(int id, String attribute, Customer customer) {\n\t\t\n\t\tString sql = \"\";\n\t\t\n\t\tswitch(attribute) {\n\t\tcase \"NAME\":\n\t\t\tsql = \"UPDATE customers set name = '\"+ customer.getName() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"EMAIL\":\n\t\t\tsql = \"UPDATE customers set email = '\"+ customer.getEmail() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"ADDRESS\":\n\t\t\tsql = \"UPDATE customers set address = '\"+ customer.getAddress() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql);\n\t\t\treturn readById(id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public void setCname(String cname) {\r\n this.cname = cname == null ? null : cname.trim();\r\n }", "void updateCustomerById(Customer customer);", "@Override\n\tpublic void updateCustomer(Customer customer) throws Exception{\n\t\tConnection con = pool.getConnection();\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName()== null)\n\t\t\treturn;\n\t\t\t//throws Exception no customer found in DB\n\n\t\ttry {\n\t\t\tStatement st = con.createStatement();\n\t\t\tString update = String.format(\"update customer set CUST_NAME=('%s') where id in ('%d')\" +\n\t\t\t\" update customer set PASSWORD=('%s')\"\n\t\t\t\t\t+ \" where id in('%d')\",\n\t\t\t\t\tcustomer.getCustName(),\n\t\t\t\t\tcustomer.getId(),\n\t\t\t\t\tcustomer.getPassword(),\n\t\t\t\t\tcustomer.getId());\n\t\t\t\n\t\t\tst.executeUpdate(update);\n\t\t\tSystem.out.println(\"Customer updated successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to update A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\n\t}", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "public void setCustID(String custID) {\r\n this.custID = custID;\r\n }", "int updateNameNmNameLast(String nmNameLast, int idName, int idPerson);", "public void updateCustomer(int phone, int discount, String name, String address, String group, int originalNumber)\n\t{\n\t\tCustomer customer = getCustomer(originalNumber);\n\t\tcustomer.setPhone(phone);\n\t\tcustomer.setDiscount(discount);\n\t\tcustomer.setName(name);\n\t\tcustomer.setAddress(address);\n\t\tcustomer.setGroup(group);\n\t}", "public void updateCustomerAge(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET age = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new age: \");\n setAge(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(1, getAge());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "void updateCustomer(int id, String[] updateInfo);", "public String getCustName() \r\n\t{\r\n\t\t\r\n\t\treturn custName;\r\n\t\t\r\n\t}", "public static void updateCustomer(int customerID, String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"UPDATE customers SET Customer_Name = ?, Address = ?, Postal_Code = ?, Phone = ?, Last_Update = ?, Last_Updated_By = ?, Division_ID = ? WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setTimestamp(5, Timestamp.valueOf(LocalDateTime.now()));\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n ps.setInt(8, customerID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "public void update(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"UPDATE customer SET name = ?, id = ?, phone = ? WHERE customer_key = ?\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.setInt(4, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Updated successfully.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Update error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "public void changeLastName(String newName) throws IOException {\n\t\t// update the customer's last name instance variable\n\t\tthis.lastName = newName;\n\t\t// write the changes to the customer's file\n\t\tthis.write();\n\t\t// update the custome's user name\n\t\tthis.updateUserName();\n\t}", "@Override\n\tpublic Customer updateName(Long id, String name) \n\t{\n\t\tCustomer customer = customerRepo.findById(id);\n\t\tcustomer.setName(name);\n\t\tcustomer = customerRepo.updateCustomer(customer);\n\t\treturn customer;\n\t}", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "@CrossOrigin\n @RequestMapping(method = PUT, path = \"/customer\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<UpdateCustomerResponse> updateName(@RequestHeader(\"authorization\") final String authorization, @RequestBody UpdateCustomerRequest updateCustomerRequest) throws AuthorizationFailedException, UpdateCustomerException {\n String accessToken = utilityService.splitAuthorization(authorization);\n CustomerEntity customer = customerService.getCustomer(accessToken);\n String newFirstName = updateCustomerRequest.getFirstName();\n String newLastName = updateCustomerRequest.getLastName();\n // Check if the firstname entered is empty\n if (utilityService.isStringEmptyOrNull(newFirstName)) {\n throw new UpdateCustomerException(\"UCR-002\", \"First name field should not be empty\");\n } else {\n customer.setFirstName(newFirstName);\n customer.setLastName(newLastName);\n CustomerEntity updateCustomer = customerService.updateCustomer(customer);\n\n UpdateCustomerResponse response = new UpdateCustomerResponse();\n response.setId(updateCustomer.getUuid());\n response.setFirstName(updateCustomer.getFirstName());\n response.setLastName(updateCustomer.getLastName());\n response.setStatus(\"CUSTOMER DETAILS UPDATED SUCCESSFULLY\");\n return new ResponseEntity<UpdateCustomerResponse>(response, HttpStatus.OK);\n }\n\n }", "public void update(Customer customer) {\n\n\t}", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "public void updateCustomerGender(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET gender = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new gender: \");\n setGender(scan.next().charAt(0));\n pStmt.setString(1, String.valueOf(getGender()));\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public static void setNewCustomer(String rfc, String name, String lastName, Double sal, String address) {\n\t\t\n\t\ttry\n\t\t{\n\t\t\tquery = \"DELETE FROM CREDIT.CUSTOMER WHERE RFC = '\" + rfc + \"'\";\n\t\t\tstmt.executeUpdate(query);\n\t\t\t\n\t\t\tquery = \"INSERT INTO CREDIT.CUSTOMER VALUES(\" + \"'\" + rfc + \"'\" + \", '\" + name + \"'\" + \", '\" + lastName + \"'\" + \", '\"\n\t\t\t\t\t+ getQualification(rfc) + \"'\" + \", sysdate\" + \", \" + sal + \"\" + \", '\" + address + \"'\" + \")\";\n\t\t\tstmt.executeUpdate(query);\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void update(Customer myCust){\n }", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "@Override\n\tpublic Uni<Customer> updateCustomer(Customer customer) {\n\t\tFunction<Customer, Uni<? extends Customer>> update = entity -> {\n\t\t\tentity.setName(customer.getName());\n\t\t\tentity.setAddress(customer.getAddress());\n\t\t\treturn repo.flush().onItem().transform(ignore -> entity);\n\t\t};\n\t\treturn repo.findById(customer.getId()).onItem().ifNotNull().transformToUni(update);\n\t}", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "int updateNameIncludingDtNameEndDate(String cdNameSuffix, int idPerson, String indNameInvalid,\n String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName,\n Date lastUpdate);", "public void setCustomerName(String name) {\r\n this.name.setText(name);\r\n }", "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "private void updateCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID()),\n String.valueOf(customer.getCustomerID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"UpdateCustomer.sql\"),\n args\n );\n }", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "@Override\n\tpublic Customers update(Customers updatecust) {\n\t\tCustomers custpersist= search(updatecust.getId());\n\t\tif (custpersist==null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers upcust = CustRepo.save(updatecust);\n\t\treturn upcust;\n\t}", "public void setCustomer_Name(String customer_Name) {\n this.customer_Name = customer_Name;\n }", "private void updateScreenCustomerDetails(Customer c) {\n // - update main title with customers full name\n tvCustomerMainTitle.setText(customer.toString());\n\n // - update screen with customer ID\n textViewID.setText(customer.getCustomerID());\n\n // - update screen with customer email\n tvCustomerEmail.setText(customer.getEmail());\n\n // - update screen with customer VIP status\n tvCustomerVipStatus.setText(customer.vipStatusToString());\n\n // - update avctive game and lane fields\n }", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getCustName() {\n\t\treturn custName;\n\t}", "public String getCname() {\r\n return cname;\r\n }", "public void setCName(String aValue) {\n String oldValue = cName;\n cName = aValue;\n changeSupport.firePropertyChange(\"cName\", oldValue, aValue);\n }", "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}", "protected void updateCustomer( int C_W_ID, int C_D_ID, int C_ID, double OL_AMOUNT ) {\n String query = \"UPDATE tpcc_customer SET c_balance = c_balance + \" + OL_AMOUNT + \", c_delivery_cnt = c_delivery_cnt + 1 WHERE c_w_id = \" + C_W_ID + \" AND c_d_id = \" + C_D_ID + \" AND c_id = \" + C_ID;\n executeAndLogStatement( query, QueryType.QUERYTYPEUPDATE );\n }", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "public void setcName(String cName) {\n this.cName = cName == null ? null : cName.trim();\n }", "public void setLastName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer last name can't be null.\" );\r\n else \r\n\t this.lastName = name; \r\n }", "public void update(Customer customer) throws SQLException {\r\n\t\tString updateSql = \"UPDATE \" + tableName\r\n\t\t\t\t+ \" SET name=?,surname=?,birth_date=?,birth_place=?,address=?,city=?,province=?,\"\r\n\t\t\t\t+ \" cap=?,phone_number=?,newsletter=?,email=?\" + \"WHERE (id = ?)\";\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(updateSql);\r\n\t\t\tpreparedStatement.setString(1, customer.getName());\r\n\t\t\tpreparedStatement.setString(2, customer.getSurname());\r\n\t\t\tpreparedStatement.setDate(3, (Date) customer.getBirthdate());\r\n\t\t\tpreparedStatement.setString(4, customer.getBirthplace());\r\n\t\t\tpreparedStatement.setString(5, customer.getAddress());\r\n\t\t\tpreparedStatement.setString(6, customer.getCity());\r\n\t\t\tpreparedStatement.setString(7, customer.getProvince());\r\n\t\t\tpreparedStatement.setInt(8, customer.getCap());\r\n\t\t\tpreparedStatement.setString(9, customer.getPhoneNumber());\r\n\t\t\tpreparedStatement.setInt(10, customer.getNewsletter());\r\n\t\t\tpreparedStatement.setString(11, customer.getEmail());\r\n\t\t\tpreparedStatement.setInt(12, customer.getId());\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t}", "public void update(String custNo, CstCustomer cstCustomer2) {\n\t\tcstCustomerDao.update(custNo,cstCustomer2);\n\t}", "private void updateCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer updateCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(updateCustomer);\n response.sendRedirect(\"list\");\n\n }", "public String getCname() {\n return cname;\n }", "public boolean updateCustomer(String customerJSON);", "private void updateCustomerName(String firstName, String email, int position) {\n Customer c = listCustomers.get(position);\n c.setFirst_name(firstName);\n c.setMail(email);\n\n dbHelper.updateCustomer(c);\n\n //refreshing the list\n listCustomers.set(position, c);\n userRecyclerAdapter.notifyItemChanged(position);\n }", "public String getCustomerName()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "public String getCustID()\n\t{\n\t\treturn custID;\n\t}", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "public void updateSalerCustomerByDel(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByDel(uid);\n\t}", "@Override\n public java.lang.String getLastName() {\n return _entityCustomer.getLastName();\n }", "public void changeFirstName(String newName) throws IOException {\n\t\t// update the customer's first name instance variable\n\t\tthis.firstName = newName;\n\t\t// write the changes to the customer's file\n\t\tthis.write();\n\t\t// update the custome's user name\n\t\tthis.updateUserName();\n\t}", "@Override\n\tpublic Customer update(Customer o) {\n\n\t\tif (o == null || o.getId() == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString updateQuery = String.format(\"UPDATE TB_customer SET \");\n\t\tupdateQuery += COLUMN_NAME_FIRST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_LAST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_EMAIL + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_KNICKNAME + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_BIRTHDATE + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_CREDITS + \"= ?\";\n\t\tupdateQuery += \" WHERE \" + COLUMN_NAME_ID + \"= ? ;\";\n\n\t\ttry (PreparedStatement pS = dbCon.prepareStatement(updateQuery)) {\n\n\t\t\tpS.setString(1, o.getFirstName());\n\t\t\tpS.setString(2, o.getLastName());\n\t\t\tpS.setString(3, o.getEmail());\n\t\t\tpS.setString(4, o.getKnickname());\n\t\t\tpS.setDate(5, java.sql.Date.valueOf(o.getBirthdate()));\n\t\t\tpS.setDouble(6, o.getCredits());\n\t\t\tpS.setInt(7, o.getId());\n\t\t\tpS.executeUpdate();\n\n\t\t\tpS.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Update of tb_customer \" + o.getId() + \" failed : \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t\treturn o;\n\t}", "public void setCname(DnsCnameRdata cname) {\n this.cname = cname;\n }", "public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }", "@Test\n public void testUpdateName() {\n System.out.println(\"updateName\");\n String name = \"Gert Madsen\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateName(customerID, name);\n assertEquals(\"Gert Madsen\", instance.getCustomer(customerID).getName());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void updateNewTandC(Integer vendorId, String userName);", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "@Override\n\tpublic boolean update(int customerId,String c) {\n\t\tString query=\"UPDATE Customer SET city=? where Customer_ID=?\";\n\t\ttry {\n\t\t\tPreparedStatement preparedStatement=DatabaseConnectionDAO.geConnection().prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, customerId);\n\t\t\tpreparedStatement.setString(2, c);\n\t\t\tint n=preparedStatement.executeUpdate();\n\t\t\tif(n>0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"updated\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"enter valid data\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn false;\n\t}", "public void setAmazonCustomerId(final SessionContext ctx, final Customer item, final String value)\n\t{\n\t\titem.setProperty(ctx, AmazoncoreConstants.Attributes.Customer.AMAZONCUSTOMERID,value);\n\t}", "@PUT\n\t@Path(\"/update\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void putCustomer(String test)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Separate incoming data into individual strings\n\t\tString[] splited = test.split(\"\\\\s+\");\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Update the customers table\n\t\tdb.Update(\"UPDATE CUSTOMERS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE id='\" + splited[0] + \"'\");\n\n\t\t// Update the bookings table\n\t\tdb.Update(\"UPDATE BOOKINGS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE CUSTOMERID='\" + splited[0] + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "public ResponseEntity<?> updateCustomerById(Long id, customer.controller.Customer customer);", "@Override\n public void setLastName(java.lang.String lastName) {\n _entityCustomer.setLastName(lastName);\n }", "public void setCustName(String custName) {\n\t\tthis.custName = custName;\n\t}", "@PostMapping(\"/update-contact/{cid}\")\n\tpublic String updateContact(@PathVariable(\"cid\") Integer cid,Model m) {\n\t\t\n\t\tm.addAttribute(\"title\",\"Update contact\");\n\t\t\n\t\tContact contact = this.contactRepository.findById(cid).get();\n\t\t\n\t\tm.addAttribute(\"contact\",contact);\n\t\t\n\t\treturn \"normal/update_form\";\n\t}", "public void setCustomer(au.gov.asic.types.AccountIdentifierType customer)\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n target = (au.gov.asic.types.AccountIdentifierType)get_store().add_element_user(CUSTOMER$0);\n }\n target.set(customer);\n }\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "void lastName( String key, String value ){\n developer.lastName = value;\n }", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "@Override\n\tpublic String getName() {\n\t\treturn customerName;\n\t}", "public static void update(Customer aCustomer) throws NotFoundException\r\n\t{\n\t\tphoneNumber = aCustomer.getPhoneNo();\r\n\t\tname = aCustomer.getName();\r\n\t\taddress = aCustomer.getAddress();\r\n\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlUpdate = \"Update CustomerTable \" +\r\n\t\t\t\t\t\t\t\t \" SET CustomerName = '\" + name +\"', \" +\r\n\t\t\t\t\t\t\t\t \" address = '\" + address +\"' \" +\r\n\t\t\t\t\t\t\t\t \" WHERE PhoneNo = '\" + phoneNumber + \"'\";\r\n\r\n\t\t// see if this customer exists in the database\r\n\t\t// NotFoundException is thrown by find method\r\n\t\ttry\r\n\t\t{\r\n\t\t\tCustomer c = Customer.find(phoneNumber);\r\n \t\t// if found, execute the SQL update statement\r\n \t\tint result = aStatement.executeUpdate(sqlUpdate);\r\n \t}\r\n\t\tcatch (SQLException e)\r\n\t\t\t{ System.out.println(e);\t}\r\n\t}", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public void getCustomerID (){\n\t\t//gets the selected row \n\t\tint selectedRowIndex = listOfAccounts.getSelectedRow();\n\t\t//gets the value of the first element of the row which is the \n\t\t//customerID\n\t\tcustomerID = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 0);\n\t\tcustomerName = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 1);\n\t}", "String getCustomerNameById(int customerId);", "public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}", "public static void updatecou(String cno2, String cname2, double stucredit2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"update course set Cname = ?, Ccredit = ? where Cno = ?\");\n\t\t\tps.setString(1, cname2);\n\t\t\tps.setDouble(2, stucredit2);\n\t\t\tps.setString(3, cno2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}", "String getCName() {\n return nameTF.getText();\n }", "public boolean updatecustomer(long id , Customermodel customermodel) {\n\t\t Optional<Customermodel> customerd = customerdb.findById(id);\n\n\t\t\t\t\tif (customerd.isPresent()) {\n\t\t\t\t\t\tCustomermodel customer = customerd.get();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcustomer.setDob(customermodel.getDob());\n\t\t\t\t\t\tcustomer.setName(customermodel.getName());\n\t\t\t\t\t\tcustomerdb.save(customer);\n\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\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t \n\t }", "void updateNames(Long id, String firstName, String lastName);", "int insertName(String cdNameSuffix, int idName, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle);", "public void saveCustomer(Customer c) {\n database.saveCustomer(c.getCustomerID(), c.getName(), c.getAddress(), c.getEmail(), Customer.toBase64(c.getPassword()), c.getBirthday(), c.getPhoneNumber(), Customer.toBase64(c.getSalt()), -1);\n //TODO Implement a getter for getting the orderId so that it can be saved.\n }", "public void setCustomerName(String customerName)\n\t{\n\t\tsetColumn(customerName, OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "public void setCustNo(java.lang.String custNo) {\n this.custNo = custNo;\n }", "public String getName()\n {\n return customer;\n }", "@Override\n\tpublic Customer update(long customerId, Customer customer) {\n\t\treturn null;\n\t}", "public void setCustomer_id(int customer_id){\n this.customer_id = customer_id;\n }", "public void editStudentLastName(Student changeStudent, String name)\n\t{\n\t\tchangeStudent.setStrNameLast (name);\n\t\tthis.saveNeed = true;\n\n\n\t}", "public void setCustomersName(String customersName)\r\n {\r\n this.customersName = customersName;\r\n }", "void updateCustomerOrderBroadbandASID(CustomerOrderBroadbandASID cobasid);" ]
[ "0.6877346", "0.6496013", "0.64853466", "0.6270981", "0.605784", "0.6020372", "0.598891", "0.596575", "0.59476364", "0.5942185", "0.59419405", "0.5932961", "0.59256727", "0.59228325", "0.5920854", "0.5912445", "0.59095347", "0.5871593", "0.58613914", "0.58399487", "0.5831524", "0.580319", "0.58028734", "0.5799873", "0.5788312", "0.5774693", "0.57623357", "0.57412034", "0.57395464", "0.5676441", "0.5663814", "0.5653248", "0.5649304", "0.56450117", "0.56324613", "0.5626825", "0.56259406", "0.56191385", "0.5609533", "0.55960846", "0.55960846", "0.5573582", "0.5573582", "0.55705756", "0.55702394", "0.5567036", "0.55623645", "0.55461997", "0.55378824", "0.55350447", "0.55108", "0.5508616", "0.55075043", "0.54859596", "0.5481013", "0.5477727", "0.5476002", "0.5475747", "0.54718083", "0.54577184", "0.54453945", "0.54452074", "0.5441804", "0.5439988", "0.5439208", "0.54384774", "0.5436718", "0.5425961", "0.54121786", "0.5409077", "0.53990555", "0.53972626", "0.5381105", "0.5368539", "0.53664994", "0.53610027", "0.5360877", "0.5349766", "0.5349144", "0.533644", "0.53348047", "0.53330576", "0.5330694", "0.5322061", "0.5319011", "0.5310679", "0.5310554", "0.5308594", "0.5308237", "0.5302866", "0.53006613", "0.5300657", "0.5299005", "0.52908367", "0.5286119", "0.528558", "0.5284597", "0.52834785", "0.5278784", "0.52762854" ]
0.7611083
0
Updates Customer gender attribute given CID:
public void updateCustomerGender(Connection connection, int CID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()){ String sql = "UPDATE Customer SET gender = ? WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a new gender: "); setGender(scan.next().charAt(0)); pStmt.setString(1, String.valueOf(getGender())); setCID(CID); pStmt.setInt(2, getCID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setGender(String gender){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyGender, gender);\n }", "@Override\r\n\tpublic boolean UpdateGender(String gender, String username) {\n\t\tDataAccess dBManager = new DataAccess();\r\n \tboolean update6 = dBManager.updateGender(gender, username);\r\n \tdBManager.close();\r\n \t//updateCurrentUser();\r\n \treturn update6;\r\n\t}", "public void setGender(String value) {\n this.gender = value;\n }", "public void setGender(Integer gender) {\r\n this.gender = gender;\r\n }", "public void setGender(String gender);", "public void setGender(String gender);", "public void setGender(String gender);", "@Override\n\tpublic void setGender(int gender) {\n\t\t_candidate.setGender(gender);\n\t}", "public void setGender(Gender inGender)\n {\n gender = inGender;\n }", "public void setGender(Gender_Tp gender) { this.gender = gender; }", "public void setGender(Integer gender) {\n this.gender = gender;\n }", "public void setGender(Integer gender) {\n this.gender = gender;\n }", "public void setGender(char gender) { this.gender = gender; }", "public void setGender(String gender) {\r\n this.gender = gender;\r\n }", "public void setGender(String gender) {\n this.gender = gender;\n }", "public void setGender(Byte gender) {\n this.gender = gender;\n }", "public void setGender(Byte gender) {\n this.gender = gender;\n }", "public void setGender(java.lang.String gender) {\r\n this.gender = gender;\r\n }", "public void setGender(char gender) {\r\n\t\tthis.gender = gender;\r\n\t}", "public void setGender(char gender) {\r\n\t\tthis.gender = gender;\r\n\t}", "public void updateCustomerAge(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET age = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new age: \");\n setAge(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(1, getAge());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void setGender(java.lang.String gender) {\n this.gender = gender;\n }", "public void setGender(String gender) {\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F; \n }", "public void updateCustomer(String id) {\n\t\t\n\t}", "public void setGender(String gender) {\r\n\t\tthis.gender = gender;\r\n\t}", "public void setMale(int value) {\n this.male = value;\n }", "protected void setGender(Gender gender) {\n this.gender = gender;\n }", "public void setGender(Gender gender) {\n\t\tthis.gender = gender;\n\t}", "public void setGenderId(String genderId) {\n this.genderId = genderId;\n }", "public void setGender(String gender){\n if(gender == \"laki\"){\r\n isMale = true;\r\n }else if(gender == \"perempuan\"){\r\n isMale = false;\r\n }\r\n }", "public void setGender( String gender)\r\n\t{\n\t\tthis.gender = validateGender( gender );\r\n\r\n\t}", "public Builder setGender(int value) {\n bitField0_ |= 0x00000002;\n gender_ = value;\n onChanged();\n return this;\n }", "public void setGender(com.luisjrz96.streaming.birthsgenerator.models.Gender value) {\n this.gender = value;\n }", "public void setGender(Gender param) {\n this.localGender = param;\n }", "public void setGender(char gender) {\n\n if(gender=='m'||gender=='f'||gender=='M'||gender=='F')\n this.gender = gender;\n else this.gender ='*';\n }", "void updateCustomerById(Customer customer);", "public void setFemale(int value) {\n this.female = value;\n }", "public Builder setGenderValue(int value) {\n \n gender_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void update(Contact contact) throws Exception {\n\t\tObject[] params = contact.toEditArray();\n\t\tparams = ArrayUtils.add(params, contact.getId());\n\t\tupdate(\"update contact set customer=?, gender=?, age=?, position=?, phone=?, relation=? where id = ?\",\n\t\t\t\tparams);\n\t}", "public Builder setGenderValue(int value) {\n gender_ = value;\n onChanged();\n return this;\n }", "public void setGender (boolean g) {\n gender = g;\n }", "static void saveUserGender(Context context, Gender gender) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putInt(USER_GENDER_KEY, gender.getId())\n .apply();\n }", "public void setGender(Gender param) {\n localGenderTracker = param != null;\n\n this.localGender = param;\n }", "public static int updateCustomer(int id, String name, String cnic,\r\n\t\t\tString phone, String address, int familySize, double monthlyIncome,\r\n\t\t\tdouble familyIncome, int status, String occupation) {\r\n\t\tConnection con = connection.Connect.getConnection();\r\n\t\tString query = \"Update customer SET customer_name = '\" + name\r\n\t\t\t\t+ \"',customer_cnic= '\" + cnic + \"',customer_address= '\"\r\n\t\t\t\t+ address + \"',customer_family_size= '\" + familySize\r\n\t\t\t\t+ \"',customer_phone ='\" + phone + \"',customer_monthly_income='\"\r\n\t\t\t\t+ monthlyIncome + \"',customer_family_income='\" + familyIncome\r\n\t\t\t\t+ \"',status= '\" + status + \"',occupation= '\" + occupation\r\n\t\t\t\t+ \"' WHERE customer_id= \" + id + \";\";\r\n\t\tint row = 0;\r\n\t\ttry {\r\n\t\t\tStatement st = con.createStatement();\r\n\t\t\trow = st.executeUpdate(query);\r\n\t\t\tif (row > 0) {\r\n\t\t\t\tSystem.out.println(\"Data is updated\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Data is not updated\");\r\n\t\t\t}\r\n\r\n\t\t\tst.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"\", ex);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn row;\r\n\t}", "void addHasGender(Integer newHasGender);", "public void setAdministrativeGenderCode(com.walgreens.rxit.ch.cda.CE administrativeGenderCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.CE target = null;\n target = (com.walgreens.rxit.ch.cda.CE)get_store().find_element_user(ADMINISTRATIVEGENDERCODE$10, 0);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.CE)get_store().add_element_user(ADMINISTRATIVEGENDERCODE$10);\n }\n target.set(administrativeGenderCode);\n }\n }", "@java.lang.Override public int getGenderValue() {\n return gender_;\n }", "public void update(Customer customer) {\n\n\t}", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "public String getGenderId() {\n return genderId;\n }", "public int getGenderValue() {\n return gender_;\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setGender(com.luisjrz96.streaming.birthsgenerator.models.Gender value) {\n validate(fields()[4], value);\n this.gender = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "private void selectGender(int id)\n {\n switch (id) {\n\n case R.id.radioMale:\n value = \"male\";\n break;\n case R.id.radioFemale:\n value = \"female\";\n break;\n case R.id.radioOthers:\n value = \"others\";\n break;\n }\n }", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }", "public void updateSalerCustomerByDel(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByDel(uid);\n\t}", "public void setGenders(HashMap<String, Integer> genders) {\n this.genders = genders;\n }", "@java.lang.Override public int getGenderValue() {\n return gender_;\n }", "public void updateCustomerLastName(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET last_name = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new last name: \");\n setLastName(scan.nextLine());\n pStmt.setString(1, getLastName());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "@Override\r\n\tpublic void setInfo(String gender, String age) {\n\t\tmRectOnCamera.setPersonInfo(gender, age);\r\n\t}", "public int getGenderValue() {\n return gender_;\n }", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "public Gender_Tp getGender() { return gender; }", "public Integer getGender() {\r\n return gender;\r\n }", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void updateProfile(CustomerUpdateVO customerVO) {\n\t\tCustomer customer = customerRepository.findById(customerVO.getCid()).get();\n\t\ttry {\n\t\t\tcustomer.setImage(customerVO.getPhoto().getBytes());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcustomer.setName(customerVO.getName());\n\t\tcustomer.setMobile(customerVO.getMobile());\n\t\tcustomer.setDom(new Timestamp(new Date().getTime()));\n\t\t/// customerRepository.save(customer);\n\t}", "public int getGender() {\n return gender_;\n }", "public void setGender(String gender) {\n this.gender = gender == null ? null : gender.trim();\n }", "public void setGender(String gender) {\n this.gender = gender == null ? null : gender.trim();\n }", "public void setGender(String gender) {\n this.gender = gender == null ? null : gender.trim();\n }", "public void setGender(String gender) {\n this.gender = gender == null ? null : gender.trim();\n }", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "public int getGender() {\n return gender_;\n }", "public Integer getGender() {\n return gender;\n }", "public Integer getGender() {\n return gender;\n }", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "public void setSex(String sex);", "public boolean updateCustomer(String customerJSON);", "int getGenderValue();", "int getGender();", "public void setPatientSex(String patientSex){\n\t\tthis.patientSex = patientSex;\n\t}", "public void changeEmailOfCensus(String idCensus, String email) \n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tCensus temp=new Census();\n\t\t\ttemp.setId(idCensus);\n\t\t\tObjectSet result=DB.queryByExample(temp);\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\tCensus old=(Census)result.next();\n\t\t\t\tCensus updated=new Census(old);\n\t\t\t\tupdated.setEmail(email);\n\t\t\t\tDB.delete(old);\n\t\t\t\tDB.store(updated);\n\t\t\t\tSystem.out.println(\"[DB4O] Census was updated\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"[DB4]ERROR:Census could not be updated\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\t\n\t}", "public void setAccountSex(Integer accountSex) {\n this.accountSex = accountSex;\n }", "public void updateSalerCustomerByForbidden(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByForbidden(uid);\n\t}", "public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }", "public char getGender() { return gender; }", "public Customer Update(int id, String attribute, Customer customer) {\n\t\t\n\t\tString sql = \"\";\n\t\t\n\t\tswitch(attribute) {\n\t\tcase \"NAME\":\n\t\t\tsql = \"UPDATE customers set name = '\"+ customer.getName() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"EMAIL\":\n\t\t\tsql = \"UPDATE customers set email = '\"+ customer.getEmail() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"ADDRESS\":\n\t\t\tsql = \"UPDATE customers set address = '\"+ customer.getAddress() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql);\n\t\t\treturn readById(id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public Gender getGender()\n {\n return gender;\n }", "public Byte getGender() {\n return gender;\n }", "public Byte getGender() {\n return gender;\n }", "public boolean updatecustomer(long id , Customermodel customermodel) {\n\t\t Optional<Customermodel> customerd = customerdb.findById(id);\n\n\t\t\t\t\tif (customerd.isPresent()) {\n\t\t\t\t\t\tCustomermodel customer = customerd.get();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcustomer.setDob(customermodel.getDob());\n\t\t\t\t\t\tcustomer.setName(customermodel.getName());\n\t\t\t\t\t\tcustomerdb.save(customer);\n\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\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t \n\t }", "public Builder setGender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n gender_ = value;\n onChanged();\n return this;\n }", "public Builder setGender(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n gender_ = value;\n onChanged();\n return this;\n }", "public char getGender(){\n\t\treturn gender;\n\t}", "private Gender(String gender) {\n\t\tthis.gender = gender;\n\t}", "public Female( int age ) {\n\t\tcurrent_age = age;\n\t}", "public Builder setGender(com.zzsong.netty.protobuff.two.ProtoData.Person.Gender value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n gender_ = value.getNumber();\n onChanged();\n return this;\n }", "public int gender()\r\n\t{\r\n\t\tif(male)\r\n\t\t\treturn 0;\r\n\t\treturn 1;\r\n\t}", "public void setAdminSex(Integer adminSex) {\n this.adminSex = adminSex;\n }" ]
[ "0.6154192", "0.61225045", "0.6115767", "0.60842836", "0.6076715", "0.6076715", "0.6076715", "0.6058735", "0.6057168", "0.6045645", "0.6042863", "0.6042863", "0.6039966", "0.5981181", "0.5933084", "0.59116197", "0.59116197", "0.5905258", "0.5904231", "0.5904231", "0.588007", "0.5871326", "0.5871314", "0.5820415", "0.58154064", "0.5806194", "0.57963717", "0.57747036", "0.5747825", "0.5728708", "0.57277673", "0.57272017", "0.5719721", "0.57117414", "0.5627458", "0.56241965", "0.56079006", "0.5539712", "0.5506407", "0.5481156", "0.5468433", "0.54588723", "0.5415514", "0.541152", "0.53972363", "0.53786427", "0.537558", "0.5373535", "0.5362201", "0.53477734", "0.532663", "0.5324299", "0.5306321", "0.5303179", "0.52978164", "0.5285688", "0.52820283", "0.52692074", "0.5267307", "0.5266654", "0.52628076", "0.5256331", "0.52350944", "0.52336127", "0.5229381", "0.5229381", "0.5223429", "0.52214694", "0.52103436", "0.52103436", "0.52103436", "0.52103436", "0.5201403", "0.5199734", "0.5188838", "0.5188838", "0.5187389", "0.5185411", "0.51853013", "0.5174748", "0.5170335", "0.5164573", "0.51627314", "0.5162041", "0.51436174", "0.51432675", "0.51386607", "0.51323444", "0.5123789", "0.51221013", "0.51221013", "0.5111852", "0.5110963", "0.5110963", "0.5102533", "0.51012325", "0.5090961", "0.5088831", "0.5075938", "0.506811" ]
0.7706009
0
Updates Customer age attribute given CID:
public void updateCustomerAge(Connection connection, int CID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()){ String sql = "UPDATE Customer SET age = ? WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a new age: "); setAge(Integer.parseInt(scan.nextLine())); pStmt.setInt(1, getAge()); setCID(CID); pStmt.setInt(2, getCID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setAge(int newAge) \r\n\t{\r\n\t\tthis._age = newAge;\r\n\t}", "protected void setAge(int age) {\r\n\t\tthis.age = age;\r\n\t}", "public void setAge(int age) { \n\t\t this.age = age; \n\t}", "public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}", "public CustomerBuilder setAge(final int ageParam) {\n this.ageNested = ageParam;\n return this;\n }", "public void setAge(int age) {\n\t\tthis.age = age;\n\t}", "public void setAge(int age) {\n\t\tthis.age = age;\n\t}", "public void setAge(int age) {\n\t\tthis.age = age;\n\t}", "public void setAge(int age) {\n\t\tthis.age = age;\n\t}", "public void setAge(int age) {\n\t\tthis.age = age;\n\t}", "public void updateCustomerGender(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET gender = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new gender: \");\n setGender(scan.next().charAt(0));\n pStmt.setString(1, String.valueOf(getGender()));\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "UserInfo setAge(Integer age);", "public void setAge(int age)\r\n {\r\n this.age = age;\r\n }", "public void setAge(int age) { this.age = age; }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age) {\n this.age = age;\n }", "public void setAge(int age){\n this.age = age;\n }", "@Override\n\tpublic void setAge(int age) throws RemoteException {\n\t\tthis.age = age;\n\t}", "@Override\r\n\tpublic final void setAge(final int theAge) {\r\n\t\tthis.age = theAge;\r\n\t}", "void setAge(int age);", "public void setAge(final int age) {\n mAge = age;\n }", "public static void setAge(String age){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyAge, age);\n }", "public void setAge(Integer age) {\r\n this.age = age;\r\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(Integer age) {\n this.age = age;\n }", "public void setAge(int age);", "public void setAge(double age) {\r\n\t\tif (age <= 2) setAge(age * 10.5);\r\n\t\telse setAge(21 + (4 * (age - 2)));\r\n\t}", "protected void setAge(Age age) {\n this.age = age;\n }", "@Override\n\tpublic void Age(int age) {\n\t\t\n\t}", "public void set_age(int obj_age) {\n\t\tage = obj_age;\n\t}", "void updateCustomerById(Customer customer);", "public void updateCustomer(String id) {\n\t\t\n\t}", "public Builder setAge(int value) {\n bitField0_ |= 0x00000004;\n age_ = value;\n onChanged();\n return this;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public void setAge(int age) {\n\t\tif (age < 0) {\n\t\t\tthis.age = 0;\n\t\t} else {\n\t\t\tthis.age = age;\n\t\t}\n\t}", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public int changeDogAge(int dogAge) {\n this.age = dogAge;\n return age;\n }", "public void setAge(String un, int age){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n Updates.set(\"age\", age)\n );\n }", "public void setAccountAge(Integer accountAge) {\n this.accountAge = accountAge;\n }", "public void update(Customer customer) {\n\n\t}", "public void setAge(String age) {\n this.age = age;\n }", "public void incrementAge(int dogAge) {\n this.age = this.age + 1;\n }", "protected void incrementAge()\n {\n age++;\n if(age > max_age) {\n setDead();\n }\n }", "public void setInfo(int inAge){\n\t\tage = inAge;\n\t}", "public void update() {\n setAge(getAge() - 1);\n }", "public HumanBuilder setAge( int age) {\n\t\t\t/*\n\t\t\t * id is a instance variable of hte HumanBuilder class, and we are inside a \n\t\t\t * instance method so we CAN access the variable id\n\t\t\t */\n\t\t\tid=3;\n\t\t\t//we can also access statics of the HumanBuilder class in an instance method\n\t\t\tstatInt++;\n\t\t\t//this int age is a LOCAL variable\n\t\t\t/*\n\t\t\t * if i pass in a minus number, this will give age a new value of 1\n\t\t\t */\n\t\t\tif(age<=0)\n\t\t\t\tage=1;\n\t\t\t/*\n\t\t\t * cannot access age directly as this is a static nested class, so we first create\n\t\t\t * a Human object, then we access the age of that Human\n\t\t\t */\n\t\t\tmyHuman.age=age;\n\t\t\treturn this;\n\t\t}", "public void updateCustomerLastName(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET last_name = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new last name: \");\n setLastName(scan.nextLine());\n pStmt.setString(1, getLastName());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void setAge(int age) {\r\n\t\tif (age >= 0) \r\n\t\t\tthis.age = age;\r\n\t\t//else //ideally we should let the caller know we didn't set the Age\r\n\t}", "public CustomerAgeElements getCustomerAgeAccess() {\n\t\treturn pCustomerAge;\n\t}", "protected void updateCustomer( int C_W_ID, int C_D_ID, int C_ID, double OL_AMOUNT ) {\n String query = \"UPDATE tpcc_customer SET c_balance = c_balance + \" + OL_AMOUNT + \", c_delivery_cnt = c_delivery_cnt + 1 WHERE c_w_id = \" + C_W_ID + \" AND c_d_id = \" + C_D_ID + \" AND c_id = \" + C_ID;\n executeAndLogStatement( query, QueryType.QUERYTYPEUPDATE );\n }", "int getCustomerAge(String bookingRef);", "private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "public Customer Update(int id, String attribute, Customer customer) {\n\t\t\n\t\tString sql = \"\";\n\t\t\n\t\tswitch(attribute) {\n\t\tcase \"NAME\":\n\t\t\tsql = \"UPDATE customers set name = '\"+ customer.getName() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"EMAIL\":\n\t\t\tsql = \"UPDATE customers set email = '\"+ customer.getEmail() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"ADDRESS\":\n\t\t\tsql = \"UPDATE customers set address = '\"+ customer.getAddress() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql);\n\t\t\treturn readById(id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public void setCustomerId(long value) {\n this.customerId = value;\n }", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "public UserBuilder age(int age) {\n\t\t\tthis.age = age;\n\t\t\treturn this; // return this to make expression chainable.\n\t\t\t\n\t\t}", "public void setAge(String age)\r\n\t{\n\t\tthis.age = validateInteger( age, \"age\" );\r\n\t}", "public void setAge(java.lang.String param) {\r\n localAgeTracker = param != null;\r\n\r\n this.localAge = param;\r\n }", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "public void update(Customer user){\n\t\t\n\t\tString sql = \"UPDATE CUSTOMER SET \" +\n\t\t\t\t\"NAME = ?, Age = ? WHERE CUST_ID = ? \";\n\t\tConnection conn = null;\n\t\t\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\t\t\tps.setString(1, user.getName());\n\t\t\tps.setInt(2, user.getAge());\n\t\t\tps.setInt(3, user.getCustId());\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }", "@PutMapping(\"/points/{customerId}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void updatePointsOnAccount(@PathVariable(\"customerId\") int customerId, @RequestBody @Valid LevelUpViewModel lvm) {\n\n if (customerId != lvm.getCustomerId()) {\n throw new IllegalArgumentException(String.format(\"Id %s in the PathVariable does not match the Id %s in the RequestBody \", customerId, lvm.getCustomerId()));\n }\n\n serviceLayer.updatePoints(lvm);\n }", "public void updateAge(int block, int age){\n\t\tblocks[block].updateAge(age);\n\t\tsortBlocks();\n\t}", "public void setUserAge(Byte userAge) {\r\n this.userAge = userAge;\r\n }", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "@Override\n\tpublic int covidVaccineAge() {\n\t\tSystem.out.println(\"FH---covid vaccine age is 18 years\");\n\t\treturn 30;\n\t}", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "public void setAge(String age) {\n\n Instant instant = Instant.parse(age) ;\n\n Date dateAge = Date.from(instant) ;\n\n //Date dateAge = format.parse(age);\n Log.e(\"age convert: \", String.valueOf(dateAge));\n this.age = dateAge;\n }", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "void updateCustomerDDPay(CustomerDDPay cddp);", "public void updateSalerCustomerByDel(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByDel(uid);\n\t}", "int updateByPrimaryKey(CustomerTag record);", "int updateByPrimaryKeySelective(CustomerTag record);", "public void update(Customer myCust){\n }", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "public void setCustomer(Integer customer) {\n this.customer = customer;\n }", "public void setCadence(int newValue) {\n cadence = newValue;\n }", "public void setCateUpdated(Date cateUpdated) {\n this.cateUpdated = cateUpdated;\n }", "public void setAge(double theAge)\n\t{\n\t\tthis.theAge=theAge;\n\n\t\tif(theAge<0.0)\n\t\t{\n\t\t\tthis.theAge=0.0;\n\t\t}\n\t}", "public Customer(Long id, String name, Integer age) {\r\n this.id = id;\r\n this.name = name;\r\n this.age = age;\r\n }", "int updateByPrimaryKeySelective(CustomerVisit record);", "int updateByExample(@Param(\"record\") CCustomer record, @Param(\"example\") CCustomerExample example);", "public void setAverageLifeExp(int age) {\n averageLifeExp = age;\n }", "int updateByExampleSelective(@Param(\"record\") CCustomer record, @Param(\"example\") CCustomerExample example);", "@Override\n\tpublic Customer update(long customerId, Customer customer) {\n\t\treturn null;\n\t}", "@PutMapping(\"/{id}\")\n public String update(@ModelAttribute(CUSTOMER) CustomerDTO customerDTO, @PathVariable(\"id\") long id) {\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customer.getActualAddress().setModified(LocalDateTime.now());\n customerService.updateCustomer(customer, id);\n return REDIRECT_CLIENTS;\n }", "int updateByPrimaryKey(CustomerVisit record);", "public void setAge(final int a) {\n this.age = a;\n }", "@Override\n\tpublic void setAge () {\n\t\t// defining the random range for age between 1 up to 50\n\t\tint age = 1 + (int)(Math.random()*(3));\n\t\tthis.age = age;\n\t}", "public ResponseEntity<?> updateCustomerById(Long id, customer.controller.Customer customer);", "public void setMinAge(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }" ]
[ "0.6181887", "0.6127385", "0.61247635", "0.6121222", "0.609215", "0.60792243", "0.60792243", "0.60792243", "0.60792243", "0.60792243", "0.60634416", "0.60433364", "0.6035987", "0.60289806", "0.60283214", "0.60283214", "0.60283214", "0.60283214", "0.60283214", "0.60283214", "0.5986814", "0.59723234", "0.5929103", "0.59201163", "0.5914871", "0.591144", "0.5894523", "0.5882471", "0.58544374", "0.58544374", "0.58544374", "0.58544374", "0.58473814", "0.58452326", "0.58326954", "0.5832591", "0.5820131", "0.5811703", "0.58064276", "0.57822037", "0.5773769", "0.575917", "0.5729917", "0.5729917", "0.5712892", "0.56986284", "0.56822616", "0.56815493", "0.56554294", "0.5640759", "0.55972886", "0.5594014", "0.55779", "0.5564078", "0.5563227", "0.55589294", "0.55552036", "0.5554535", "0.55522186", "0.5489941", "0.54889107", "0.5482813", "0.54806125", "0.54806125", "0.5480377", "0.5474627", "0.54725814", "0.5467539", "0.54649377", "0.5453339", "0.5449151", "0.54483354", "0.54476005", "0.5425288", "0.5423386", "0.54206944", "0.5411641", "0.54014146", "0.5386197", "0.5383238", "0.53794324", "0.5355759", "0.5336636", "0.5328261", "0.53218496", "0.5317976", "0.53176904", "0.52957016", "0.52829", "0.5278295", "0.5271153", "0.5269995", "0.52631104", "0.5258916", "0.5253974", "0.52437204", "0.52323574", "0.5226898", "0.52192414", "0.5219111" ]
0.761241
0
Deletes a Customer given CID from the CUSTOMER Table:
public void deleteCustomer(Connection connection, int CID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "CUSTOMER", null); if (rs.next()){ String sql = "DELETE FROM Customer WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setCID(CID); pStmt.setInt(1, getCID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteCustomerById(Long id);", "public boolean deleteCustomer(String custId);", "void deleteCustomerById(int customerId);", "public void DeleteCust(String id);", "@Override\n\tpublic Uni<Boolean> deleteCustomerById(Long cid) {\n\t\treturn repo.deleteById(cid).chain(repo::flush).onItem().transform(ignore ->true);\n\t}", "public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }", "@DELETE\n\t@Path(\"/delete\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void delCustomer(String id)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Delete the customers table\n\t\tdb.Delete(\"DELETE FROM CUSTOMERS WHERE id='\" + id + \"'\");\n\n\t\t// Delete the bookings table\n\t\tdb.Delete(\"DELETE FROM BOOKINGS WHERE CUSTOMERID='\" + id + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}", "@Override\n public void deleteCustomer(UUID id) {\n log.debug(\"Customer has been deleted: \"+id);\n }", "@Override\r\n\tpublic void delete(String cust_ID) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setString(1, cust_ID);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "public void deleteCustomer(String id) {\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\ttry {\n\t\t\tStatement deleteStatement = connection.createStatement();\n\t\t\t\n\t\t\tString deleteQuery = \"DELETE FROM Customer WHERE CustomerID='\"+id+\"')\";\n\t\t\tdeleteStatement.executeUpdate(deleteQuery);\t\n\t\t\t\n\t\t\t//TODO delete all DB table entries related to this entry:\n\t\t\t//address\n\t\t\t//credit card\n\t\t\t//All the orders?\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\n\t}", "void deleteCustomerDDPayById(int id);", "@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}", "public boolean deleteCustomer(int id, int customerID)\n throws RemoteException, DeadlockException;", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}", "public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "@GetMapping(\"/delete\")\r\n\tpublic String deleteCustomer(@RequestParam(\"customerId\") int id){\n\t\tcustomerService.deleteCustomer(id);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"redirect:/customer/list\";\r\n\t}", "public static void deleteCustomer(int customerID) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String deleteStatement = \"DELETE from customers WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, deleteStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.setInt(1,customerID);\r\n ps.execute();\r\n\r\n if (ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n } else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "@DeleteMapping(\"/customers/{customerId}\")\n public String deleteCustomer(@PathVariable int customerId) {\n CustomerHibernate customerHibernate = customerService.findById(customerId);\n\n if (customerHibernate == null) {\n throw new RuntimeException(\"Customer id not found - \" + customerId);\n }\n customerService.deleteById(customerId);\n\n return String.format(\"Deleted customer id - %s \", customerId);\n }", "public void delete(int cID) {\n\t\tacmapper.delete(cID);\n\t}", "public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}", "@Override\n\tpublic void deleteCoustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().delete(customer);\n\t}", "public void deleteCustomer(Integer id) {\n\t\t//get current session\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t//query for deleting the account\n\t\tQuery<Customer> query = currentSession.createQuery(\n\t\t\t\t\t\t\t\t\t\"delete from Customer where customerId=:id\",Customer.class);\n\t\tquery.setParameter(id, id);\n\t\tquery.executeUpdate();\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}", "public void deleteCustomer(Customer customer) {\n\n\t\tcustomers.remove(customer);\n\n\t\tString sql = \"UPDATE customer SET active = 0 WHERE customerId = ?\";\n\n\t\ttry ( Connection conn = DriverManager.getConnection(URL, USER_NAME, PASSWORD);\n\t\t\t\tPreparedStatement prepstmt = conn.prepareStatement(sql); ) {\n\n\t\t\tint customerId = Customer.getCustomerId(customer);\n\t\t\tprepstmt.setInt(1, customerId);\n\t\t\tprepstmt.executeUpdate();\n\n\t\t} catch (SQLException e){\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t}", "@DeleteMapping(\"/customer/id/{id}\")\r\n\tpublic Customer deleteCustomerbyId(@PathVariable(\"id\") int customerId) {\r\n\tif(custService.deleteCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.deleteCustomerbyId(customerId);\r\n\t}", "void delete(Customer customer);", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}", "public static int deleteCustomer(long custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = pool.getConnection();\n\t\t\tStatement stmt = con.createStatement();\n\t\t\treturn stmt.executeUpdate(\"DELETE FROM customersCoupons WHERE customerID=\" + custID);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CouponSystemException(\"Customer Not Deleted\");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\n\t public ResponseEntity<?> deleteCustomer(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.deleteCustomer(id, customer);\n\t }", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(Customer customer) {\n\t\thibernateTemplate.delete(customer);\n\n\t\tSystem.out.println(customer + \"is deleted\");\n\t}", "@GET\n\t@Path(\"DeleteCustomer\")\n\tpublic Reply deleteCustomer(@QueryParam(\"id\") int id) {\n\t\treturn ManagerHelper.getCustomerManager().deleteCustomer(id);\n\t}", "public void Delete(int id) {\n\t\tString sql4 = \"DELETE FROM customers where customer_id= \" + id;\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql4);\n\t\t\tSystem.out.println(\"Deleted\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void deleteCustomerById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int idCustomer = Integer.parseInt(request.getParameter(\"id\"));\n CustomerDao.deleteCustomer(idCustomer);\n response.sendRedirect(\"/\");\n }", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n Session session =sessionFactory.getCurrentSession();\n Customer customer= getCustomer(customerId);\n session.delete(customer);\n\t\treturn true;\n\t}", "public void deleteSalerCustomer(int uid) {\n\t\tthis.salerCustomerMapper.deleteSalerCustomer(uid);\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now delete the customer using parameter theId i.e., Customer id (primary key)\n\t\t//HQL query\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\n\t\t//prev parameter theId is assigned to customerId\n\t\ttheQuery.setParameter(\"customerId\",theId);\n\n\t\t//this works with update, delete , so on ...\n\t\ttheQuery.executeUpdate();\n\n\t}", "@Override\n\tpublic void removeCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName() == null)\n\t\t\tthrow new Exception(\"No Such customer Exists.\");\n\t\t\n\t\tif(custCheck.getCustName().equalsIgnoreCase(customer.getCustName()) && customer.getId() == custCheck.getId()) {\n\t\t\ttry {\n\t\t\t\t\tStatement st = con.createStatement();\n\t\t\t\t\tString remove = String.format(\"delete from customer where id in('%d')\", \n\t\t\t\t\t\tcustomer.getId());\n\t\t\t\t\tst.executeUpdate(remove);\n\t\t\t\t\tSystem.out.println(\"Customer removed successfully\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB\");\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "int deleteByPrimaryKey(String cid);", "@ApiOperation(value = \"Delete a customer\", notes = \"\")\n @DeleteMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public void deleteCustomer(@PathVariable Long customerId) {\n\n customerService.deleteCustomerById(customerId);\n\n }", "@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}", "public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}", "@DeleteMapping(\"/{id}\")\n public Boolean deleteCustomer(@PathVariable(\"id\") Long customerId) {\n return true;\n }", "@DeleteMapping(\"/customers/{customer_id}\")\n\tpublic String deletecustomer(@PathVariable(\"customer_id\") int customerid ) {\n\t\t\n\t\t//first check if there is a customer with that id, if not there then throw our exception to be handled by @ControllerAdvice\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t//if it is happy path(customer found) then go ahead and delete the customer\n\t\tthecustomerService.deleteCustomer(customerid);\n\t\treturn \"Deleted Customer with id: \"+customerid;\n\t}", "void deleteCustomerOrderBroadbandASIDById(int id);", "@Override\n\tpublic void deleteOne(Customer c) {\n\t\tthis.getHibernateTemplate().delete(c);\n\t}", "BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);", "@Override\n\tpublic void delete(Customer o) {\n\n\t\tif (o.getId() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString deleteQuery = \"DELETE FROM TB_customer WHERE \" + COLUMN_NAME_ID + \"=\" + o.getId();\n\n\t\ttry (Statement deleteStatement = dbCon.createStatement()) {\n\t\t\tdeleteStatement.execute(deleteQuery);\n\t\t} catch (SQLException s) {\n\t\t\tSystem.out.println(\"Delete of customer \" + o.getId() + \" falied : \" + s.getMessage());\n\t\t}\n\t}", "void removeCustomer(Customer customer);", "public void removetuple(String cid) throws SQLException\n {\n StringBuffer tpremove=new StringBuffer();\n tpremove.append(\" DELETE FROM Credit \");\n tpremove.append(\" WHERE CID = \");\n tpremove.append(cid);\n Statement statement =null;\n System.out.println(\"Removing record....\");\n\n try {\n statement = this.getConnection().createStatement();\n statement.executeUpdate (tpremove.toString());\n }catch (SQLException e){\n throw e;\n }finally{\n statement.close();\n }\n }", "public int removeCustomer(long id) {\n return model.deleteCustomer(id);\n }", "@Override\r\n\tpublic void deleteForCustomerID(Connection connection, Long customerID) throws SQLException, DAOException {\n\t\tif (customerID == null) {\r\n\t\t\tthrow new DAOException(\"Trying to delete Address with NULL ID\");\r\n\t\t}\r\n\t\t\r\n\t\t// create a preparedStatement\r\n\t\tPreparedStatement ps = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// execute a query\r\n\t\t\tps = connection.prepareStatement(deleteSQL);\r\n\t\t\tps.setLong(1, customerID);\r\n\t\t\tps.executeUpdate();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\t// close preparedStatement\r\n\t\t\tif (ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t} // end of Java exception\r\n\t}", "boolean delete(CustomerOrder customerOrder);", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@DeleteMapping()\n public Customer deleteCustomer(@RequestBody Customer customer ) {\n customerRepository.delete(customer);\n return customerRepository.findById(customer.getId()).isPresent() ? customer : null;\n }", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.DELETE)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void removeCustomer(@PathVariable(\"id\") int id){\n //simply remove the customer using the id. If it does not exist, nothing will happen anyways\n service.removeCustomer(id);\n }", "public void removeCustomer(int id) {\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] != null && customers[i].getID() == id) {\r\n customers[i] = null;\r\n return;\r\n }\r\n }\r\n System.err.println(\"Could not find a customer with id: \" + id);\r\n }", "public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tcustomerDAO.deleteById(id);\n\t}", "@Override\n\tpublic void delete(Long ID) {\n\t\tCustRepo.delete(ID);\n\t}", "int deleteByPrimaryKey(Integer cid);", "int deleteByPrimaryKey(Integer cid);", "public void deleteByIdC(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tString query = deleteQuery(\"id_client\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\tst.executeUpdate();\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:deleteByIdC\" + e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void delete(String cid) {\n\t\tCommodity commodity=this.getHibernateTemplate().get(Commodity.class, cid);\n\t\t System.out.println(\"查询完毕\");\n\t\t System.out.println(commodity.getCname());\n\t this.getHibernateTemplate().delete(commodity);\n\t}", "@Override\n\tpublic void removeCustomer(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Customers here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input customer id\n\t\t\tSystem.out.print(\"Enter Customer Id to delete the customer: \");\n\t\t\tint customerId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeCustomer(session,customerId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic boolean deleteCustomer(Integer id) {\n\n\t\tboolean isDeleted = false;\n\n\t\tfor (Customer customer : customers) {\n\t\t\tif (customer.getId() == id) {\n\t\t\t\tcustomers.remove(customer);\n\t\t\t\tlogger.info(\"Customer @id\" + id + \" is deleted from the list\");\n\t\t\t\tisDeleted = true;\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"Delete done : deleteCustomer.isDeleted = \" + isDeleted);\n\t\treturn isDeleted;\n\t}", "@Override\r\n\tpublic Customer removeCustomer(String custId) {\r\n\r\n\t\tOptional<Customer> optionalCustomer = customerRepository.findById(custId);\r\n\t\tCustomer customer = null;\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\tcustomerRepository.deleteById(custId);\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityDeletionException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }", "@RequestMapping(value = \"/customer-addres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerAddres(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerAddres : {}\", id);\n customerAddresRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerAddres\", id.toString())).build();\n }", "public void delete(Customer customer) {\r\n EntityManagerHelper.beginTransaction();\r\n CUSTOMERDAO.delete(customer);\r\n EntityManagerHelper.commit();\r\n renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()).requestRender();\r\n //renderManager.removeRenderer(renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()));\r\n }", "public static boolean deleteCustomer(int id)\n {\n try {\n Statement statement = DBConnection.getConnection().createStatement();\n String deleteQuery = \"DELETE FROM customers WHERE Customer_ID=\" + id;\n statement.execute(deleteQuery);\n if(statement.getUpdateCount() > 0)\n System.out.println(statement.getUpdateCount() + \" row(s) affected.\");\n else\n System.out.println(\"No changes were made.\");\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n }\n return false;\n }", "private void deletePurchase(CustomerService customerService) throws DBOperationException\n\t{\n\t\tSystem.out.println(\"To delete coupon purchase enter coupon ID\");\n\t\tString idStr = scanner.nextLine();\n\t\tint id;\n\t\ttry\n\t\t{\n\t\t\tid=Integer.parseInt(idStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid id\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// retrieve all coupons of this customer\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tCoupon coupon = null;\n\t\t\n\t\t// find coupon whose purchase to be deleted\n\t\tfor(Coupon tempCoupon : coupons)\n\t\t\tif(tempCoupon.getId() == id)\n\t\t\t{\n\t\t\t\tcoupon = tempCoupon;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t// delete purchase of the coupon\n\t\tif(coupon != null)\n\t\t{\n\t\t\tcustomerService.deletePurchase(coupon);\n\t\t\tSystem.out.println(customerService.getClientMsg());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Customer dors not have coupon with this id\");\n\t}", "@Override\n\t/**\n\t * Removes all Coupons from the Coupon table in the database related to\n\t * Customer ID received\n\t */\n\tpublic void deleteCouponsByCustomerID(int custID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to remove Coupons related to specified\n\t\t\t// Customer ID from the Coupon table via prepared statement\n\t\t\tString deleteCouponsByCustomerIDSQL = \"delete from coupon where id in (select couponid from custcoupon where customerid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(deleteCouponsByCustomerIDSQL);\n\t\t\t// Set Customer ID from variable that method received\n\t\t\tpstmt.setInt(1, custID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint resRemByCust3 = pstmt.executeUpdate();\n\t\t\tif (resRemByCust3 != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupons of specified Customer have been deleted from Coupon table successfully\");\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupons related to\n\t\t\t\t// specified Customer not found in the database\n\t\t\t\tSystem.out.println(\"Coupons removal has been failed - subject entries not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon removal from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupons removal has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "@DeleteMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteCustomer(@PathVariable Long id) {\n\t\tCustomer customer = customerRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Customer not exist with id :\" + id));\n\n\t\tcustomerRepository.delete(customer);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "@GetMapping(\"/cancel/{custId}\")\n\tpublic String customerDelete(@PathVariable Integer custId) {\n\t\tCustomer cust = customerService.getCustomer(custId);\n\t\tSimpleMailMessage mailMessage = new SimpleMailMessage();\n\t\tmailMessage.setTo(cust.getCustomerEmail());\n\t\tmailMessage.setSubject(\"Account Denied\");\n\t\tmailMessage.setFrom(\"balumathi333.com\");\n\t\tmailMessage.setText(\"Document that have submitted is not valid!!!Please try to register with valid Document\");\n\t\temailSenderService.sendEmail(mailMessage);\n\t\tCustomer customer = customerService.deleteCustomer(custId);\n\t\treturn \"redirect:/verifycustomer\";\n\t}", "void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;", "@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = DELETE, value = \"/{id}\")\n\tpublic Mono<ResponseEntity<?>> deleteCustomer(@PathVariable @NotNull ObjectId id) {\n\n\t\tfinal Mono<ResponseEntity<?>> noContent = Mono.just(noContent().build());\n\n\t\treturn repo.existsById(id)\n\t\t\t.filter(Boolean::valueOf) // Delete only if customer exists\n\t\t\t.flatMap(exists -> repo.deleteById(id).then(noContent))\n\t\t\t.switchIfEmpty(noContent);\n\t}", "@Then(\"^user deletes customer \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void user_deletes_customer(String arg1) throws Throwable {\n\t DeleteCustomer delete=new DeleteCustomer();\r\n\t StripeCustomer.response=delete.deleteCustomer(new PropertFileReader().getTempData(arg1));\r\n\t}", "@DeleteMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<?> deleteCustomerDetails(@PathVariable(\"id\") long id) {\n\t\tcustomerService.deleteCustomerDetails(id);\n\t\treturn ResponseEntity.ok().body(\"Customer Details is deleted\");\n\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}", "@DELETE\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public void deleteCc(@PathParam(\"id\") final Long id) {\n service.deleteCc(id);\n }", "public void removeCustomer(){\n String message = \"Choose one of the Customer to remove it\";\n if (printData.checkAndPrintCustomer(message)){\n subChoice = GetChoiceFromUser.getSubChoice(data.numberOfCustomer());\n if (subChoice!=0){\n data.removeCustomer(data.getCustomer(subChoice-1),data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has removed Successfully!\");\n }\n }\n }", "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "CustDataNotesResponseDTO deleteCustDataNotes(String id) throws Exception;", "public void delete(Long cid) {\n\t\tcategoryDao.delete(cid);\n\t}", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@RequestMapping(value = \"/customerOrders/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteCustomerOrder(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerOrder : {}\", id);\n customerOrderRepository.delete(id);\n customerOrderSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerOrder\", id.toString())).build();\n }", "public void remove(Customer c) {\n customers.remove(c);\n\n fireTableDataChanged();\n }", "@Override\n\tpublic String deleteCard(int cid) {\n\t\treturn cb.deleteCard(cid);\n\t}", "public void delete__customers( String qualificationId, final VoidCallback callback){\n\n /**\n Call the onBefore event\n */\n callback.onBefore();\n\n\n //Definging hashMap for data conversion\n Map<String, Object> hashMapObject = new HashMap<>();\n //Now add the arguments...\n \n hashMapObject.put(\"qualificationId\", qualificationId);\n \n\n \n invokeStaticMethod(\"prototype.__delete__customers\", hashMapObject, new Adapter.Callback() {\n @Override\n public void onError(Throwable t) {\n callback.onError(t);\n //Call the finally method..\n callback.onFinally();\n }\n\n @Override\n public void onSuccess(String response) {\n callback.onSuccess();\n //Call the finally method..\n callback.onFinally();\n }\n });\n \n\n\n \n\n \n\n }", "public void removeACustomer(long id) {\r\n\t\tSystem.out.println(\"\\nRemoving the customer: \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tCustomer2 customer = em.find(Customer2.class, id);\r\n\t\tif(customer == null){\r\n\t\t\tSystem.out.println(\"\\nNo such customer with id: \" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nCustomer info: \" + customer);\r\n\t\tem.remove(customer);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "@Override\n\tpublic int deleteCartBycid(int cid) {\n\t\treturn cartDao.deleteCartBycid(cid);\n\t}", "public ResultSet deleteCo(Long cid) throws SQLException {\n\t\trs=DbConnect.getStatement().executeQuery(\"select * from company c,share_details s where c.comp_id=s.comp_id and c.comp_id=\"+cid+\" \");\r\n\t\treturn rs;\r\n\t}", "public boolean deleteCustomer() {\n\t\treturn false;\r\n\t}" ]
[ "0.7833988", "0.7748539", "0.7684891", "0.7674183", "0.7658184", "0.75859", "0.7214295", "0.7203428", "0.7139182", "0.71273625", "0.7123175", "0.71020955", "0.7097021", "0.7086942", "0.70847243", "0.70336723", "0.7027393", "0.70176643", "0.7013956", "0.69675577", "0.6961902", "0.6938796", "0.6914384", "0.69071513", "0.6900677", "0.6890991", "0.6885728", "0.68602604", "0.6847907", "0.6839829", "0.68237686", "0.68199956", "0.68046176", "0.6770947", "0.6759732", "0.67596877", "0.6749637", "0.6737206", "0.67255414", "0.67255414", "0.6724966", "0.67237717", "0.6721034", "0.6687742", "0.6680965", "0.66637945", "0.6651626", "0.66455203", "0.6637908", "0.66325504", "0.6629231", "0.66239023", "0.66186947", "0.66119057", "0.65613085", "0.65529984", "0.6547345", "0.65340525", "0.6518443", "0.65074706", "0.6496232", "0.6494408", "0.6462705", "0.6456983", "0.64534384", "0.6416775", "0.6412004", "0.6412004", "0.6390763", "0.63879526", "0.63850784", "0.63702536", "0.6354911", "0.6354853", "0.6348039", "0.6343591", "0.6341307", "0.633426", "0.6307616", "0.63040304", "0.62952423", "0.6287136", "0.6284785", "0.62676966", "0.62422854", "0.62093794", "0.6195753", "0.6186763", "0.6180942", "0.6171047", "0.613768", "0.6130569", "0.6125148", "0.6082404", "0.6072293", "0.6047162", "0.60378885", "0.602913", "0.60165113", "0.59918827" ]
0.8296107
0
Inserts a new address into the ADDRESS Table:
public void createAddress(Connection connection, Scanner scan) throws SQLException { DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "ADDRESS", null); if (rs.next()){ String sql = "INSERT INTO Address VALUES (?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide hotel address city: "); setCity(scan.nextLine()); pStmt.setString(1, getCity()); System.out.print("Please provide hotel address state: "); setState(scan.nextLine()); pStmt.setString(2, getState()); System.out.print("Please provide hotel address zip: "); setZip(Integer.parseInt(scan.nextLine())); pStmt.setInt(3, getZip()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading ADDRESS Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int insert(Addresses record);", "@Override\r\n\tpublic void insert(Address obj) {\r\n\t\tValidationReturn validation = validator.insert(obj);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\t\r\n\t\tString collumsToInsert = \"street, district, number\";\r\n\t\tString valuesToInsert = \"'\" + obj.getStreet() + \"','\" + obj.getDistrict() + \"',\" + obj.getNumber();\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty()) {\r\n\t\t\tcollumsToInsert += \", note\";\r\n\t\t\tvaluesToInsert += (\",'\" + obj.getNote() + \"'\");\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBCModel.singleCall(\"INSERT INTO address (\" + collumsToInsert + \") VALUES (\" + valuesToInsert + \");\");\r\n\t}", "public int insert(Address address) throws Exception;", "@Override\r\n\tpublic boolean insertAddress(Map<String, String> address) {\n\t\treturn ado.insertAddress(address);\r\n\t}", "@Insert({\n \"insert into t_address (addrid, userid, \",\n \"province, city, \",\n \"region, address, \",\n \"postal, consignee, \",\n \"phone, status, createdate)\",\n \"values (#{addrid,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, \",\n \"#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, \",\n \"#{region,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, \",\n \"#{postal,jdbcType=VARCHAR}, #{consignee,jdbcType=VARCHAR}, \",\n \"#{phone,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP})\"\n })\n int insert(Address record);", "public void addAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO contact_info (`person_id`, `contact_date`, `address_line_1`, `address_line_2`, `city`, `state`, `country`, `zipcode`) values (?, curdate(), ?, ?, ?, ?, ?, ?)\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t //stmt.setDate(2, new java.sql.Date(DateUtility.getDateObj(address.getContactDate()).getTime()));\n\t\t stmt.setString(2, address.getAddress1());\n\t\t stmt.setString(3, address.getAddress2());\n\t\t stmt.setString(4, address.getCity());\n\t\t stmt.setString(5, address.getState());\n\t\t stmt.setString(6, address.getCountry());\n\t\t stmt.setString(7, address.getZip());\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t // Interaction with Other Two Tables \n\t\t addPhoneNumber(address);\n\t\t addEmailAddress(address);\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void saveNewAddress(Address addr) throws BackendException;", "@Override\n\tpublic int addAddress(Address address) {\n\t\treturn sqlSessionTemplate.insert(sqlId(\"addFullAddress\"),address);\n\t}", "int insert(AddressMinBalanceBean record);", "public void addAddress(String Address, Coord coord);", "public void add(AddressEntry addressEntry)\n {\n try{\n Class.forName(\"oracle.jdbc.OracleDriver\");\n Connection conn = DriverManager.getConnection(\"jdbc:oracle:thin\" +\n \":@adcsdb01.csueastbay.edu:1521:mcspdb.ad.csueastbay.edu\"\n , \"MCS1018\", \"y_WrlhyT\");\n // Statement stmt = conn.createStatement();\n\n PreparedStatement stmt = conn.prepareStatement(\"INSERT INTO \" +\n \"ADDRESSENTRYTABLE values(?,?,?,?,?,?,?,?, \" +\n \"default )\");\n stmt.setString(1, addressEntry.name.firstName);\n stmt.setString(2, addressEntry.name.lastName);\n stmt.setString(3, addressEntry.address.street);\n stmt.setString(4, addressEntry.address.city);\n stmt.setString(5, addressEntry.address.state);\n stmt.setInt(6, addressEntry.address.zip);\n stmt.setString(7, addressEntry.phone);\n stmt.setString(8, addressEntry.email);\n stmt.executeUpdate();\n\n conn.close();\n }\n catch(Exception e){System.out.println(e);}\n\n addressEntryList.addElement(addressEntry);\n }", "@Insert({\n \"insert into twshop_address (id, user_id, \",\n \"user_name, tel_number, \",\n \"postal_Code, national_Code, \",\n \"province_Name, city_Name, \",\n \"county_Name, detail_Info, \",\n \"is_default)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, \",\n \"#{userName,jdbcType=VARCHAR}, #{telNumber,jdbcType=VARCHAR}, \",\n \"#{postalCode,jdbcType=VARCHAR}, #{nationalCode,jdbcType=VARCHAR}, \",\n \"#{provinceName,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, \",\n \"#{countyName,jdbcType=VARCHAR}, #{detailInfo,jdbcType=VARCHAR}, \",\n \"#{isDefault,jdbcType=INTEGER})\"\n })\n int insert(Address record);", "public void addAddresses(Addresses address) {\n\t\tif(addressesRepository.findOne(address.getAddress_id())==null)\r\n\t\t\taddressesRepository.save(address);\r\n\t}", "private void linkHotelAddress(Connection connection) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Address VALUES (?, ?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getCity());\n pStmt.setString(4, getState());\n pStmt.setInt(5, getZip());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public void addEmailAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO email_id_info (`person_id`, `email_id`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setString(2,address.getEmailAddress());\n\t\t \n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setEmailAddressId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Emaail Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void addPhoneNumber(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO phone_number_info (`person_id`, `phone_number`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setInt(2,Integer.parseInt(address.getPhoneNumber()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setPhoneNumberId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Phone Number Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Insert(\"INSERT into addresses(id_address, city, zip_code, street, number) VALUES (\" +\n \"#{addressId}, #{city}, #{zip}, #{street}, #{number})\")\n @Options(useGeneratedKeys = true, keyProperty = \"addressId\", keyColumn = \"id_address\")\n void addPatientAddressAsChild(Address address);", "private Integer insertAddress(Connection con, AddressDto addressId) throws SQLException {\n\t\nPreparedStatement ps=\tcon.prepareStatement(SQLQueryConstants.INSERT_ADDRESS,Statement.RETURN_GENERATED_KEYS);\n\tps.setString(1, addressId.getAddress());\n\tps.setInt(2, addressId.getPinCode());\t\nps.setInt(3, addressId.getCityId().getCityId());\n int status =ps.executeUpdate();\nif(status!=0){\nResultSet rs=\tps.getGeneratedKeys();\n\tif(rs.next()){\n\t\treturn rs.getInt(1);\n\t\t\n\t}\n}\nreturn null;\t\n}", "int insertSelective(Addresses record);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability insertNewAddressHistory(int i);", "@Insert({\r\n \"insert into cwv_game_contract_address (contract_address_id, contract_address, \",\r\n \"contract_type, contract_state, \",\r\n \"contract_num, chain_status, \",\r\n \"chain_trans_hash, create_time)\",\r\n \"values (#{contractAddressId,jdbcType=INTEGER}, #{contractAddress,jdbcType=VARCHAR}, \",\r\n \"#{contractType,jdbcType=VARCHAR}, #{contractState,jdbcType=CHAR}, \",\r\n \"#{contractNum,jdbcType=INTEGER}, #{chainStatus,jdbcType=TINYINT}, \",\r\n \"#{chainTransHash,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})\"\r\n })\r\n int insert(CWVGameContractAddress record);", "public static Integer insert(Connection con, Address address) throws SQLException, Exception {\n\n String sql = \"INSERT INTO \"\n + \"address (publicplace_type_id, city_id, publicplace, number, complement, district, zipcode, enabled)\"\n + \" VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )\";\n\n PreparedStatement stmt = null;\n try {\n\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql, new String[]{\"id\"});\n\n //Configures the parameters of the \"PreparedStatement\"\n stmt.setInt(1, address.getPublicPlaceType().getId());\n stmt.setInt(2, address.getCity().getId());\n stmt.setString(3, address.getPublicPlace());\n if (address.getNumber() == null) {\n stmt.setNull(4, Types.INTEGER);\n } else {\n stmt.setInt(4, address.getNumber());\n }\n stmt.setString(5, address.getComplement());\n stmt.setString(6, address.getDistrict());\n stmt.setInt(7, address.getZipcode());\n stmt.setBoolean(8, true);\n\n //Executes the command in the DB\n stmt.executeUpdate();\n ResultSet rs = stmt.getGeneratedKeys();\n if (rs.next()) {\n return rs.getInt(1);\n }\n return null;\n } finally {\n ConnectionUtils.finalize(stmt);\n }\n }", "public static void insertAddressSQL(Connection conn, String customerName, \r\n String address, String address2, String city, String country, \r\n String postalCode, String phone) throws SQLException {\r\n \r\n String insertCustomerStatement = \"INSERT INTO address \"\r\n + \"(addressId, address, address2, cityId, postalCode, phone,\"\r\n + \" createDate, createdBy, lastUpdate, lastUpdateBy)\"\r\n + \"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n \r\n //create prepared statement object\r\n setPreparedStatement(conn, insertCustomerStatement);\r\n \r\n //get prepared statement reference\r\n PreparedStatement ps = getPreparedStatement(); \r\n \r\n //determine date and time\r\n Timestamp currentDate = DateTime.currentDateTime();\r\n \r\n //key-value mapping\r\n ps.setInt(1, addressId);\r\n ps.setString(2, address); \r\n ps.setString(3, address2);\r\n ps.setInt(4, CitySQL.cityId); \r\n ps.setString(5, postalCode);\r\n ps.setString(6, phone);\r\n ps.setTimestamp(7, currentDate);\r\n ps.setString(8, SchedulingDesktopApp.currentUser);\r\n ps.setTimestamp(9, currentDate);\r\n ps.setString(10, SchedulingDesktopApp.currentUser);\r\n \r\n //execute prepared statement\r\n ps.execute();\r\n \r\n //affected rows\r\n rowsAffected();\r\n \r\n }", "int insertSelective(AddressMinBalanceBean record);", "public void insert(String name, String address) {\n ContentValues contentValue = new ContentValues();\n contentValue.put(DatabaseHelper.STUDENT_NAME, name);\n contentValue.put(DatabaseHelper.STUDENT_ADDRESS, address);\n sqLiteDatabase.insert(DatabaseHelper.TABLE_NAME, null, contentValue);\n }", "public void save(Address entity);", "public void insertData(String tableName) {\n //SQL statement\n String query = \"insert into \" + tableName +\n \"(\" +\n \"myName, address) \" +\n \"values ('Michael', 'my adress'), \" +\n \"('Nanna', 'Her adress'), \" +\n \"('Mathias', 'Their adress'), \" +\n \"('Maja', 'Their adress')\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n stmt.executeUpdate(query);\n System.out.println(\"\\n--Data inserted into table \" + tableName + \"--\");\n } catch (SQLException ex) {\n //Handle SQL exceptions\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }", "public Address updateAddress(Address newAddress);", "int insert(Destinations record);", "void insert(VRpDyLocationBh record);", "public void addAddress(String name,String phone,String email,String company,String lover,String child1,String child2){\n\t\t//Refresh the address book\n\t\tthis.loadAddresses();\n\t\t\n\t\tAddress address=null;\n\t\tfor(Iterator<Address> iter=addresses.iterator();iter.hasNext();){\n\t\t\tAddress temp=iter.next();\n\t\t\tif(temp.getName().trim().equals(name.trim())){\n\t\t\t\t//Found the existed address!\n\t\t\t\taddress=temp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (address == null) {\n\t\t\t//Create new address\n\t\t\taddress = new Address(new Date(), name, phone, email, company, lover, child1, child2);\n\t\t\taddresses.add(address);\n\n\t\t\t// Save to database\n\t\t\ttry {\n\t\t\t\torg.hibernate.Session session = sessionFactory.getCurrentSession();\n\t\t\t\tsession.beginTransaction();\n\t\t\t\tsession.save(address);\n\t\t\t\tsession.getTransaction().commit();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Can't save the message to database.\" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\t//Update the address\n\t\t\taddress.setPhone(phone);\n\t\t\taddress.setEmail(email);\n\t\t\taddress.setCompany(company);\n\t\t\taddress.setLover(lover);\n\t\t\taddress.setChild1(child1);\n\t\t\taddress.setChild2(child2);\n\t\t\tthis.updateAddress(address);\n\t\t}\n\t}", "public void addBliingAddress(Hashtable<String, String> data,AppiumActions action) throws Throwable{\n\t\taction.click(topupCardPageAndroid.addressLine1Label, \"addressLine1\");\n\t\taction.sendKeys(topupCardPageAndroid.addressLine1,\"#302459 Block P\", \"addressLine1\");\n\t\taction.click(topupCardPageAndroid.addressLine2Label, \"addressLine2\");\n\t\taction.sendKeys(topupCardPageAndroid.addressLine2,\"Avalon Fremont\", \"addressLine2\");\n\t\taction.click(topupCardPageAndroid.townLabel, \"town\");\n\t\taction.sendKeys(topupCardPageAndroid.town,\"Fremont\", \"town\");\n\t\taction.click(topupCardPageAndroid.countryLabel, \"country\");\n\t\taction.sendKeys(topupCardPageAndroid.country,\"USA\", \"country\");\n\t\taction.click(topupCardPageAndroid.postCodeLabel, \"postCode\");\n\t\taction.sendKeys(topupCardPageAndroid.postCode,\"543953\", \"caexpipostCoderyDaterdNumber\");\n\t\taction.click(topupCardPageAndroid.nextBtn, \"nextBtn\");\n\t\taction.click(topupCardPageAndroid.addCard, \"addCard\");\n\t\taction.click(topupCardPageAndroid.addCard, \"addCard\");\n\t\taction.waitForElementPresent(topupCardPageAndroid.topupCard, \"topupCard\");\n\t\t\n\t}", "@InsertProvider(type=AddressSqlProvider.class, method=\"insertSelective\")\n int insertSelective(Address record);", "public Address createAddress(String address);", "int insert(Location record);", "public void addAddress(Address address) {\n this.addresses.add(address);\n }", "void insert(CusBankAccount record);", "void insert(VRpWkLocationGprsCs record);", "@Override\r\n\tpublic Adress createAdress(Adress adress) {\n\t\tem.persist(adress);\r\n\t\treturn adress;\r\n\t}", "public static void fillUpAddAddress() throws Exception {\n\t\tString fName = Generic.ReadRandomCellData(\"Names\");\n\t\tString lName = Generic.ReadRandomCellData(\"Names\");\n\n\t\tString email = Generic.ReadFromExcel(\"Email\", \"LoginDetails\", 1);\n\t\tString mobileNum = Generic.ReadFromExcel(\"GCashNum\", \"LoginDetails\", 1);\n\t\ttry {\n\n\t\t\tsendKeys(\"CreateAccount\", \"FirstName\", fName);\n\n\t\t\tclickByLocation(\"42,783,1038,954\");\n\t\t\tenterTextByKeyCodeEvent(lName);\n\n//\t\t\tsendKeys(\"CreateAccount\", \"UnitNo\", Generic.ReadFromExcel(\"UnitNo\", \"LoginDetails\", 1));\n//\t\t\tsendKeys(\"CreateAccount\", \"StreetNo\", Generic.ReadFromExcel(\"StreetName\", \"LoginDetails\", 1));\n\t\t\tAddAddress(1);\n\t\t\tThread.sleep(2000);\n\t\t\tsendKeys(\"CreateAccount\", \"Email\", email);\n\t\t\tThread.sleep(2000);\n\t\t\tsendKeys(\"CreateAccount\", \"MobileNumber\", mobileNum);\n\t\t\tControl.takeScreenshot();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void testAddAddresses_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability addNewAddressHistory();", "public void testAddAddress_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "int insert(UcOrderGuestInfo record);", "int insert(Shipping record);", "abstract public Address createAddress(String addr);", "int insert(CityDO record);", "public org.xmlsoap.schemas.wsdl.soap.TAddress addNewAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n return target;\n }\n }", "int insert(Register record);", "public void insert() throws SQLException;", "@Override\r\n\tpublic Address addAddress(Address address, int companyId) {\n\t\treturn getAddressDAO().addAddress(address,companyId);\r\n\t}", "public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }", "void insert(VRpWkProvinceGprsCsBh record);", "public void insert(HProvinceFb record) {\r\n getSqlMapClientTemplate().insert(\"H_PROVINCE_FB.ibatorgenerated_insert\", record);\r\n }", "public void insert(HRouter record) {\r\n getSqlMapClientTemplate().insert(\"H_ROUTER.ibatorgenerated_insert\", record);\r\n }", "public boolean updateAddress(Address newAddress);", "void insert(IrpSignInfo record) throws SQLException;", "void insert(VRpDyCellBh record);", "private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "Address createAddress();", "int insert(SupplierInfo record);", "public boolean addAddress(AddressDTO address) throws RetailerException, ConnectException {\n\t\tboolean addAddressState = address.isAddressStatus();\n\t\tString addressID = address.getAddressId();\n\t\tString retailerID = address.getRetailerId();\n\t\tString city = address.getCity();\n\t\tString state = address.getState();\n\t\tString zip = address.getZip();\n\t\tString buildingNum = address.getBuildingNo();\n\t\tString country = address.getCountry();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tconnection = DbConnection.getInstance().getConnection();\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\tgoProps = PropertiesLoader.loadProperties(GO_PROPERTIES_FILE);\n\n\t\t\tPreparedStatement statement = connection.prepareStatement(QuerryMapper.INSERT_NEW_ADDRESS_IN_ADDRESSDB);\n\t\t\tstatement.setString(1, addressID);\n\t\t\tstatement.setString(2, retailerID);\n\t\t\tstatement.setString(3, city);\n\t\t\tstatement.setString(4, state);\n\t\t\tstatement.setString(5, zip);\n\t\t\tstatement.setString(6, buildingNum);\n\t\t\tstatement.setString(7, country);\n\t\t\tstatement.setBoolean(8, addAddressState);\n\t\t\tint row = statement.executeUpdate();\n\t\t\tif (row == 1)\n\t\t\t\treturn true;\n\t\t} catch (DatabaseException | IOException | SQLException e)// SQLException\n\t\t{\n\t\t\tGoLog.logger.error(exceptionProps.getProperty(EXCEPTION_PROPERTIES_FILE));\n\t\t\tthrow new RetailerException(\".....\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new ConnectException(Constants.connectionError);\n\t\t\t}\n\t\t}\n\n\t\treturn addAddressState;\n\t}", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "void insert(BnesBrowsingHis record) throws SQLException;", "public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void setAddress(String newAddress) {\r\n\t\tthis.address = newAddress;\r\n\t}", "int insert(AlipayInfo record);", "@InsertProvider(type=CWVGameContractAddressSqlProvider.class, method=\"insertSelective\")\r\n int insertSelective(CWVGameContractAddress record);", "int insert(Dress record);", "public @NotNull Address newAddress();", "int insert(BankUserInfo record);", "int insert(BankUserInfo record);", "@Override\n\tpublic void addPIN(PINDTO pin) {\n\t\ttry{\n\t\t\tPreparedStatement stmnt = connection.prepareStatement(\"INSERT INTO TBL_PIN(PIN, URL) VALUES(?, ?)\");\n\t\t\tstmnt.setInt(1, pin.getPIN());\n\t\t\tstmnt.setString(2, pin.getURL());\n\t\t\t\n\t\t\tint n = stmnt.executeUpdate();\n\t\t if (n != 1)//remember to catch the exceptions\n\t\t \t throw new DataAccessException(\"Did not insert one row into database\");\n\t\t } catch (SQLException e) {\n\t\t throw new DataAccessException(\"Unable to execute query; \" + e.getMessage(), e);\n\t\t } finally {\n\t\t if (connection != null) {\n\t\t try {\n\t\t \t connection.close();//and close the connections etc\n\t\t \t\t } catch (SQLException e1) { //if not close properly\n\t\t e1.printStackTrace();\n\t\t }\n\t\t }\n\t\t }\n\t}", "public void testAddAddresses() throws Exception {\r\n try {\r\n this.dao.addAddresses(new Address[]{null}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "void insert(organize_infoBean record);", "public void insert(SymbolTableEntry newEntry) {\n if (table.containsKey(newEntry.getName())) {\n table.remove(newEntry.getName());\n }\n table.put(newEntry.getName(), newEntry);\n }", "void insert(OrderPreferential record) throws SQLException;", "int insert(Cargo record);", "public boolean addVendorAddress(VendorAddress vaddress);", "int insert(ClOrderInfo record);", "public void addNewRecord(String name, String street, int building, int apartment) {\n if (name == null || street == null)\n throw new NullPointerException();\n if (!addressBook.containsKey(name)) {\n Address address = new Address(street, building, apartment);\n addressBook.put(name, address);\n }\n }", "public void insert(Contact c);", "int insert(SvcStoreBeacon record);", "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "int insert(HotelType record);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription insertNewControlPersons(int i);", "int insert(DepAcctDO record);", "public void insertNewUser(String username, String password, String emailAddress) {\r\n\t\tConnection c = getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ptsmt = (PreparedStatement)c.prepareStatement(\"INSERT INTO user(userName, password, emailAddress) VALUES (?, ?, ?)\");\r\n\t\t\tptsmt.setString(1, username );\r\n\t\t\tptsmt.setString(2,password );\r\n\t\t\tptsmt.setString(3, emailAddress);\r\n\t\t\tptsmt.execute();\r\n\t\t\t\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "void addHasAddress(String newHasAddress);", "public static void insertDemoData() throws SQLException\n {\n insertAccount(new Account(0, \"John Doe\", \"Marvin Gardens\", false));\n insertAccount(new Account(0, \"Robert Roe\", \"Louisiana Avenue\", false));\n }", "void insert(VRpMnCellHoBhIbc record);", "int insert(Assist_table record);", "int insert(Account record);", "int insert(Account record);", "public void insert(Deptpk record) throws SQLException {\r\n sqlMapClient.insert(\"SCOTT_DEPTPK.abatorgenerated_insert\", record);\r\n }", "public void add() {\n\t\ttry (RandomAccessFile raf = new RandomAccessFile(\"Address.dat\", \"rw\")) // Create RandomAccessFile object\n\t\t{\n\t\t\traf.seek(raf.length()); // find index in raf file\n\t\t\t // # 0 -> start from 0\n\t\t\t // # 1 -> start from 93 (32 + 32 + 20 + 2 + 5 + '\\n')\n\t\t\t // # 2 -> start from 186 (32 + 32 + 20 + 2 + 5 + '\\n') * 2\n\t\t\t // # 3 -> start from 279 (32 + 32 + 20 + 2 + 5 + '\\n') * 3\n\t\t \twrite(raf); // store the contact information at the above position\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IndexOutOfBoundsException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "void insert(XdSpxx record);", "int insert(AccuseInfo record);", "public void insert()\n\t{\n\t}" ]
[ "0.7441676", "0.73260295", "0.71899736", "0.71583766", "0.7053349", "0.7013041", "0.69407743", "0.68492764", "0.678779", "0.66488975", "0.65806675", "0.65671307", "0.65604", "0.6549315", "0.6489351", "0.6488821", "0.6479087", "0.63595545", "0.6339409", "0.6252933", "0.62398684", "0.6217803", "0.61634105", "0.6120723", "0.6096788", "0.6086081", "0.608411", "0.60472375", "0.60454327", "0.6010523", "0.60087824", "0.59977764", "0.599727", "0.5982785", "0.59814954", "0.5975797", "0.59559155", "0.59478843", "0.59413886", "0.5919432", "0.59032434", "0.590076", "0.5883586", "0.5865215", "0.58535653", "0.5834361", "0.5813359", "0.5812037", "0.5806082", "0.5800313", "0.5798179", "0.57966995", "0.57791805", "0.57703763", "0.5761634", "0.57602644", "0.57320863", "0.57236093", "0.570183", "0.56968004", "0.56943184", "0.56919706", "0.56876016", "0.5681145", "0.5679688", "0.56688046", "0.56611294", "0.5644991", "0.5642572", "0.5642564", "0.5636495", "0.56333554", "0.56333554", "0.5629904", "0.56297386", "0.5627319", "0.5619115", "0.56180114", "0.56165206", "0.56073666", "0.5601563", "0.55907077", "0.5589895", "0.55889976", "0.5588988", "0.5587646", "0.55868983", "0.55863035", "0.5582931", "0.55755013", "0.5573228", "0.5566428", "0.55659324", "0.55625254", "0.55625254", "0.5553843", "0.5543213", "0.5540955", "0.5539845", "0.5530097" ]
0.6559248
13
Inserts a new hotel into the HOTEL Table, updating ADDRESS and HOTEL_ADDRESS appropriately:
public void createHotel(Connection connection) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs1 = dmd.getTables(null, null, "HOTEL", null); ResultSet rs2 = dmd.getTables(null, null, "HOTEL_ADDRESS", null); // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding: if (rs1.next() && rs2.next()){ createAddress(connection, scan); // Creates an address to link HOTEL with ADDRESS String sql = "INSERT INTO Hotel VALUES (?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a hotel name: "); setHotelName(scan.nextLine()); pStmt.setString(1, getHotelName()); System.out.print("Please provide a branch ID: "); setBranchID(Integer.parseInt(scan.nextLine())); pStmt.setInt(2, getBranchID()); System.out.print("Please provide a phone number: "); setPhone(scan.nextLine()); pStmt.setString(3, getPhone()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs1.close(); rs2.close(); } linkHotelAddress(connection); // Links HOTEL with ADDRESS entities in HOTEL_ADDRESS relation do { createRoom(connection, scan); System.out.println("Would you like to add another room type to this hotel (Y, N): "); } while ((String.valueOf(scan.next())).toUpperCase().equals("Y")); } else { System.out.println("ERROR: Error loading HOTEL or HOTEL_ADDRESS Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void linkHotelAddress(Connection connection) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Address VALUES (?, ?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getCity());\n pStmt.setString(4, getState());\n pStmt.setInt(5, getZip());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public void persistHotel(Hotel hotel) throws SQLException{\n\t\tPlace place = new Place(hotel.getName(), hotel.getCoord(), hotel.getDescriptionFile());\n\t\tpersistPlace(place);\n\t\tpersistPlace(hotel.getBeach());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString readBeachPKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertHotelQuery = \"INSERT INTO Hotel (id_place, pricePerDay, id_beach) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place part and the beach\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, place.getName());\n\t\tpreparedStatement.setString(2, place.getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\t\t\n\t\tpreparedStatement = conn.prepareStatement(readBeachPKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, hotel.getBeach().getName());\n\t\tpreparedStatement.setString(2, hotel.getBeach().getDescriptionFile());\n\t\t\n\t\tresult = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint beachPK = result.getInt(\"id\");\n\n\t\t//Set place in the database\n\t\tpreparedStatement = conn.prepareStatement(insertHotelQuery);\n\t\t\n\t\tpreparedStatement.setInt(1, placePK);\n\t\tpreparedStatement.setFloat(2, hotel.getPricePerDay());\n\t\tpreparedStatement.setInt(3, beachPK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t\t\n\t}", "Hotel saveHotel(Hotel hotel);", "public com.Hotel.model.Hotel create(long hotelId);", "int insert(HotelType record);", "int insert(SrHotelRoomInfo record);", "public void addHotel(String hotelId, String hotelName, String city, String state, String streetAddress, double lat,\n\t\t\tdouble lon, String country) {\n\t\tlock.lockWrite();\n\t\ttry{\n\t\t\tif(hotelMap.get(hotelId) == null){\n\t\t\t\tAddress address = new Address(streetAddress, city, state, lat, lon);\n\t\t\t\tHotel hotel = new Hotel(hotelId, hotelName, address, country, lat, lon);\n\t\t\t\t\n\t\t\t\t//put the hotel information into the hotelMap.\n\t\t\t\thotelMap.put(hotelId, hotel);\n\t\t\t}\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockWrite();\n\t\t}\n\t}", "public void createAddress(Connection connection, Scanner scan) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"ADDRESS\", null);\n\n if (rs.next()){\n\n String sql = \"INSERT INTO Address VALUES (?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide hotel address city: \");\n setCity(scan.nextLine());\n pStmt.setString(1, getCity());\n\n System.out.print(\"Please provide hotel address state: \");\n setState(scan.nextLine());\n pStmt.setString(2, getState());\n\n System.out.print(\"Please provide hotel address zip: \");\n setZip(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(3, getZip());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading ADDRESS Table.\");\n }\n }", "int insertSelective(HotelType record);", "public void insert(final Trip t) throws SQLException {\n long v;\n if(t.hasVehicle()) {\n v = t.getVehicle();\n if(v > vehicle) {\n vehicle = v + 1;\n }\n } else {\n v = vehicle++;\n }\n stmt.setLong(1, t.getPickupTime());\n stmt.setLong(2, v);\n stmt.setLong(3, t.getDropoffTime());\n stmt.setDouble(4, t.getPickupLat());\n stmt.setDouble(5, t.getPickupLon());\n stmt.setDouble(6, t.getDropoffLat());\n stmt.setDouble(7, t.getDropoffLon());\n stmt.executeUpdate();\n }", "private void linkHotelRoom(Connection connection, Scanner scan) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Rooms VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please enter the number of \" + getType() + \"s the hotel has: \");\n setQuantity(scan.nextInt());\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getType());\n pStmt.setInt(4, getQuantity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public static void AddLocation(Location location){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT City, AirportCode from Location\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateString(\"City\", location.getCity());\n resultSet.updateString(\"AirportCode\", location.getAirportCode());\n resultSet.insertRow();\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n }", "@PostMapping(value=\"/insert/hotel\", consumes=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseClient insertNewRoom(@RequestBody Hotel hotel){\r\n\t\thotelSer.save(hotel);\r\n\t\tResponseClient res = new ResponseClient();\r\n\t\tres.setResponse(\"successfull hotel_id: \");\r\n\t\treturn res;\r\n\t}", "public void updateHotelPhone(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Hotel SET phone = ? WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new phone number: \");\n setPhone(scan.nextLine());\n pStmt.setString(1, getPhone());\n\n setHotelName(hotel_name);\n pStmt.setString(2, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(3, getBranchID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "public void addNewPassenger() throws SQLException {\n\t\tScanner input = new Scanner(System.in);\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = connUtil.getConnection();\n\t\t\t// call needed DAOs here\n\t\t\tPassengerDAO pdao = new PassengerDAO(conn);\n\t\t\tFlightDAO fdao = new FlightDAO(conn);\n\t\t\tRouteDAO rdao = new RouteDAO(conn);\n\t\t\tAirportDAO apodao = new AirportDAO(conn);\n\t\t\tAirplaneDAO apldao = new AirplaneDAO(conn);\n\n\t\t\tPassenger passenger = new Passenger();\n\t\t\tpassenger.setId(pdao.nextAvailableId());\n\t\t\tpassenger.setBookingId(1);\n\n\t\t\t// Sets passenger name\n\t\t\tSystem.out.println(\"Enter the passenger given name\");\n\t\t\tpassenger.setGivenName(input.nextLine());\n\t\t\tSystem.out.println(\"Enter the passenger family name\");\n\t\t\tpassenger.setFamilyName(input.nextLine());\n\n\t\t\t// Sets birthday\n\t\t\tSystem.out.println(\"Enter DOB (yyyy-mm-dd)\");\n\t\t\tDate date = Date.valueOf(input.nextLine());\n\t\t\tpassenger.setDob(date);\n\n\t\t\t// Sets gender\n\t\t\tSystem.out.println(\"Enter gender (male/female/other)\");\n\t\t\tpassenger.setGender(input.nextLine());\n\n\t\t\t// Sets address\n\t\t\tSystem.out.println(\"Enter the address of the passenger\");\n\t\t\tpassenger.setAddress(input.nextLine());\n\n\t\t\t// Adds passenger to passenger table\n\t\t\tpdao.addPassenger(passenger);\n\n\t\t\tconn.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tconn.rollback();\n\t\t} finally {\n\t\t\tconn.close();\n\t\t}\n\t}", "int insertSelective(SrHotelRoomInfo record);", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "public boolean AddToDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t \n\t //add info to database\n\t\t\tString query = \"INSERT INTO Housing(name, address, phone_number, year_built, price, housing_uid, \"\n\t\t\t\t\t+ \"max_residents, catagory) \"\n\t\t\t\t\t+ \"VALUES('\"+name+\"', '\"+address+\"', '\"+phoneNumber+\"', '\"+yearBuilt+\"', '\"+price+\"', \"\n\t\t\t\t\t+ \"'\"+uid+\"', '\"+maxResidents+\"', '\"+catagory+\"')\"; \n\t\t\t\n\t\t\tint insertResult = con.stmt.executeUpdate(query);\n\t\t\tif(insertResult > 0)\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing added to database.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println (\"Housing NOT added to database.\");\n\t\t\t}\n\t\t\t\n\t\t\t//get housing id\n\t\t\tquery = \"SELECT h_id FROM Housing WHERE name ='\"+name+\"' AND address ='\"+address+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\thid = rs.getInt(\"h_id\"); \n\t\t\t}\n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\t\n\t\t\t//set up keywords\n\t\t\tif (keywords.size() > 0)\n\t\t\t{\n\t\t\t\tAddKeywords(); \n\t\t\t}\n\t\t\t\n\t\t\tif(openDates.size() > 0)\n\t\t\t{\n\t\t\t\tAddAvailableDates(); \n\t\t\t}\n\t\t\t\n\t\t\treturn true; \n\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void createHotel(String name, int numberSingleRooms,int numberDoubleRooms, double priceSingleRooms,\r\n\t\t\tdouble priceDoubleRooms, int category, UUID userID, int postalCode, String adress) {\r\n\t\tif(session instanceof Hotelier) {\t\t// nur erlaubt für Hoteliers\r\n\t\t\tHotel hotel=new Hotel(name, numberSingleRooms, numberDoubleRooms, priceSingleRooms, \r\n\t\t\t\t\tpriceDoubleRooms, category, userID, postalCode, adress);\r\n\t\t\tfor (int i=0;i<numberDoubleRooms;i++) {\t\t\t// erstelllt und speichert die Zimmer des Hotels (param: HotelID, RoomType, bookedDates)\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),0, new ArrayList <DateTime>());\r\n\t\t\t}\r\n\t\t\tfor (int i=0;i<numberSingleRooms;i++) {\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),1, new ArrayList <DateTime>());\r\n\t\t\t}\t\t\r\n\t\t\thotelDAO.saveHotel(hotel);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnew IllegalArgumentException(\"Die Aktion 'createHotel' kann nur von einem Hotelier durchgeführt werden.\");\r\n\t\t}\r\n\t}", "public void insertBooking(Booking booking) throws SQLException, Exception;", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "@POST\r\n\t\t@Path(\"/hotel\")\r\n\t\t@Consumes({ MediaType.APPLICATION_JSON })\r\n\t\t@Produces({ MediaType.APPLICATION_JSON })\r\n\t\tpublic Response postHotel(Hotel hotel) {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tAlohaTransactionManager tm = new AlohaTransactionManager(getPath());\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttm.addHotel(hotel);\r\n\t\t\t\t\r\n\t\t\t\treturn Response.status(200).entity(hotel).build();\r\n\t\t\t} \r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\r\n\t\t\t}\r\n\t\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability insertNewAddressHistory(int i);", "public void insert() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { myData.record.save(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n\tpublic void insertOrUpdate(String mac) {\n\t\tDgSeatDoorinfo src = new DgSeatDoorinfo();\n\t\tsrc.setMac(mac);\n\t\tint count = dgSeatDoorinfoMapper.getCount(src);\n\t\tif (count == 0) {\n\t\t\tdgSeatDoorinfoMapper.insert(src);\n\t\t}\n\t}", "@Override\n\tpublic HotelBooking bookRoom(HotelForm hotelForm, Session session) throws HibernateException, Exception{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tHotelBooking hotelBooking = setDAOValues(hotelForm);\n\t\tsession.save(hotelBooking);\n\t\t\n\t\treturn null;\n\t}", "public Boat insertBoat(Boat boat);", "@Override\r\n\tpublic void insert(Address obj) {\r\n\t\tValidationReturn validation = validator.insert(obj);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\t\r\n\t\tString collumsToInsert = \"street, district, number\";\r\n\t\tString valuesToInsert = \"'\" + obj.getStreet() + \"','\" + obj.getDistrict() + \"',\" + obj.getNumber();\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty()) {\r\n\t\t\tcollumsToInsert += \", note\";\r\n\t\t\tvaluesToInsert += (\",'\" + obj.getNote() + \"'\");\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBCModel.singleCall(\"INSERT INTO address (\" + collumsToInsert + \") VALUES (\" + valuesToInsert + \");\");\r\n\t}", "void insert(VRpDyLocationBh record);", "public void addOrUpdateFlight(Flight flight) {\r\n // Add all values to mapped to their associated column name\r\n ContentValues value = new ContentValues();\r\n value.put(\"flightNumber\", flight.getFlightNumber());\r\n value.put(\"airline\", flight.getAirline());\r\n value.put(\"cost\", String.valueOf(flight.getCost()));\r\n value.put(\"departureDate\",\r\n new SimpleDateFormat(\"yyyy-MM-dd kk:mm\").format(flight.getDepartureDate()));\r\n value.put(\"arrivalDate\",\r\n new SimpleDateFormat(\"yyyy-MM-dd kk:mm\").format(flight.getArrivalDate()));\r\n value.put(\"origin\", flight.getOrigin());\r\n value.put(\"destination\", flight.getDestination());\r\n value.put(\"numSeats\", flight.getNumSeats());\r\n // Add a new row to the database if not already added. Else, update that row\r\n // with given Flight\r\n // info.\r\n sqlExecutor.updateOrAddRecords(\"flights\", value);\r\n }", "void insertFlightseat(AirFlightseat dRef);", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "int insert(Location record);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\r\n this.hotelId = hotelId;\r\n }", "@Insert\n boolean upsertLocation(SpacecraftLocationOverTime reading);", "int insert(Addresses record);", "public boolean addOrUpdateHotel(String name, String ip, String port, String capacity){\n boolean result = false;\n try {\n Hotel hotel = new Hotel();\n hotel.setName(name);\n hotel.setIp(ip);\n hotel.setPort(Integer.parseInt(port));\n hotel.setCapacity(Integer.parseInt(capacity));\n result = databaseManager.addOrUpdateHotel(hotel);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "@Override\n\tpublic void insertIntoSupplier(Supplier supplier) {\n\t\tString sql=\"INSERT INTO supplier \"+\" (supplier_id, supplier_name, supplier_type, permanent_address, temporary_address, email ,image) SELECT ?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierId(), supplier.getSupplierName(), supplier.getSupplierType(), supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail() ,supplier.getImage()});\n\t}", "@Insert\n boolean upsertTemperature(SpacecraftTemperatureOverTime reading);", "public void save(int reservationID, int customerId,String airline, int flightNumber, int HotelId, int carId,\n\t\t\tint numberOfReservedRooms, int numberOfReservedSuites, int numberOfReservedCars, int numberOfreservedSeats,\n\t\t\tint numNightsPerRooms, int numberNightPerSuites, int numDaysPerCars, int numSeats)\n\t\n\t{\n\t}", "void insert(VRpWkLocationGprsCs record);", "int insert(AddressMinBalanceBean record);", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "@Override\n\tpublic void insertOneHourAdServing(OneHourAdServingPojo oneHourAdServingPojo) {\n\n\t\tString sql = \"INSERT INTO onehouradserving VALUES(?,?,?,?,?,?,?)\";\n\n\t\tObject[] params = new Object[] { oneHourAdServingPojo.getLog_date(), oneHourAdServingPojo.getLog_hour(),\n\t\t\t\toneHourAdServingPojo.getAd_id(), oneHourAdServingPojo.getAd_name(),\n\t\t\t\toneHourAdServingPojo.getAdvertiser_id(), oneHourAdServingPojo.getClick_count(),\n\t\t\t\toneHourAdServingPojo.getExpose_count() };\n\n\t\tjdbcHelper.executeUpdate(sql, params);\n\n\t}", "public void insertOffer(Offer o);", "int insert(Shipping record);", "public static void AddFlight(Flight flight){\n\n //java.sql.Date sqlDate = new java.sql.Date(flight.getDatetime());\n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM flight\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateString(\"FlightNumber\", flight.getFlightNumber());\n resultSet.updateString(\"DepartureAirport\", flight.getDepartureAirport());\n resultSet.updateString(\"DestinationAirport\", flight.getDestinationAirport());\n resultSet.updateDouble(\"Price\", flight.getPrice());\n\n //Ask Andrew\n// java.sql.Date sqlDate = new java.sql.Date();\n// resultSet.updateDate(\"datetime\", flight.getDatetime());\n resultSet.updateString(\"Plane\", flight.getPlane());\n resultSet.updateInt(\"SeatsTaken\", flight.getSeatsTaken());\n \n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n }", "@Override\n\tpublic int addNewEmployee(String firstName, String lastName, String email, String designation, String location,\n\t\t\tint salary) {\n\t\treturn template.update(\n\t\t\t\t\"insert into employee(fname, lname, email, desig, location, salary) values(?, ?, ?, ?, ?, ?)\",\n\t\t\t\tfirstName, lastName, email, designation, location, salary);\n\t}", "int updateByPrimaryKey(HotelType record);", "private void createRoom(Connection connection, Scanner scan) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"ROOM\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ROOMS\", null);\n\n if (rs1.next() && rs2.next()){\n\n String sql = \"INSERT INTO Room VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n\n System.out.print(\"Please provide the room type a name: \");\n setType(scan.nextLine());\n pStmt.setString(3, getType());\n\n System.out.print(\"Please provide a guest capacity for this type: \"); // branch id, room type, capacity\n setCapacity(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(4, getCapacity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelRoom(connection, scan);\n }\n else {\n System.out.println(\"ERROR: Error loading ROOM or HOTEL_ROOMS Table.\");\n }\n }", "@Override\n\tpublic void AddLid(LidPOJO lid) throws Exception {\n try {\n \tConnection connect = getConnection();\n\n\n preparedStatement = connect.prepareStatement(\"INSERT INTO Leden(Naam, Achternaam, Leeftijd, teamcode, password) VALUES(?, ?, ?, ?, ?)\");\n preparedStatement.setString(1, lid.getNaam());\n preparedStatement.setString(2, lid.getAchternaam());\n preparedStatement.setInt(3, lid.getLeeftijd());\n preparedStatement.setInt(4, lid.getTeamcode());\n preparedStatement.setString(5, lid.getPasw());\n\n\n\n\n preparedStatement.executeUpdate();\n connect.close();\n\n\n } catch (Exception e) {\n throw e;\n } finally {\n \tif (resultSet != null) {\n resultSet.close();\n }\n\n if (statement != null) {\n statement.close();\n } }\n\n }", "public void insert(Spot spot) { mRepository.insert(spot); }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability addNewAddressHistory();", "@SuppressWarnings(\"unused\")\n\tprivate void insert(Ball ball) throws Exception {\n\t\tBallService ballService = new BallService();\n\t\tballService.insert(ball);\n\t}", "void insertLocation(Location location) {\n WeatherAppRoomDatabase.databaseWriteExecutor.execute(() -> mLocationDao.insertLocation(location));\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "private void addSeatToDatabase(Seat seat) throws SQLException {\n\n\t\tseatdb.storeToDatabase(seat);\n\t}", "@PostMapping\n public ResponseEntity<HotelResource> saveHotel(@RequestBody Hotel hotel){\n return new ResponseEntity<>(\n hotelService.saveHotel(hotel), HttpStatus.CREATED\n );\n }", "public HashMap<Integer, Hotel> updateHotel(Hotel oldHotel, Hotel newHotel) {\n deleteHotel(oldHotel);\n addHotel(newHotel);\n return hotels;\n }", "public int create(TbTravelerInfo tbTravelerInfo) {\n\t\tString sql = \"INSERT INTO tbTravelerInfo(intBillId,strTravelerName,strSex,strBirthday,strCountry,strIndentyNumber) VALUES(?,?,?,?,?,?)\" ;\n\t\tObject[] objs = {\n\t\t\t\ttbTravelerInfo.getIntBillId(),\n\t\t\t\ttbTravelerInfo.getStrTravelerName(),\n\t\t\t\ttbTravelerInfo.getStrSex(),\n\t\t\t\ttbTravelerInfo.getStrBirthday(),\n\t\t\t\ttbTravelerInfo.getStrCountry(),\n\t\t\t\ttbTravelerInfo.getStrIndentyNumber()\n\t\t} ;\n\t\treturn super.jdbcTemplate.update(sql, objs);\n\t}", "void insertOrUpdate(StockList stockList) throws Exception;", "public HashMap<Integer, Hotel> addHotel(Hotel hotel) {\n hotels.put(hotel.getId(), hotel);\n return hotels;\n }", "public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}", "public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }", "public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "Reservierung insert(Reservierung reservierung) throws ReservierungException;", "public void insertNewVehicle(ShopGood vehicle) throws SQLException {\n int type = 0;\n String ability = new String();\n if(vehicle.getName().contains(\"Freezer\")) type = 1;\n if(vehicle.getName().contains(\"Fuel\")) type = 2;\n if(vehicle.getName().contains(\"Chemical\")) type = 3;\n if(vehicle.getName().contains(\"Pallet\")) type = 4;\n if(vehicle.getName().contains(\"Super\")) type = 5;\n double speed = 1;\n //if(vehicle.getName().contains(\"Truck\")) speed = 1;\n if(vehicle.getName().contains(\"Ship\")) speed = 0.5;\n if(vehicle.getName().contains(\"Plane\")) speed = 2;\n if (type == 5) speed++;\n\n String query = \"INSERT INTO `vehicles`(`name`, `type`, `speed`) VALUES (\\\"\"+vehicle.getName()+\"\\\", \\\"\"+type+\"\\\", \\\"\"+speed+\"\\\")\";\n st.executeUpdate(query);\n }", "@Override\n\tpublic int addBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.insert(\"bookshelfinfo.add\", bookshelfinfoEntity);\n\t}", "@Override\n @Transactional\n public HotelResponseDTO createHotel(AddHotelRequestDTO addHotelRequest) {\n Hotel hotel = new Hotel();\n String generatedHotelId = CommonUtil.getGeneratedId();\n hotel.setHotelId(generatedHotelId);\n hotel.setName(addHotelRequest.getName());\n hotel.setDescription(addHotelRequest.getDescription());\n hotel.setLocation(addHotelRequest.getLocation());\n hotel.setDefaultCheckInTime(addHotelRequest.getDefaultCheckInTime());\n hotel.setDefaultCheckOutTime(addHotelRequest.getDefaultCheckOutTime());\n if (addHotelRequest.getFacilities() != null) {\n hotel.setFacilities(String.join(\",\", addHotelRequest.getFacilities()));\n }\n hotel.setDeleted(false);\n Date createdDate = new Date();\n hotel.setCreatedDate(createdDate);\n hotel.setLastModifiedDate(createdDate);\n hotelRepository.save(hotel);\n\n List<AddRoomRequestDTO> roomRequests = addHotelRequest.getRooms();\n if (roomRequests != null && roomRequests.size() > 0) {\n List<Room> rooms = roomRequests.stream().map(roomRequest -> {\n Room room = new Room();\n String generatedRoomId = CommonUtil.getGeneratedId();\n room.setRoomId(generatedRoomId);\n RoomType roomType = RoomType.fromCode(roomRequest.getRoomType());\n room.setRoomType(roomType);\n BedType bedType = BedType.fromCode(roomRequest.getBedType());\n room.setBedType(bedType);\n room.setNumberOfAdults(roomRequest.getNumberOfAdults());\n room.setNumberOfChildren(roomRequest.getNumberOfChildren());\n room.setBasicFare(roomRequest.getBasicFare());\n room.setTaxPercentage(roomRequest.getTaxPercentage());\n if (roomRequest.getFacilities() != null) {\n room.setFacilities(String.join(\",\", roomRequest.getFacilities()));\n }\n room.setCreatedDate(createdDate);\n room.setLastModifiedDate(createdDate);\n room.setDeleted(false);\n room.setHotel(hotel);\n return room;\n }).collect(Collectors.toList());\n roomRepository.saveAll(rooms);\n hotel.setRooms(rooms);\n }\n logger.info(\"Created hotel information successfully | hotelId:{}\", generatedHotelId);\n return makeHotelResponseDTO(hotel);\n }", "public void insertMatch(Match match) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date mDate = new java.sql.Date(match.getDate().getTime());\n\t\t\tString insertMatch_sql = \"INSERT INTO \" + match_table + \" (id, idHome, idAway, matchDate, referee)\"\n\t\t\t\t\t+ \"VALUES (NULL, '\" + getTeamId(match.getTeamHome()) + \"' , '\" + getTeamId(match.getTeamAway())\n\t\t\t\t\t+ \"' , '\" + mDate + \"' , '\" + match.getReferee() + \"')\";\n\t\t\tstatement.executeUpdate(insertMatch_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This team is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void save(HotelVendorEntity entity) {\n\t\tSystem.out.println(\"invoked save\"+entity);\r\n\t\tSystem.out.println(\"saved in database\");\r\n\t\t\r\n\t\tConfiguration cfg=new Configuration();\r\n\t\tcfg.configure();\r\n\t\tSessionFactory factory=cfg.buildSessionFactory();\r\n\t\tSession session=factory.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\tsession.save(entity);\r\n\t\tsession.getTransaction().commit();\r\n\t\tsession.close();\r\n\t\tfactory.close();\r\n\t\t\r\n\t}", "int insert(SupplierInfo record);", "@Override\n @Transactional(rollbackFor = { BranchServiceException.class, SQLException.class })\n public long insert(String enterpriseId, String name, String address, String latitude, String longitude, String telephone) throws BranchServiceException, SQLException {\n checker.rejectIfNullOrEmpty(enterpriseId, new BranchServiceException(EMPTY_ENTERPRISE_ID));\n checker.rejectIfNullOrEmpty(name, new BranchServiceException(EMPTY_NAME));\n checker.rejectIfNullOrEmpty(address, new BranchServiceException(EMPTY_ADDRESS));\n checker.rejectIfNullOrEmpty(latitude, new BranchServiceException(EMPTY_LATITUDE));\n checker.rejectIfNullOrEmpty(longitude, new BranchServiceException(EMPTY_LONGITUDE));\n checker.rejectIfNullOrEmpty(telephone, new BranchServiceException(EMPTY_TELEPHONE));\n\n long enterpriseIdLong = checker.parseUnsignedLong(enterpriseId, new BranchServiceException(INVALID_ENTERPRISE_ID));\n checker.rejectTelephoneIfInvalid(telephone, new BranchServiceException(INVALID_TELEPHONE));\n BigDecimal latitudeBd = checker.parseBigDecimal(latitude, new BranchServiceException(INVALID_LATITUDE));\n BigDecimal longitudeBd = checker.parseBigDecimal(longitude, new BranchServiceException(INVALID_LONGITUDE));\n\n // Check if the enterprise exists\n boolean isExisting = enterpriseRepo.isCached(enterpriseIdLong) || enterpriseDao.checkExistenceById(enterpriseIdLong);\n if (!isExisting)\n throw new BranchServiceException(ENTERPRISE_NOT_EXISTING);\n\n // Insert\n Branch branch = new Branch();\n branch.setEnterpriseId(enterpriseIdLong);\n branch.setName(name);\n branch.setAddress(address);\n branch.setLatitude(latitudeBd);\n branch.setLongitude(longitudeBd);\n branch.setTelephone(telephone);\n branchDao.insert(branch);\n\n // Fetch the last ID\n long lastId = generalDao.getLastInsertId();\n\n // Redis: cache the branch\n branch.setBranchId(lastId);\n branchRepo.saveBranch(branch);\n return lastId;\n\n }", "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public int insert(){\n\t\tif (jdbcTemplate==null) createJdbcTemplate();\n\t\t jdbcTemplate.update(insertStatement, ticketId,locationNumber);\n\t\treturn ticketId;\n\t}", "int insert(UcOrderGuestInfo record);", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public void addLocationInfo(locationInfo alocationInfo)\n {\n ContentValues values= new ContentValues();\n values.put(COL_place, alocationInfo.getPlace());\n values.put(COL_URL, alocationInfo.getUrl());\n\n SQLiteDatabase db = this.getWritableDatabase();\n\n db.insert(TBL_locations, null, values);\n db.close();\n }", "Home saveOrUpdateHome(Home home);", "public static void addNewHouse() {\n Services house = new House();\n house = addNewService(house);\n\n ((House) house).setRoomType(FuncValidation.getValidName(ENTER_ROOM_TYPE,INVALID_NAME));\n\n ((House) house).setFacilities(FuncValidation.getValidName(ENTER_FACILITIIES,INVALID_NAME));\n\n ((House) house).setNumberOfFloor(FuncValidation.getValidIntegerNumber(ENTER_NUMBER_OF_FLOOR,INVALID_NUMBER_OF_FLOOR,0));\n\n //Get list house from CSV\n ArrayList<House> houseList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.HOUSE);\n\n //Add house to list\n houseList.add((House) house);\n\n //Write house list to CSV\n FuncReadWriteCSV.writeHouseToFileCSV(houseList);\n System.out.println(\"----House \"+house.getNameOfService()+\" added to list---- \");\n addNewServices();\n }", "public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }", "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "public void insertPokemon(Pokemon p) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(p);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}", "public static void insert(Allergy iAllergy, Context iContext) throws MapperException\n {\n try\n {\n \n ArrayList<String> values = new ArrayList<String>(10);\n values.add(iAllergy.getID().toString());\n values.add(String.valueOf(iAllergy.getAllergic()));\n values.add(String.valueOf(iAllergy.getReaction()));\n values.add(String.valueOf(iAllergy.getSeverity()));\n\n AllergiesTDG.insert(values, iContext);\n } \n catch (PersistenceException e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation because the persistence \"\n + \"layer returned the following error: \"\n + e.getMessage());\n } \n catch (Exception e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation for the following \"\n + \"unforeseen reason: \"\n + e.getMessage());\n }\n }", "public static boolean insert(location l) {\n blueharvest.geocaching.webservices.location.Location m\n = new blueharvest.geocaching.webservices.location.Location();\n m.setLatitude(l.getLatitude().getDecimalDegrees());\n m.setLongitude(l.getLongitude().getDecimalDegrees());\n m.setAltitude(l.getAltitude());\n return insertLocation(m);\n }", "@Override\n public void addHotelToOrganization(HotelTO hotelTO, Organization organization) throws InsufficientPrivilegeException {\n Hotel newHotel = new Hotel();\n newHotel.setHotelName(hotelTO.getHotelName());\n newHotel.setOrganizationID(organization.getId());\n\n // Create the contact object.\n Contact contact = new Contact();\n contact.setAddressLine1(hotelTO.getAddressLine1());\n contact.setAddressLine2(hotelTO.getAddressLine2());\n contact.setCityName(hotelTO.getCityName());\n contact.setPostalCode(Integer.parseInt(hotelTO.getPostalCode()));\n contact.setProvidenceCode(hotelTO.getStateCode());\n\n contact.setOfficeNumber(hotelTO.getOfficePhoneNumber());\n contact.setFaxNumber(hotelTO.getFaxPhoneNumber());\n\n newHotel.setHotelContact(contact);\n\n hotelDao.save(newHotel);\n }", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "int insert(CityDO record);", "@Ignore\n\tpublic void testUpdateDriverAddressSave() throws MalBusinessException{\n\t // find the existing driver\n\t\tDriver existingDriver = driverService.getDriver(unallocatedDriverId);\n\t\t// get the existing drivers address\n\t\tList<DriverAddress> modifiedAddresses = new ArrayList<DriverAddress>();\n\t\tDriverAddress modifiedAddress = existingDriver.getDriverAddressList().get(0);\n\t\texistingDriver.getDriverAddressList().remove(0);\n\t\t\n\t\tmodifiedAddress.setAddressLine1(\"ASDF\");\n\t\tmodifiedAddresses.add(modifiedAddress);\n\t\t\n\t\t// save the driver\n\t\tDriver updatedDriver = driverService.saveOrUpdateDriver(existingDriver.getExternalAccount(), existingDriver.getDgdGradeCode(), existingDriver, modifiedAddresses, existingDriver.getPhoneNumbers(), userName, null);\n\t\t\n\t\t// verify a new entry in the address history table for today\n\t\tboolean historyRecordForToday = false;\n\t\tCalendar todayCal = new GregorianCalendar();\n\t\ttodayCal.set(Calendar.HOUR_OF_DAY, 0);\n\t\ttodayCal.set(Calendar.MINUTE, 0);\n\t\ttodayCal.set(Calendar.SECOND, 0);\n\t\ttodayCal.set(Calendar.MILLISECOND, 0);\n\t\tDate today = todayCal.getTime();\n\t\tfor(DriverAddressHistory hist : updatedDriver.getDriverAddressHistoryList())\n\t\t{\n\t\t\tif(hist.getInputDate().after(today)){\n\t\t\t\thistoryRecordForToday = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t assertTrue(\"Driver address history does not have a record for today, Address was not changed\", historyRecordForToday);\n\t}", "int insert(TempletLink record);", "void insert(VRpDyCellBh record);", "int insert(WstatTeachingClasshourTeacher record);", "public void insert(HRouter record) {\r\n getSqlMapClientTemplate().insert(\"H_ROUTER.ibatorgenerated_insert\", record);\r\n }" ]
[ "0.6736524", "0.65349805", "0.6351067", "0.6202936", "0.6167505", "0.58773637", "0.5693915", "0.5671203", "0.56594664", "0.56105953", "0.5559554", "0.5534209", "0.55334425", "0.5531514", "0.5527849", "0.55252117", "0.54234517", "0.54127765", "0.5407871", "0.53963923", "0.53946936", "0.5360564", "0.52983737", "0.52864534", "0.5281473", "0.5225773", "0.5221836", "0.51922417", "0.516594", "0.51522964", "0.5146531", "0.5141333", "0.5141333", "0.51348877", "0.51342595", "0.5128592", "0.5124473", "0.5124473", "0.5121359", "0.5119324", "0.5113454", "0.51046056", "0.5104046", "0.50968575", "0.5084566", "0.50755036", "0.5074512", "0.5061709", "0.5060859", "0.50598127", "0.50559187", "0.50514084", "0.5037153", "0.5036395", "0.5029972", "0.5023893", "0.5023437", "0.5008491", "0.5008159", "0.49899998", "0.49859828", "0.49837816", "0.49817654", "0.49793494", "0.49713928", "0.49682048", "0.49596825", "0.49542066", "0.49474725", "0.49474514", "0.49420255", "0.49347547", "0.49232978", "0.49227065", "0.49120662", "0.49031913", "0.4901972", "0.4899745", "0.4890251", "0.48891637", "0.48836702", "0.48809013", "0.48785552", "0.4878551", "0.48724028", "0.48704374", "0.48669425", "0.48539603", "0.48496553", "0.4849089", "0.48462495", "0.4838239", "0.48375925", "0.48373458", "0.48368174", "0.4836476", "0.48329484", "0.48294264", "0.48205292", "0.48195133" ]
0.67171335
1
Updates Hotel phone number attribute given hotel name and branch ID:
public void updateHotelPhone(Connection connection, String hotel_name, int branch_ID) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "HOTEL", null); if (rs.next()){ String sql = "UPDATE Hotel SET phone = ? WHERE hotel_name = ? AND branch_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please provide a new phone number: "); setPhone(scan.nextLine()); pStmt.setString(1, getPhone()); setHotelName(hotel_name); pStmt.setString(2, getHotelName()); setBranchID(branch_ID); pStmt.setInt(3, getBranchID()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } else { System.out.println("ERROR: Error loading HOTEL Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePhone(DetailModel detailModel){\n\n }", "Update withBranch(String branch);", "public void updatePhoneNumber(String newPhoneNum)\r\n {\r\n phoneNum = newPhoneNum;\r\n }", "@Override\n public void updateOne(int id, Booking itemToUpdate) {\n String sql = \"UPDATE bookings SET customer_phone_number = ? WHERE id = ?\";\n jdbc.update(sql, itemToUpdate.getCustomerPhoneNumber(), id);\n }", "public void setHome_phone(Long home_phone);", "public void updatePhoneNumber(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"UPDATE phone_number_info SET person_id=?,phone_number=? \"\n\t\t \t\t+ \" WHERE idphone_number_info_id=?\");\n\n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setInt(2, Integer.parseInt(address.getPhoneNumber()));\n\t\t \n\t\t stmt.setInt(3, Integer.parseInt(address.getPhoneNumberId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Address Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "int updateByPrimaryKey(SrHotelRoomInfo record);", "void setPhone(int phone);", "int updateByPrimaryKey(SdkPhone record);", "int updWayBillById(WayBill record) throws WayBillNotFoundException;", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "void updateCustomerOrderBroadbandASID(CustomerOrderBroadbandASID cobasid);", "int updateByPrimaryKeySelective(SrHotelRoomInfo record);", "public void updatePremiumRoomId(Long premiumId, Integer roomId);", "void update(IBranchSpec branch) throws P4JavaException;", "@Override\n public void updateHasPhone(boolean hasPhone) {\n }", "public void setHotelId(int value) {\n this.hotelId = value;\n }", "public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }", "@Override\n\tpublic String updateByPrimaryKey(Familybranch record, Model m, BindingResult b) throws Exception {\n\t\treturn null;\n\t}", "@Override\n @Transactional(rollbackFor = { BranchServiceException.class, SQLException.class })\n public void update(String targetBranchId, String name, String address, String latitude, String longitude, String telephone) throws BranchServiceException, SQLException {\n checker.rejectIfNullOrEmpty(targetBranchId, new BranchServiceException(EMPTY_BRANCH_ID));\n long branchIdLong = checker.parseUnsignedLong(targetBranchId, new BranchServiceException(INVALID_BRANCH_ID));\n\n // Check if the target branch exists\n Branch branch = branchRepo.getBranch(branchIdLong);\n if (branch == null)\n branchDao.getById(branchIdLong);\n if (branch == null)\n throw new BranchServiceException(BRANCH_NOT_EXISTING);\n\n // Check if the parameters need updating\n if (name != null) {\n if (name.isEmpty())\n throw new BranchServiceException(EMPTY_NAME);\n else\n branch.setName(name);\n }\n if (address != null) {\n if (address.isEmpty())\n throw new BranchServiceException(EMPTY_ADDRESS);\n else\n branch.setAddress(address);\n }\n BigDecimal latitudeBd;\n if (latitude != null) {\n latitudeBd = checker.parseBigDecimal(latitude, new BranchServiceException(INVALID_LATITUDE));\n branch.setLatitude(latitudeBd);\n }\n BigDecimal longitudeBd;\n if (longitude != null) {\n longitudeBd = checker.parseBigDecimal(longitude, new BranchServiceException(INVALID_LONGITUDE));\n branch.setLongitude(longitudeBd);\n }\n if (telephone != null) {\n checker.rejectTelephoneIfInvalid(telephone, new BranchServiceException(INVALID_TELEPHONE));\n branch.setTelephone(telephone);\n }\n\n // Update\n branchDao.update(branch);\n branchRepo.updateBranch(branch);\n }", "@Override\n\tpublic void update(Phone phone) {\n\t\t\n\t}", "@Transactional\n\t@Override\n\tpublic void updateBranch(Branch branch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"update_branch\");\n\t\tMap<String, Object> culoMap = new HashMap<String, Object>();\n\t\t\n\t\tculoMap.put(\"Pid_branch\", branch.getIdBranch());\n\t\tculoMap.put(\"Pname_branch\", branch.getNameBranch());\n\t\tculoMap.put(\"Paddress_branch\", branch.getAddressBranch());\n\t\tculoMap.put(\"Pphone_branch\", branch.getPhoneBranch());\n\t\t\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValues(culoMap);\n\t\tcall.execute(src);\n\t\t\n\t}", "public Builder setHotelId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n hotelId_ = value;\n onChanged();\n return this;\n }", "@Override\n public void setCellPhone(java.lang.String cellPhone) {\n _entityCustomer.setCellPhone(cellPhone);\n }", "public static String updatePhone(String newPhone, String account){\n return \"update user_information set ui_phone = '\"+newPhone+\"' where ui_account = '\"+account+\"'\";\n }", "public void setMobile_phone(Long mobile_phone);", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "int updateByPrimaryKey(HotelType record);", "public void setTEL_NUMBER(java.lang.String value)\n {\n if ((__TEL_NUMBER == null) != (value == null) || (value != null && ! value.equals(__TEL_NUMBER)))\n {\n _isDirty = true;\n }\n __TEL_NUMBER = value;\n }", "@PatchMapping(\"/{hotelId}\")\n public ResponseEntity<HotelResource> updateHotel(@PathVariable Long hotelId, @RequestBody Hotel hotel){\n return new ResponseEntity<>(\n hotelService.updateHotel(hotelId, hotel), HttpStatus.OK\n );\n }", "public void setCellPhoneNumber(String cellPhoneNumber) {\n this.cellPhoneNumber = cellPhoneNumber;\n }", "public void setBuildingNumber(String buildingNumber);", "int updateNameNmNameLast(String nmNameLast, int idName, int idPerson);", "@Override\n public void updateBillOfRoomsById(int roomId) {\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.UPDATE_ROOM_BILL_BY_ID);\n preparedStatement.setInt(1, roomId);\n preparedStatement.executeUpdate();\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n }", "@ApiModelProperty(required = true, value = \"Phone number of a hotline of the charging station operator.\")\n public String getHotlinePhoneNumber() {\n return hotlinePhoneNumber;\n }", "public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }", "public void setPhone(String phone);", "void addPhoneToPerson(Phone phone,int personId);", "void setIdNumber(String idNumber);", "public void updateBus(Bus bus, int id) {\n \n if (bus.getAttribute(PFWModelConstants.PFW_LEGACY_ID_KEY) == null) {\n bus.setAttribute(PFWModelConstants.PFW_LEGACY_ID_KEY, id);\n registerLegacy(LEGACY_TAG,id,bus);\n }\n \n if (bus.getAttribute(Bus.NAME_KEY) == null) {\n String name = bus.toString();\n if (name.length() > 12) {\n name = name.substring(name.length()-12,name.length());\n } \n while (name.length() < 12) {\n name += \" \";\n }\n name = \"\\\"\" + name + \"\\\"\"; \n bus.setAttribute(Bus.NAME_KEY, name);\n }\n }", "public abstract void setPhone1(String sValue);", "int updateByPrimaryKeySelective(SdkPhone record);", "public void upateroomstatus(String branchid, String roomid, String status){\n\t\tString sql = \"update tb_p_room set status = '\" + status + \"' where branch_id = \" + branchid + \" and room_id = \" + roomid;\n\t\t//String hql1 = \"update Room set roomKey.status = :STATUS where id = :ID\";\n\t\t//this.executeUpdateHQL(hql1,new String[]{\"STATUS\", \"ID\"}, new Object[]{status, id});\n\t\tthis.executeUpdateSQL(sql);\n\t}", "public void setTelephoneNumber(String newNumber)\r\n\t{\r\n\t\ttelephoneNumber = newNumber;\r\n\t}", "public void setClHotelId(String clHotelId) {\r\n this.clHotelId = clHotelId;\r\n }", "public abstract void setPhone2(String sValue);", "public void SetCheckoutRegistrationBuildingnumber(String housenumber){\r\n\t\tString Hosuenumber = getValue(housenumber);\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:- Registration Building number should be entered as \"+Hosuenumber);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"checkoutregistrationbuildingnumber\"),Hosuenumber);\r\n\t\t\tSystem.out.println(\"Registration Building number is entered as \"+Hosuenumber);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Building number is entered as \"+Hosuenumber);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Building number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationbuildingnumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "int updateByPrimaryKey(HomeWork record);", "public void setCellphone(String cellphone) {\n this.cellphone = cellphone;\n }", "public void setBranchNo(String branchNo) {\r\n this.branchNo = branchNo;\r\n }", "public void setStreetNo(int value) {\n this.streetNo = value;\n }", "void updateHouseStatus(long houseId, int status);", "long addMobilePhone(MobilePhone mobilePhone);", "int updateByPrimaryKey(ActivityHongbaoPrize record);", "@Test\n public void testUpdatePhone() {\n System.out.println(\"updatePhone\");\n String phone = \"85352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n instance.updatePhone(customerID, phone);\n assertEquals(\"85352010\", instance.getCustomer(customerID).getPhone());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void update_phone_settings(JSONObject json) throws JSONException {\n\t\tmyPhone.phone = json.getInt(\"phone\");\n\t}", "int updateByPrimaryKey(UcOrderGuestInfo record);", "int updateByPrimaryKey(NeeqCompanyAccountingFirmOnline record);", "void updateCustomerById(Customer customer);", "@Update(\"UPDATE addresses SET city=#{city}, zip_code=#{zip}, street=#{street}, number=#{number} \" +\n \"WHERE id_address=#{addressId}\")\n void updatePatientAddress(Address address);", "void updateHouseStatus(String username, long houseId, int status);", "int updateByPrimaryKey(TbJobProcessNodeRelationEntity record);", "public void updatePhoneNumber(String userName, String phoneNumber) throws Exception {\n String p = \"UPDATE Users SET PhoneNumber='\"+phoneNumber+\"' WHERE UserName ='\"+userName+\"'\";\n int result = 0;\n try {\n PreparedStatement ps = con.prepareStatement(p);\n //ps.setString(1,phoneNumber);\n result = ps.executeUpdate();\n\n }\n catch (Exception e) {\n System.out.println(\"Query not executed\");\n e.printStackTrace();\n }\n\n }", "public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}", "public void setHotelId(Integer hotelId) {\r\n this.hotelId = hotelId;\r\n }", "int updateByPrimaryKey(DO_Merchants record);", "public void setWareHouseNumber(int arg)\n\t{\n\t\tsetValue(WAREHOUSENUMBER, new Integer(arg));\n\t}", "public void setBranchNum(Integer branchNum) {\r\n this.branchNum = branchNum;\r\n }", "int updateByPrimaryKey(SmsCleanBagLine record);", "public abstract void setPhone3(String sValue);", "public void updateContact(View v){\n\n String uid = appState.firebaseReference.push().getKey();\n String businessID = ubidField.getText().toString();\n String name = unameField.getText().toString();\n String location = ulocationField.getText().toString();\n String primaryBiz = uprimaryBizField.getText().toString();\n String address = uaddressField.getText().toString();\n\n Map<String, Object> businessUpdate = receivedPersonInfo.toMap();\n businessUpdate.put(\"uid\", uid);\n businessUpdate.put(\"bid\", businessID);\n businessUpdate.put(\"name\", name);\n businessUpdate.put(\"primaryBiz\", primaryBiz);\n businessUpdate.put(\"address\", address);\n businessUpdate.put(\"location\", location);\n\n appState.firebaseReference.child(receivedPersonInfo.uid).setValue(businessUpdate);\n finish();\n Intent intent=new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public void updateDetail(String proid) {\n\t\tsqlSession.update(\"product.updateDetail\", proid);\n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "void updateOfProductById(long id);", "int updateByPrimaryKey(Shipping record);", "public void testUpdateAddress7() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Column(name = \"CELL_PH_NUM\", length = 10)\n public String getCellPhoneNumber() {\n return cellPhoneNumber;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void updateCustomer(String id) {\n\t\t\n\t}", "int updateByPrimaryKey(CmsRoomBook record);", "void updatePurchaseOrderLinkedBoqStatus(long pohId);", "public void setPhone(long phone) {\n this.phone = phone;\n }", "public void update(Branch branch) {\n branch_dao.update(branch);\n }", "public void setPhonenumber(Integer phonenumber) {\n this.phonenumber = phonenumber;\n }", "public void setBranchNo(String branchNo) {\n this.branchNo = branchNo == null ? null : branchNo.trim();\n }", "private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}", "Transfer updateTransactionNumber(Long id, String transactionNumber);", "public void setROOMNUMBER(java.lang.String value)\n {\n if ((__ROOMNUMBER == null) != (value == null) || (value != null && ! value.equals(__ROOMNUMBER)))\n {\n _isDirty = true;\n }\n __ROOMNUMBER = value;\n }", "public Long getHome_phone();", "public Address updateAddress(Address newAddress);", "private void setBuildingNumber(String number) {\n buildingNumber = number;\n }", "@PutMapping(\"/{id}\")\n public TelephoneEntry updateEntry(@PathVariable Long id, @Valid @RequestBody TelephoneEntry telephoneEntry) {\n telephoneEntryService.findById(id).orElseThrow(() -> new EntryNotFoundException(id));\n return telephoneEntryService.update(id, telephoneEntry);\n }", "void updateOrderStatus(String orderNr, String status, Long businessId);", "@Override\n\tpublic String updateFoodNum(String fname, int num) {\n\t\treturn ob.updateFoodNum(fname, num);\n\t}", "void changeBTAddress() {\n\t\t\n\t\t// if ( this.beacon.getAppType() == AppType.APPLE_GOOGLE_CONTACT_TRACING ) {\n\t\tif ( this.useRandomAddr()) {\n\t\t\t// try to change the BT address\n\t\t\t\n\t\t\t// the address is LSB..MSB and bits 47:46 are 0 i.e. bits 0 & 1 of right-most byte are 0.\n\t\t\tbyte btRandomAddr[] = getBTRandomNonResolvableAddress();\n\t\t\t\n\t\t\t// generate the hcitool command string\n\t\t\tString hciCmd = getSetRandomBTAddrCmd( btRandomAddr);\n\t\t\t\n\t\t\tlogger.info( \"SetRandomBTAddrCmd: \" + hciCmd);\n\t\t\t\n\t\t\t// do the right thing...\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\"SET_RAND_ADDR_CMD=\" + hciCmd\n\t\t\t};\n\t\t\t\t\t\t\n\t\t\tfinal String cmd = \"./scripts/set_random_addr\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, this, null);\n\t\t}\n\t\t\t\n\t}", "public void changeAddress(String name, String street, int building, int apartment) {\n if (name == null || street == null || building == 0 || apartment == 0 || !addressBook.containsKey(name))\n throw new NullPointerException();\n Address newAddress = new Address(street, building, apartment);\n addressBook.put(name, newAddress);\n }", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "@PostMapping(path = \"/{id}/info/update/phone\")\n public StudentCommand updatePhone(@PathVariable Integer id, @RequestBody StudentCommand command) {\n Optional<Student> studentOptional = studentService.findStudentById(id);\n if (!studentOptional.isPresent()) {\n throw new NotFoundException();\n }\n Student student = studentOptional.get();\n student.setPhoneNumber(command.getPhoneNumber());\n Student savedStudent = studentService.saveStudent(student);\n\n return studentToStudentCommand.converter(savedStudent);\n }" ]
[ "0.5707352", "0.56939477", "0.5670955", "0.56481475", "0.5557999", "0.55506593", "0.55478066", "0.5285094", "0.52784574", "0.5266073", "0.52655846", "0.5221792", "0.5213353", "0.52059865", "0.51829934", "0.5166379", "0.51336926", "0.5101943", "0.50908464", "0.50810087", "0.5080208", "0.5066762", "0.50292563", "0.5012549", "0.50088626", "0.5004263", "0.49980298", "0.49892783", "0.4979205", "0.49714914", "0.49621093", "0.49316868", "0.49303928", "0.49161735", "0.4913283", "0.48784462", "0.4876147", "0.48732045", "0.48650706", "0.48646307", "0.4860689", "0.48598704", "0.4838731", "0.4836944", "0.4819093", "0.48155874", "0.4810909", "0.4804874", "0.47932178", "0.47912535", "0.47850993", "0.4783463", "0.47781372", "0.47747183", "0.47704968", "0.4768426", "0.4761851", "0.47571445", "0.4747475", "0.47440606", "0.47425798", "0.47325736", "0.47318044", "0.4725716", "0.47148144", "0.47145298", "0.47067225", "0.47053146", "0.4704561", "0.47011778", "0.469768", "0.4692606", "0.46916476", "0.46896583", "0.46875158", "0.4685519", "0.4680005", "0.46738735", "0.4673565", "0.4673565", "0.46724313", "0.46708748", "0.4665104", "0.46631715", "0.4658796", "0.46567768", "0.46565786", "0.4648801", "0.46461204", "0.46456552", "0.46433598", "0.4642728", "0.46424687", "0.46367192", "0.46307006", "0.46280038", "0.46198386", "0.46150878", "0.4612208", "0.4605935" ]
0.6978616
0
Inserts a new room into the ROOM Table, linking the weak entity with the HOTEL strong entity: CALL giveHotelRooms() FIRST
private void createRoom(Connection connection, Scanner scan) throws SQLException { DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs1 = dmd.getTables(null, null, "ROOM", null); ResultSet rs2 = dmd.getTables(null, null, "HOTEL_ROOMS", null); if (rs1.next() && rs2.next()){ String sql = "INSERT INTO Room VALUES (?, ?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); pStmt.setString(1, getHotelName()); pStmt.setInt(2, getBranchID()); System.out.print("Please provide the room type a name: "); setType(scan.nextLine()); pStmt.setString(3, getType()); System.out.print("Please provide a guest capacity for this type: "); // branch id, room type, capacity setCapacity(Integer.parseInt(scan.nextLine())); pStmt.setInt(4, getCapacity()); try { pStmt.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } finally { pStmt.close(); rs1.close(); rs2.close(); } linkHotelRoom(connection, scan); } else { System.out.println("ERROR: Error loading ROOM or HOTEL_ROOMS Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void insert(Room ob) {\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tPreparedStatement ps = cn.prepareStatement(\"INSERT INTO room VALUES (?,?)\");\n\t\t\tps.setInt(1, ob.getIdRoom());\n\t\t\tps.setInt(2, ob.getIdRoomType());\n\n\t\t\tps.execute();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t}", "public void createHotel(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"HOTEL\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ADDRESS\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs1.next() && rs2.next()){\n\n createAddress(connection, scan); // Creates an address to link HOTEL with ADDRESS\n\n String sql = \"INSERT INTO Hotel VALUES (?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a hotel name: \");\n setHotelName(scan.nextLine());\n pStmt.setString(1, getHotelName());\n\n System.out.print(\"Please provide a branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(2, getBranchID());\n\n\n System.out.print(\"Please provide a phone number: \");\n setPhone(scan.nextLine());\n pStmt.setString(3, getPhone());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelAddress(connection); // Links HOTEL with ADDRESS entities in HOTEL_ADDRESS relation\n\n do {\n createRoom(connection, scan);\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while ((String.valueOf(scan.next())).toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL or HOTEL_ADDRESS Table.\");\n }\n }", "public Room createRoom(Room room);", "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "int insert(SrHotelRoomInfo record);", "@Override\n\tpublic HotelBooking bookRoom(HotelForm hotelForm, Session session) throws HibernateException, Exception{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tHotelBooking hotelBooking = setDAOValues(hotelForm);\n\t\tsession.save(hotelBooking);\n\t\t\n\t\treturn null;\n\t}", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "Hotel saveHotel(Hotel hotel);", "@PostMapping(value=\"/insert/hotel\", consumes=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseClient insertNewRoom(@RequestBody Hotel hotel){\r\n\t\thotelSer.save(hotel);\r\n\t\tResponseClient res = new ResponseClient();\r\n\t\tres.setResponse(\"successfull hotel_id: \");\r\n\t\treturn res;\r\n\t}", "int insertSelective(SrHotelRoomInfo record);", "public com.Hotel.model.Hotel create(long hotelId);", "int insert(CmsRoomBook record);", "@Override\n @Transactional\n public HotelResponseDTO createHotel(AddHotelRequestDTO addHotelRequest) {\n Hotel hotel = new Hotel();\n String generatedHotelId = CommonUtil.getGeneratedId();\n hotel.setHotelId(generatedHotelId);\n hotel.setName(addHotelRequest.getName());\n hotel.setDescription(addHotelRequest.getDescription());\n hotel.setLocation(addHotelRequest.getLocation());\n hotel.setDefaultCheckInTime(addHotelRequest.getDefaultCheckInTime());\n hotel.setDefaultCheckOutTime(addHotelRequest.getDefaultCheckOutTime());\n if (addHotelRequest.getFacilities() != null) {\n hotel.setFacilities(String.join(\",\", addHotelRequest.getFacilities()));\n }\n hotel.setDeleted(false);\n Date createdDate = new Date();\n hotel.setCreatedDate(createdDate);\n hotel.setLastModifiedDate(createdDate);\n hotelRepository.save(hotel);\n\n List<AddRoomRequestDTO> roomRequests = addHotelRequest.getRooms();\n if (roomRequests != null && roomRequests.size() > 0) {\n List<Room> rooms = roomRequests.stream().map(roomRequest -> {\n Room room = new Room();\n String generatedRoomId = CommonUtil.getGeneratedId();\n room.setRoomId(generatedRoomId);\n RoomType roomType = RoomType.fromCode(roomRequest.getRoomType());\n room.setRoomType(roomType);\n BedType bedType = BedType.fromCode(roomRequest.getBedType());\n room.setBedType(bedType);\n room.setNumberOfAdults(roomRequest.getNumberOfAdults());\n room.setNumberOfChildren(roomRequest.getNumberOfChildren());\n room.setBasicFare(roomRequest.getBasicFare());\n room.setTaxPercentage(roomRequest.getTaxPercentage());\n if (roomRequest.getFacilities() != null) {\n room.setFacilities(String.join(\",\", roomRequest.getFacilities()));\n }\n room.setCreatedDate(createdDate);\n room.setLastModifiedDate(createdDate);\n room.setDeleted(false);\n room.setHotel(hotel);\n return room;\n }).collect(Collectors.toList());\n roomRepository.saveAll(rooms);\n hotel.setRooms(rooms);\n }\n logger.info(\"Created hotel information successfully | hotelId:{}\", generatedHotelId);\n return makeHotelResponseDTO(hotel);\n }", "@Override\n\tpublic void save(PropertyRooms propertyRoom) {\n\t\thibernateTemplate.saveOrUpdate(propertyRoom);\n\t}", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void linkHotelRoom(Connection connection, Scanner scan) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Rooms VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please enter the number of \" + getType() + \"s the hotel has: \");\n setQuantity(scan.nextInt());\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getType());\n pStmt.setInt(4, getQuantity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public void persistHotel(Hotel hotel) throws SQLException{\n\t\tPlace place = new Place(hotel.getName(), hotel.getCoord(), hotel.getDescriptionFile());\n\t\tpersistPlace(place);\n\t\tpersistPlace(hotel.getBeach());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString readBeachPKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertHotelQuery = \"INSERT INTO Hotel (id_place, pricePerDay, id_beach) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place part and the beach\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, place.getName());\n\t\tpreparedStatement.setString(2, place.getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\t\t\n\t\tpreparedStatement = conn.prepareStatement(readBeachPKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, hotel.getBeach().getName());\n\t\tpreparedStatement.setString(2, hotel.getBeach().getDescriptionFile());\n\t\t\n\t\tresult = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint beachPK = result.getInt(\"id\");\n\n\t\t//Set place in the database\n\t\tpreparedStatement = conn.prepareStatement(insertHotelQuery);\n\t\t\n\t\tpreparedStatement.setInt(1, placePK);\n\t\tpreparedStatement.setFloat(2, hotel.getPricePerDay());\n\t\tpreparedStatement.setInt(3, beachPK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t\t\n\t}", "RoomModel createRoomModel(RoomModel roomModel);", "public void save(Room room) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.saveOrUpdate(room);\n\t\tsession.flush();\n\t}", "public boolean addRooms(int id, String location, int numRooms, int price)\n throws RemoteException, DeadlockException;", "public void createHotel(String name, int numberSingleRooms,int numberDoubleRooms, double priceSingleRooms,\r\n\t\t\tdouble priceDoubleRooms, int category, UUID userID, int postalCode, String adress) {\r\n\t\tif(session instanceof Hotelier) {\t\t// nur erlaubt für Hoteliers\r\n\t\t\tHotel hotel=new Hotel(name, numberSingleRooms, numberDoubleRooms, priceSingleRooms, \r\n\t\t\t\t\tpriceDoubleRooms, category, userID, postalCode, adress);\r\n\t\t\tfor (int i=0;i<numberDoubleRooms;i++) {\t\t\t// erstelllt und speichert die Zimmer des Hotels (param: HotelID, RoomType, bookedDates)\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),0, new ArrayList <DateTime>());\r\n\t\t\t}\r\n\t\t\tfor (int i=0;i<numberSingleRooms;i++) {\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),1, new ArrayList <DateTime>());\r\n\t\t\t}\t\t\r\n\t\t\thotelDAO.saveHotel(hotel);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnew IllegalArgumentException(\"Die Aktion 'createHotel' kann nur von einem Hotelier durchgeführt werden.\");\r\n\t\t}\r\n\t}", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "int insertSelective(CmsRoomBook record);", "public void nextRoom() {\n room++;\n createRoom();\n }", "@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.POST)\n\t@ResponseBody\n\tpublic Room newReservationRoom(@PathVariable Integer reservation_reservationId, @RequestBody Room room) {\n\t\treservationService.saveReservationRoom(reservation_reservationId, room);\n\t\treturn roomDAO.findRoomByPrimaryKey(room.getRoomId());\n\t}", "public void addNewPassenger() throws SQLException {\n\t\tScanner input = new Scanner(System.in);\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = connUtil.getConnection();\n\t\t\t// call needed DAOs here\n\t\t\tPassengerDAO pdao = new PassengerDAO(conn);\n\t\t\tFlightDAO fdao = new FlightDAO(conn);\n\t\t\tRouteDAO rdao = new RouteDAO(conn);\n\t\t\tAirportDAO apodao = new AirportDAO(conn);\n\t\t\tAirplaneDAO apldao = new AirplaneDAO(conn);\n\n\t\t\tPassenger passenger = new Passenger();\n\t\t\tpassenger.setId(pdao.nextAvailableId());\n\t\t\tpassenger.setBookingId(1);\n\n\t\t\t// Sets passenger name\n\t\t\tSystem.out.println(\"Enter the passenger given name\");\n\t\t\tpassenger.setGivenName(input.nextLine());\n\t\t\tSystem.out.println(\"Enter the passenger family name\");\n\t\t\tpassenger.setFamilyName(input.nextLine());\n\n\t\t\t// Sets birthday\n\t\t\tSystem.out.println(\"Enter DOB (yyyy-mm-dd)\");\n\t\t\tDate date = Date.valueOf(input.nextLine());\n\t\t\tpassenger.setDob(date);\n\n\t\t\t// Sets gender\n\t\t\tSystem.out.println(\"Enter gender (male/female/other)\");\n\t\t\tpassenger.setGender(input.nextLine());\n\n\t\t\t// Sets address\n\t\t\tSystem.out.println(\"Enter the address of the passenger\");\n\t\t\tpassenger.setAddress(input.nextLine());\n\n\t\t\t// Adds passenger to passenger table\n\t\t\tpdao.addPassenger(passenger);\n\n\t\t\tconn.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tconn.rollback();\n\t\t} finally {\n\t\t\tconn.close();\n\t\t}\n\t}", "@PostMapping(path = \"/rooms\")\n public ResponseEntity<Room> generateNewRoom() {\n Room newRoom = roomService.generateNewRoom();\n return new ResponseEntity<>(newRoom, HttpStatus.CREATED);\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }", "@Transactional\r\n\tpublic Room save(Room room) {\r\n\t\treturn this.roomRepository.save(room);\r\n\t}", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "@RequestMapping(method = RequestMethod.POST)\n public ResponseEntity<?> addGameRoom(@RequestBody Game gameRoom) {\n try {\n ls.addGameRoom(gameRoom);\n return new ResponseEntity<>(HttpStatus.CREATED);\n } catch (LacmanPersistenceException ex) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, ex);\n return new ResponseEntity<>(ex.getMessage(), HttpStatus.FORBIDDEN);\n }\n }", "public static void addKitchen(KitchenModel kitchen) {\n //Creating session\n Session session = SetupPersistence.getSession();\n //Saving object to database\n session.save(kitchen);\n //Closing session\n SetupPersistence.closeSession(session);\n }", "public void addBestelling(Bestelling bestelling) {\n\r\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n // If a connection was successfully setup, execute the INSERT statement\r\n\r\n connection.executeSQLInsertStatement(\"INSERT INTO bestelling (`bestelId`, `tafelId`) VALUES(\" + bestelling.getId() + \",\" + bestelling.getTafelId() + \");\");\r\n\r\n for(Drank d : bestelling.getDranken()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_bestelling (`DrankID`, `BestelId`, `hoeveelheid`) VALUES (\" + d.getDrankId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n for(Gerecht g : bestelling.getGerechten()) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_bestelling (`GerechtID`, `BestelId`, `hoeveelheid`) VALUES (\" + g.getGerechtId() + \",\" + bestelling.getId() + \", `1`\");\r\n }\r\n\r\n\r\n //Close DB connection\r\n connection.closeConnection();\r\n }\r\n\r\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "@Test\n\tpublic void testSaveRoomPositive() {\n\t\tRoom room;\n\t\tShelter shelter;\n\t\tRoomDesign roomDesign;\n\t\tPlayer player;\n\t\tint roomDesignId;\n\n\t\tsuper.authenticate(\"player1\"); //The player knows the Shelter\n\n\t\troomDesignId = super.getEntityId(\"RoomDesign1\");\n\n\t\troom = this.roomService.create();\n\t\troomDesign = this.roomDesignService.findOne(roomDesignId);\n\t\tplayer = (Player) this.actorService.findActorByPrincipal();\n\n\t\tshelter = this.shelterService.findShelterByPlayer(player.getId());\n\n\t\troom.setShelter(shelter);\n\t\troom.setRoomDesign(roomDesign);\n\n\t\tthis.roomService.save(room);\n\n\t\tsuper.unauthenticate();\n\t}", "private Room createCastle(){\n Room hallway = new Room(\"the hallway\");\n\n Room theStairs = new Room(\"the staircase\");\n Medic medic = new Medic(20, 3);\n theStairs.medic = medic;\n\n Room livingRoom = new Room(\"the living room\");\n Monster monster = new Monster(\"Grimeteeth\", 10, 100);\n livingRoom.monster = monster;\n\n Room firstFloor = new Room(\"first floor\");\n Room secondFloor = new Room(\"second floor\");\n Room thirdFloor = new Room(\"third floor\");\n monster = new Monster(\"Voodoobug\", 30, 100);\n thirdFloor.monster = monster;\n\n Room balcony = new Room(\"balcony\");\n balcony.endOfGameText = \"You fall out of the balcony, and die\";\n Room chamber = new Room(\"Chamber\");\n monster = new Monster (\"Smogstrike\", 50, 100);\n chamber.monster = monster;\n chamber.hasTreasure = true;\n chamber.endOfGameText = \"YEEES! You won the game, and found the treasure!\";\n\n Room bedchamber = new Room(\"bedchamber\");\n bedchamber.endOfGameText = \"You fall in a deep sleep, and will never wake up!\";\n\n\n /**\n * Options connecting to the rooms hallway,theStairs,sale,livingRoom variable\n */\n Connections[] hallwayConnections = new Connections[2];\n hallwayConnections[0] = new Connections(\"go left\",\"l\", theStairs);\n hallwayConnections[1] = new Connections(\"go right\",\"r\", livingRoom);\n hallway.connections = hallwayConnections;\n\n Connections[] stairsConnections = new Connections[3];\n stairsConnections[0] = new Connections(\"first floor\",\"1\", firstFloor);\n stairsConnections[1] = new Connections(\"second floor\",\"2\", secondFloor);\n stairsConnections[2] = new Connections(\"third floor\",\"3\", thirdFloor);\n theStairs.connections = stairsConnections;\n\n Connections[] firstFloorConnections = new Connections[3];\n firstFloorConnections[0] = new Connections(\"blue door\",\"b\",hallway);\n firstFloorConnections[1] = new Connections(\"red door\",\"r\",balcony);\n firstFloorConnections[2] = new Connections(\"yellow door\",\"y\",chamber);\n firstFloor.connections = firstFloorConnections;\n\n Connections[] secondFloorConnections = new Connections[1];\n secondFloorConnections[0] = new Connections(\"small door\",\"s\",chamber);\n secondFloor.connections = secondFloorConnections;\n\n Connections[] thridConnections = new Connections[2];\n thridConnections[0] = new Connections(\"big door\",\"bd\",balcony);\n thridConnections[1] = new Connections(\"elevator\",\"e\",firstFloor);\n thirdFloor.connections = thridConnections;\n\n Connections[] livingRoomConnections = new Connections[2];\n livingRoomConnections[0] = new Connections(\"iron door\",\"i\",hallway);\n livingRoomConnections[1] = new Connections(\"tree door\",\"t\",bedchamber);\n livingRoom.connections = livingRoomConnections;\n\n return hallway;\n }", "@Override\n public void addHotelToOrganization(HotelTO hotelTO, Organization organization) throws InsufficientPrivilegeException {\n Hotel newHotel = new Hotel();\n newHotel.setHotelName(hotelTO.getHotelName());\n newHotel.setOrganizationID(organization.getId());\n\n // Create the contact object.\n Contact contact = new Contact();\n contact.setAddressLine1(hotelTO.getAddressLine1());\n contact.setAddressLine2(hotelTO.getAddressLine2());\n contact.setCityName(hotelTO.getCityName());\n contact.setPostalCode(Integer.parseInt(hotelTO.getPostalCode()));\n contact.setProvidenceCode(hotelTO.getStateCode());\n\n contact.setOfficeNumber(hotelTO.getOfficePhoneNumber());\n contact.setFaxNumber(hotelTO.getFaxPhoneNumber());\n\n newHotel.setHotelContact(contact);\n\n hotelDao.save(newHotel);\n }", "void makeMoreRooms() {\n\t\twhile(rooms.size() < size.maxRooms) {\n\t\t\t\tRoom made;\n\t\t\t\tint height = baseHeight;\n\t\t\t\tint x = random.nextInt(size.width);\n\t\t\t\tint z = random.nextInt(size.width);\n\t\t\t\tint xdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tint zdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tif(bigRooms.use(random)) {\n\t\t\t\t\txdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t\tzdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t}\n\t\t\t\tint ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);\n\t\t\t\tint roomHeight = random.nextInt((verticle.value / 2) + ymod + 1) + 2;\n\t\t\t\tmade = new PlaceSeed(x, height, z).growRoom(xdim, zdim, roomHeight, this, null, null);\n\t\t\t}\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Extra Rooms (old)\");\n\t\t}", "public void addRoom(Chatroom room){\n\n }", "public BookingInfoEntity createBooking(BookingInfoEntity bookingInfoEntity) {\n System.out.println(bookingInfoEntity.getFromDate() + \"\\t\" + bookingInfoEntity.getToDate());\n long noOfDays = ChronoUnit.DAYS.between(bookingInfoEntity.getFromDate(), bookingInfoEntity.getToDate());\n bookingInfoEntity.setRoomPrice( 1000 * bookingInfoEntity.getNumOfRooms() * ((int)noOfDays) );\n bookingInfoEntity.setRoomNumbers(getRandomNumber(bookingInfoEntity.getNumOfRooms()));\n bookingInfoEntity = bookingRepository.save(bookingInfoEntity); \n return bookingInfoEntity;\n }", "public void afterInsert(RoomstatusBean pObject) throws SQLException;", "public void addMonster(Monster monster,Room room) {\n\t\troom.addMonster(monster);\n\t}", "@Transactional\n\t@Override\n\tpublic Passenger addPassenger(Passenger p) {\tint bId = p.getBooking().getBookingId();\n//\t\tString query = \"Select b from Booking b where b.bookingId =:bId \";\n//\t\tTypedQuery<Booking> tq = em.createQuery(query, Booking.class);\n//\t\ttq.setParameter(\"bId\", bId);\n//\t\tBooking b = tq.getSingleResult();\n//\t\tSystem.out.println(\"feffefefeff\" + p);\n//\t\tp.setBooking(b);\n//\t\n\tList<Integer> seatNos = new ArrayList();\n\t\t\n\t\tfor(int i =1; i<61; i++)\n\t\t{\t\n\t\t\tseatNos.add(i);\n\t}\n\t\t\t\n\tp.setSeatNo(seatNos.get(count));\n\tcount+=1;\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\tSystem.out.println(p);\n\t\tem.persist(p);\n\t\tSystem.out.println(\"persisted\" + p);\n\t\treturn p;\n\t}", "int insert(HotelType record);", "public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }", "@Override\n public Room create(RoomResponseDTO roomResponseDTO) {\n return roomRepository.save(new Room(\n roomResponseDTO.getClassroomNumber()\n ));\n }", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public abstract void enterRoom();", "@PostMapping(\"/chat-rooms\")\n public ResponseEntity<ChatRoom> createChatRoom(@RequestBody ChatRoom chatRoom) throws URISyntaxException {\n log.debug(\"REST request to save ChatRoom : {}\", chatRoom);\n if (chatRoom.getId() != null) {\n throw new BadRequestAlertException(\"A new chatRoom cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ChatRoom result = chatRoomRepository.save(chatRoom);\n return ResponseEntity.created(new URI(\"/api/chat-rooms/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "@Override\n public void insertUserRoom(int userId, int roomId) {\n logger.info(\"Start insertUserRoom\");\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.INSERT_INTO_USER_ROOM);\n preparedStatement.setInt(1, roomId);\n preparedStatement.setInt(2, userId);\n preparedStatement.executeUpdate();\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed insertUserRoom\");\n }", "@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "private static void AddRoom (){\n boolean addRoomLoop = true;\n //loop for addroom process\n while (addRoomLoop) {\n //try/catch for adding room\n try {\n //user inputs room number\n System.out.print(\"Room number: \");\n boolean roomNumberDuplicate = false;\n int newRoomNumber = RecInput.nextInt();\n //loop checks if roomnumber matches already existing room numbers\n for (int i = 0; i < HotelRoom.roomList.size(); i++) {\n if (newRoomNumber == HotelRoom.roomList.get(i).roomNumber) {\n roomNumberDuplicate = true;\n }\n }\n //if room number already exists, asks user for new input\n if (roomNumberDuplicate) {\n System.out.println(\"Room number must be unique, try again!\");\n System.out.println(\"-----------------------------\");\n }\n else {\n System.out.print(\"Number of beds: \");\n int newNumberBeds = RecInput.nextInt();\n\n System.out.print(\"Room price: \");\n int newRoomPrice = RecInput.nextInt();\n \n //new HotelRoom object is created\n HotelRoom.roomList.add(new HotelRoom(newRoomNumber, newNumberBeds, newRoomPrice, false, true, \"\"));\n System.out.println(\"Room added\");\n \n //breaking loop to exit addroom method\n addRoomLoop = false;\n }\n \n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //cleaning scanner\n RecInput.next();\n } \n }\n\n \n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "Room updateOrAddRoom(String username, Room room);", "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}", "public void insertBooking(Booking booking) throws SQLException, Exception;", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }", "public static void addNewRoute(Realm realm, RouteListModel mRouteListModel) {\n try {\n App.showLog(\"========insert-set-as-new route=====\");\n\n realm.beginTransaction();\n RouteListModel RouteListModel = realm.copyToRealmOrUpdate(mRouteListModel);\n realm.commitTransaction();\n\n } catch (Exception e) {\n e.printStackTrace();\n try {\n realm.commitTransaction();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "@Override\n\tpublic int addJewel(Jewel jewel) {\n\t\treturn jewelDao.insert(jewel);\n\t}", "@Override\r\n\tpublic String addnewMeeting(String userID, String roomID, Date startDate, Date endDate) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"in addition\");\r\n\t\tSession session = factory.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\t\r\n\t\tUser user=new User();\r\n\t\tuser.setUserID(userID);\r\n\r\n\t\tMeetingRoom meetingRoom=new MeetingRoom();\r\n\t\tmeetingRoom.setmRoomID(roomID);\r\n\t\t\r\n\t\tMeetingTimings meetingTimings=new MeetingTimings();\r\n\t\tmeetingTimings.setEndTime(endDate);\r\n\t\tmeetingTimings.setStartTime(startDate);\r\n\t\t\r\n\t\tmeetingTimings.setMeetingRoom(meetingRoom);\r\n\t\t\r\n\t\tBookedMeeting meeting=new BookedMeeting();\r\n\t\tmeeting.setEndTime(endDate);\r\n\t\tmeeting.setStartTime(startDate);\r\n\t\tmeeting.setBookingID(userID+\"-\"+roomID+\"-\"+meetingTimings.getStartTime().hashCode()+\"-\"+meetingTimings.getEndTime().hashCode());\r\n\t\tmeeting.setMeetingRoom(meetingRoom);\r\n\t\tmeeting.setUser(user);\r\n\t\t\r\n\t\t//uncomment to add new user or meeting room\r\n\t\t//session.save(user);\r\n\t\t//session.save(meetingRoom);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsession.save(meetingTimings);\r\n\t\t}\r\n\t\tcatch(HibernateException E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving meeting timings\"+E);\r\n\t\t}\r\n\t\t\r\n\t\ttry{\r\n\t\t\tsession.save(meeting);\r\n\t\t}\r\n\t\tcatch(HibernateException E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving meeting booked\"+E);\r\n\t\t\t\r\n\t\t}\r\n\t\t// session.persist(entity);\r\n\t\ttry{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t}\r\n\t\tcatch(Exception E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving and closing session\"+E);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t return \"success\";\r\n\r\n\t}", "public void populateRooms(){\n }", "org.landxml.schema.landXML11.RoadsideDocument.Roadside insertNewRoadside(int i);", "public Room addRoom(Room room) {\r\n\t\tif(userService.adminLogIn) {\r\n\t\t\treturn roomRepository.save(room);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new AdminPermissionRequired(\"admin permission required!!\");\r\n\t\t}\r\n\t}", "public void beforeInsert(RoomstatusBean pObject) throws SQLException;", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public void createHallway(int len) {\n createRoom(len, 0, 0);\n }", "int insert(ExamRoom record);", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "@Test\r\n\t public void addANullRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(null, null, null, null, null));\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }", "private void linkHotelAddress(Connection connection) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Address VALUES (?, ?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getCity());\n pStmt.setString(4, getState());\n pStmt.setInt(5, getZip());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }", "@PostMapping(\"/rooms/create\")\n public ResponseEntity create(HttpServletRequest req, HttpServletResponse res,\n @RequestBody String roomDetails) throws JsonProcessingException {\n roomService.create(roomDetails);\n return ResponseEntity.status(200).build();\n }", "@Override\n\tpublic void addLecture(Lecture l) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.persist(l);\n\t}", "public int creatRoom(String boardId) {\n\t\tConnection conn = getConnection();\n\t\tint result = cd.creatRoom(conn, boardId);\n\t\tif (result > 0) {\n\t\t\tcommit(conn);\n\t\t} else {\n\t\t\trollback(conn);\n\t\t}\n\t\tclose(conn);\n\t\treturn result;\n\t}", "void setRoomId(String roomId);", "public EventRoom getNewRoom(){\r\n newRoom.setRoomItems(eventRoomItems);\r\n return newRoom;\r\n }", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }" ]
[ "0.64704406", "0.64504063", "0.6233503", "0.6170729", "0.6111506", "0.6075631", "0.603976", "0.6036645", "0.6028164", "0.60230225", "0.5932012", "0.5910654", "0.5905192", "0.58523417", "0.5828038", "0.5812586", "0.5749106", "0.5731729", "0.57160443", "0.57150596", "0.5701747", "0.56903553", "0.56814533", "0.5635661", "0.56288296", "0.560237", "0.55923563", "0.5585666", "0.55792207", "0.5562676", "0.5556438", "0.5550635", "0.55487144", "0.55468845", "0.55376023", "0.55199635", "0.55073214", "0.55053484", "0.5498378", "0.5487261", "0.5478219", "0.5467532", "0.54431003", "0.54380006", "0.5427218", "0.54210037", "0.5420949", "0.5420694", "0.5404026", "0.53997153", "0.5399305", "0.5399043", "0.5397887", "0.53762764", "0.53610474", "0.5359026", "0.5356924", "0.5354085", "0.53451645", "0.5331103", "0.5308349", "0.53034323", "0.53022975", "0.5292467", "0.5285691", "0.5279437", "0.52621335", "0.5248182", "0.5245583", "0.5243243", "0.5238602", "0.5235765", "0.52168196", "0.5213926", "0.5207212", "0.51855695", "0.51820904", "0.51696175", "0.5166187", "0.5160246", "0.5158879", "0.5157409", "0.5153418", "0.5134274", "0.51308787", "0.5103905", "0.50901556", "0.5089996", "0.5086869", "0.5074158", "0.50733316", "0.50698024", "0.50665593", "0.506606", "0.5064333", "0.50574404", "0.50503397", "0.5047058", "0.50435615", "0.504352" ]
0.64953923
0
Prompts user to provide existing hotel and branch_ID to add as many room types as necessary:
public void giveHotelRooms(Connection connection) throws SQLException { Scanner scan = new Scanner(System.in); Scanner choice = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "HOTEL", null); // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding: if (rs.next()){ System.out.print("Please provide an existing hotel name: "); setHotelName(scan.nextLine()); System.out.print("Please provide the existing hotel branch ID: "); setBranchID(Integer.parseInt(scan.nextLine())); // Loop to create room types and link to Hotel: do { createRoom(connection, new Scanner(System.in)); System.out.println("Would you like to add another room type to this hotel (Y, N): "); } while (choice.next().toUpperCase().equals("Y")); } else { System.out.println("ERROR: Error loading HOTEL Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void AddRoom (){\n boolean addRoomLoop = true;\n //loop for addroom process\n while (addRoomLoop) {\n //try/catch for adding room\n try {\n //user inputs room number\n System.out.print(\"Room number: \");\n boolean roomNumberDuplicate = false;\n int newRoomNumber = RecInput.nextInt();\n //loop checks if roomnumber matches already existing room numbers\n for (int i = 0; i < HotelRoom.roomList.size(); i++) {\n if (newRoomNumber == HotelRoom.roomList.get(i).roomNumber) {\n roomNumberDuplicate = true;\n }\n }\n //if room number already exists, asks user for new input\n if (roomNumberDuplicate) {\n System.out.println(\"Room number must be unique, try again!\");\n System.out.println(\"-----------------------------\");\n }\n else {\n System.out.print(\"Number of beds: \");\n int newNumberBeds = RecInput.nextInt();\n\n System.out.print(\"Room price: \");\n int newRoomPrice = RecInput.nextInt();\n \n //new HotelRoom object is created\n HotelRoom.roomList.add(new HotelRoom(newRoomNumber, newNumberBeds, newRoomPrice, false, true, \"\"));\n System.out.println(\"Room added\");\n \n //breaking loop to exit addroom method\n addRoomLoop = false;\n }\n \n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //cleaning scanner\n RecInput.next();\n } \n }\n\n \n }", "public void addExtraGuests(Room room) {\n\t\tkeyboard.nextLine();\t\t\t\t\t\t\t\t\t\t\t\t//decide here(This option is only called if room... \n\t\tif(room.isNotFull(room)) {//if Room has a guest\t\t\t\t\t\t\t\t\t\t\t\t...is Suite or Double)\n\t\t\tSystem.out.println(\"Do you wish to add extra guests to this \"+room.getRoomType(room)+\" (YES/NO) ?\");\n\t\t\tString choice; \n\t\t\tchoice = keyboard.nextLine();\n\t\t\tGuest g = null;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if choice is Yes or Y then add extra guest\n\t\t\tif(choice.toUpperCase().contentEquals(\"YES\") || choice.toUpperCase().contentEquals(\"Y\")){\n\n\t\t\t\tif(room.getRoomType(room)==\"suite\") {\t\t\t\t\t\t//IF ROOM IS SUITE\n\t\t\t\t\tSystem.out.println(\"Would you like to add ......\\n\\t1. One more guest\\n\\t Or\\n\\t2. Two more guests\");\n\t\t\t\t\tuserChoice = keyboard.nextInt();\t\t\t\t\t\t//Ask if 1 or 2 more guests\n\t\t\t\t\t\n\t\t\t\t\tswitch(userChoice) {\t\t\t\t\t\t\t//if userChoice is 1\n\t\t\t\t\tcase 1:{\t\t\t\t\t\t\t\t\t\t//Add one extra guest to suite\n\t\t\t\t\t\tg = addGuest();\t\t\t\t\t\t\t\t//call the addGuest method above to get guest info\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\troom.addGuest(g);\t\t\t\t\t\t//Add new guest to the suite\n\t\t\t\t\t\t} catch (MyException 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}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 2:{\t\t\t\t\t\t\t\t\t\t//Add two extra guests to suite\n\t\t\t\t\t\tfor(int i=0; i<2; i++) {\n\t\t\t\t\t\t\tg = addGuest();\t\t\t\t\t\t\t//call the addGuest method above 2 times to get guests info\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\troom.addGuest(g);\t\t\t\t\t//add guests to the suite\n\t\t\t\t\t\t\t} catch (MyException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\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}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}//case2\n\t\t\t\t}//switch\n\t\t\t\t}// end of if room is Suite\n\t\t\t\t\n\t\t\t\telse if(room.getRoomType(room)==\"double room\"){\t\t//if room is Double\n\t\t\t\t\tg = addGuest();\t\t\t\t\t\t\t\t\t//call addGuest method to get guest info\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\ttry {\n\t\t\t\t\t\troom.addGuest(g);\t\t\t\t\t\t\t//add gust too room\n\t\t\t\t\t} catch (MyException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}// end of if room is double\n\t\t\t}// end of if Yes\n\t\t}//if(ROOMISNOTFULL)\n\t}", "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toString(),\r\n mChemicalDiet.getText().toString(),\r\n mTextureDiet.getText().toString(),\r\n mLiquidDiet.getText().toString(),\r\n mLikes.getText().toString(),\r\n mDislikes.getText().toString(),\r\n mNotes.getText().toString(),\r\n mMeal.getText().toString(),\r\n mDessert.getText().toString(),\r\n mBeverage.getText().toString(),\r\n RoomActivity.mFacilityKey);\r\n mFirebaseDatabaseReference.push().setValue(roomPojo);\r\n Utils.countCensus(RoomActivity.mFacilityKey);\r\n Utils.countNumRoomsFilled(RoomActivity.mHallKey, RoomActivity.mHallStart, RoomActivity.mHallEnd);\r\n }\r\n //close the dialog fragment\r\n RoomDialog.this.getDialog().cancel();\r\n }", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(2, getBranchID());\n\n try {\n\n System.out.printf(\" Room types available at %S, branch ID (%d)\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public static void main(String[] args){\r\n //Student Name:Chuanxi ZHENG\r\n //Student Number:260760794\r\n //Your code goes here. \r\n System.out.println(\"Please enter the name of your hotel:\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.nextLine();\r\n Room[] roomArray = new Room[getRandomNumberOfRooms()];\r\n for(int i = 0; i<roomArray.length;i++){\r\n roomArray[i] = new Room(getRandomType());\r\n }\r\n Hotel h = new Hotel(name,roomArray);\r\n System.out.println(\"Welcome! Please choose one of the following options\");\r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n Scanner input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n int choice = input.nextInt();\r\n \r\n while(choice!=5){\r\n //make a reservation\r\n if(choice == 1){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you like to reserve?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.createReservation(username,usertype);\r\n }\r\n //cancel a reservation\r\n if(choice == 2){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you want to cancel?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.cancelReservation(username,usertype);\r\n }\r\n //see an invoice\r\n if(choice == 3){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n h.printInvoice(username);\r\n }\r\n //see hotel information\r\n if(choice == 4){\r\n System.out.println(h.toString());\r\n }\r\n \r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n choice = input.nextInt();\r\n }\r\n \r\n //Exit the booking system\r\n if(choice == 5){\r\n System.out.println(\"It was a pleasure doing business with you!\");\r\n }\r\n }", "public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }", "public void createHotel(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"HOTEL\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ADDRESS\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs1.next() && rs2.next()){\n\n createAddress(connection, scan); // Creates an address to link HOTEL with ADDRESS\n\n String sql = \"INSERT INTO Hotel VALUES (?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a hotel name: \");\n setHotelName(scan.nextLine());\n pStmt.setString(1, getHotelName());\n\n System.out.print(\"Please provide a branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(2, getBranchID());\n\n\n System.out.print(\"Please provide a phone number: \");\n setPhone(scan.nextLine());\n pStmt.setString(3, getPhone());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelAddress(connection); // Links HOTEL with ADDRESS entities in HOTEL_ADDRESS relation\n\n do {\n createRoom(connection, scan);\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while ((String.valueOf(scan.next())).toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL or HOTEL_ADDRESS Table.\");\n }\n }", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "private void createRoom(Connection connection, Scanner scan) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"ROOM\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ROOMS\", null);\n\n if (rs1.next() && rs2.next()){\n\n String sql = \"INSERT INTO Room VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n\n System.out.print(\"Please provide the room type a name: \");\n setType(scan.nextLine());\n pStmt.setString(3, getType());\n\n System.out.print(\"Please provide a guest capacity for this type: \"); // branch id, room type, capacity\n setCapacity(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(4, getCapacity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelRoom(connection, scan);\n }\n else {\n System.out.println(\"ERROR: Error loading ROOM or HOTEL_ROOMS Table.\");\n }\n }", "public static void main(String[] args) {\n\r\n\t\tint input;\r\n\t\tSystem.out.println(\"Welcome to hotel Booking\");\r\n\t\tSystem.out.println(\"please enter size of hotel\");\r\n\t\tScanner sObj = new Scanner(System.in);\r\n\t\tint size = sObj.nextInt();\r\n\t\tif(size> 1000 ||size<0) {\r\n\t\t\tSystem.out.println(\"please enter correct size of hotel\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetHotelSize(size);\r\n\t\t\tdo{\r\n\t\t\t\tSystem.out.println(\"please enter start and end day\");\r\n\t\t\t\tint start = sObj.nextInt();\r\n\t\t\t\tint end = sObj.nextInt();\r\n\r\n\t\t\t\tif(start<0 || start>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid Start Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(end<start || end>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid end Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint room_number = room_booking(start,end);\r\n\r\n\t\t\t\tif(room_number >0 && room_number <= size) {\r\n\t\t\t\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\t\t\t\tMap<Integer,List<Integer>> booking_details = new HashMap<Integer,List<Integer>>();\r\n\t\t\t\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\t\t\t\tbooking_days.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbooking_details.put(bookingId++,booking_days);\r\n\t\t\t\t\troom_bookings.put(room_number,booking_details);\r\n\t\t\t\t\tSystem.out.println(\"Accept\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Decline\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Press 1 to continue to check room availablity or 0 to exit\");\r\n\t\t\t\tinput = sObj.nextInt();\r\n\t\t\t}while(input==1); \r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n Scanner scanner = new Scanner(System.in);\r\n \r\n RoomManager rm = new RoomManager();\r\n String text;\r\n int input = 0;\r\n while (input != 5)\r\n {\r\n System.out.println(\"1. add type, 2. add room, 3. rooms avail, 4. reserve\");\r\n input = scanner.nextInt();\r\n \r\n if (input == 1)\r\n {\r\n System.out.println(\"Enter name of room type\");\r\n text = scanner.next();\r\n rm.AddRoomType(text);\r\n }\r\n if (input == 2)\r\n {\r\n System.out.println(\"Enter room type\");\r\n text = scanner.next();\r\n double money;\r\n int roomn;\r\n System.out.println(\"Enter room number\");\r\n roomn = scanner.nextInt();\r\n System.out.println(\"Enter room cost\");\r\n money = scanner.nextDouble();\r\n rm.AddRoom(text, roomn, money);\r\n }\r\n if (input == 3)\r\n {\r\n LocalDate before = new LocalDate();\r\n LocalDate after = new LocalDate();\r\n System.out.println(\"Enter number of day from now to checkin\");\r\n int days = scanner.nextInt();\r\n before = before.plusDays(days);\r\n System.out.println(\"Enter number of day from now to checkout\");\r\n days = scanner.nextInt();\r\n after = after.plusDays(days);\r\n rm.CheckAvail(before, after);\r\n }\r\n if (input == 4)\r\n {\r\n LocalDate before = new LocalDate();\r\n LocalDate after = new LocalDate();\r\n System.out.println(\"Enter number of day from now to checkin\");\r\n int days = scanner.nextInt();\r\n before.plusDays(days);\r\n System.out.println(\"Enter number of day from now to checkout\");\r\n days = scanner.nextInt();\r\n after.plusDays(days);\r\n System.out.println(\"Enter room type\");\r\n text = scanner.next();\r\n double rmprice = rm.MakeReserve(text, before, after);\r\n System.out.println(rmprice);\r\n //rm.CheckAvail(before, after);\r\n }\r\n }\r\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private static void SetRoomUnavailable(){\n \n boolean roomUnavailableLoop = true;\n \n //loop for setting room unavailable\n while (roomUnavailableLoop == true) {\n \n //if no rooms can be made unavailable, exit loop\n if (HotelRoom.roomList.isEmpty() || HotelRoom.AllRoomsOccupied() == true){\n System.out.println(\"There are no available rooms\");\n break;\n }\n \n //printing available rooms to the user\n System.out.println(\"Here is a list of all rooms:\");\n HotelRoom.DisplayAvailableRooms();\n System.out.println(\"--------------------------------------\");\n \n //try/catch for room number input\n try {\n System.out.print(\"Enter room number: \");\n \n //asking user for room number input\n int roomMod = RecInput.nextInt();\n \n //used to check if user input matches room\n boolean roomExists = false;\n \n //looping list of room and checking if input matches valid roomnumber\n for (int i = 0; i < HotelRoom.roomList.size(); i++){\n if (roomMod == HotelRoom.roomList.get(i).roomNumber && \n HotelRoom.roomList.get(i).occupied == false && \n HotelRoom.roomList.get(i).unavailable == false){\n //setting room as unavailable\n HotelRoom.roomList.get(i).unavailable = true;\n System.out.println(\"Room number \" + HotelRoom.roomList.get(i).roomNumber + \n \" has been made unavailable until further notice.\");\n //breaking loop and exiting\n roomUnavailableLoop = false;\n\n }\n\n }\n \n //checking if input is valid\n if (roomExists == false) {\n System.out.println(\"The room you entered is invalid\");\n System.out.println(\"-----------------------------\");\n }\n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //Cleaning scanner\n RecInput.next();\n }\n }\n }", "private void linkHotelRoom(Connection connection, Scanner scan) throws SQLException {\n\n String sql = \"INSERT INTO Hotel_Rooms VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please enter the number of \" + getType() + \"s the hotel has: \");\n setQuantity(scan.nextInt());\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n pStmt.setString(3, getType());\n pStmt.setInt(4, getQuantity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally { pStmt.close(); }\n }", "public static void addHotel(String NameOfHotel) {\n System.out.print(\"Enter Hotel Name : \");\n// String hotelName = sc.next();\n// HotelReservationSystem addHot = new HotelReservationSystem(hotelName);\n nameOfHotel.add(NameOfHotel);\n }", "public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public int addRoomId() throws NumberFormatException, IOException {\n\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Room ID:\");\n\t\t\tint input = Integer.parseInt(br.readLine());\n\n\t\t\tif(input == 0) {\n\t\t\t\treturn input;\n\n\t\t\t} else if (input < 100 || input > 999) {\n\t\t\t\tSystem.out.println(\"Please enter a valid room number between 100 and 999 or enter '0' to exit to Menu\");\n\t\t\t\tcontinue;\n\n\t\t\t} else if (rooms.containsKey(input)) {\n\t\t\t\tSystem.out.println(\"This ID has already been allocated to a room!\");\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\treturn input;\n\t\t}\t\n\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.BranchOfficeList addNewBranchOfficeList();", "private void getUserBedroomsChoice() {\n int checkedChipId = mBinding.chipGroupBedrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bedroom) {\n mChipBedroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bedrooms) {\n mChipBedroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bedrooms) {\n mChipBedroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bedrooms) {\n mChipBedroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bedrooms) {\n mChipBedroomsInput = 5;\n } else {\n mChipBedroomsInput = 0;\n }\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public void fillComBox1()\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tconnection = SqlServerConnection.dbConnecter();\r\n\t\t\t\t\r\n\t\t\t\tString sql=\"select * from addLocation\";\r\n\t\t\t\tPreparedStatement pst=connection.prepareStatement(sql);\r\n\t\t\t\tResultSet rs=pst.executeQuery();\r\n\t\t\t\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\troomcombo2.addItem(rs.getString(\"RoomName\"));\r\n\t\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "public void addParticipant()\n {\n boolean addFlg = false;\n do\n {\n Scanner scan = new Scanner(System.in);\n flg = scan.nextLine();\n if(flg.equalsIgnoreCase(\"y\") || flg.equalsIgnoreCase(\"Y\"))\n {\n this.autoAdd();\n addFlg = true;\n } else if(flg.equalsIgnoreCase(\"n\")|| flg.equalsIgnoreCase(\"N\"))\n {\n System.out.println(\"Athletes ID list: \");\n switch (this.getGameType()) // print out every athletes who can join the games\n {\n case 1:\n for(int j = 0; j < swimmers.size(); j++)\n {\n System.out.println(swimmers.get(j).getId());\n }\n break;\n case 2:\n for(int j = 0; j < runners.size(); j++)\n {\n System.out.println(runners.get(j).getId());\n }\n break;\n case 3:\n for(int j = 0; j < cyclists.size(); j++)\n {\n System.out.println(cyclists.get(j).getId());\n }\n break;\n }\n for(int j = 0; j < superAthletes.size(); j++)\n {\n System.out.println(superAthletes.get(j).getId());\n }\n addFlg = true;\n this.manualAdd();\n }else {\n System.out.println(\"Invalid Typing\");\n }\n }while (!addFlg);\n }", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {\n String ids=id.getText().toString();\n \n if(nameadd.getText().isEmpty() || id.getText().isEmpty() || lev.getText().isEmpty() ||rank.getText().isEmpty() )\n JOptionPane.showMessageDialog(null,\"FILL ALL FIELDS\");\n else if(id.getText().length() !=6){\n JOptionPane.showMessageDialog(null,\"ID should be six digits\");\n }\n else{\n String query = \"insert into Lecturer (id,name,faculty,centre,department,category,building,level,rank) values('\"+id.getText()+\"','\"+nameadd.getText()+\"','\"+faccombo.getSelectedItem()+\"','\"+centrecombo.getSelectedItem()+\"','\"+deptcombo.getSelectedItem()+\"','\"+buildcombo.getSelectedItem()+\"','\"+catecombo.getSelectedItem()+\"','\"+lev.getText()+\"','\"+rank.getText()+\"')\";\n try {\n st.executeUpdate(query);\n JOptionPane.showMessageDialog(null,\"EMPLOYEE ADDED SUCCESSFULLY\");\n clearadd();\n } catch (SQLException ex) {\n Logger.getLogger(Lecturer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public void createRoom(int roomId, String featureSummary) throws NumberFormatException, IOException {\n\t\tSystem.out.println(\"Would you like to add a Standard Room or a Suite?\");\n\t\tSystem.out.println(\"1: Standard Room\");\n\t\tSystem.out.println(\"2: Suite\");\n\n\t\tint input = Integer.parseInt(br.readLine());\n\n\t\tif (input == 1) {\n\t\t\tSystem.out.println(\"Creating Standard Room...\");\n\t\t\tcreateStandardRoom(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else if (input == 2) {\n\t\t\tSystem.out.println(\"Creating Suite...\");\n\t\t\tcreateSuite(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Please select a valid option\\n\");\n\t\t\tcreateRoom(roomId, featureSummary);\n\t\t} \n\n\t}", "public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }", "public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }", "@Override\r\n\tpublic ErrorCode reserveRoom(\r\n\t\t\tString guestID, String hotelName, RoomType roomType, SimpleDate checkInDate, SimpleDate checkOutDate,\r\n\t\t\tlong resID) {\n\t\tErrorAndLogMsg m = clientProxy.reserveHotel(\r\n\t\t\t\tguestID, hotelName, roomType, checkInDate, checkOutDate, \r\n\t\t\t\t(int)resID);\r\n\t\t\r\n\t\tSystem.out.print(\"RESERVE INFO:\");\r\n\t\tm.print(System.out);\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\treturn m.errorCode();\r\n\t}", "private void getUserBathroomsChoice() {\n int checkedChipId = mBinding.chipGroupBathrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bathroom) {\n mChipBathroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bathrooms) {\n mChipBathroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bathrooms) {\n mChipBathroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bathrooms) {\n mChipBathroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bathrooms) {\n mChipBathroomsInput = 5;\n } else {\n mChipBathroomsInput = 0;\n }\n }", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine();\n while (name.length() > 0) {\n if(name.equals(\"sword\")){\n room.add(new Sword());\n }\n else{\n room.add(new Thing(name));\n }\n name = in.nextLine();\n \n }\n }", "private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void ReuseMethodsforDPRcheckavailabitlity(String Enterrooms, String roomtype) throws IOException, InterruptedException, ParseException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSeleniumRepo.driver.navigate().refresh();\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }", "public void registerPoll(){\n\t\tSystem.out.println(\"what company is the survey?\");\n\t\tSystem.out.println(theHolding.serviceCompanys());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Please rate from 1 to 5 each of the following items\");\n\t\t System.out.println(\"Service rendered:\");\n\t\t int serviceRendered = reader.nextInt();\n\t\t reader.nextLine();\n\t\t System.out.println(\"Response time:\");\n\t\t int responseTime = reader.nextInt();\n\t\t reader.nextLine();\n\t\t System.out.println(\"Cost-benefit:\");\n\t\t int costBenefit = reader.nextInt();\n\t\t reader.nextLine();\n\t\t Poll toAdd = new Poll(serviceRendered, responseTime, costBenefit);\n\t\t System.out.println(theHolding.addPoll(selected, toAdd));\n\t\t}\n\t}", "private void getUserRoomChoice() {\n int checkedChipId = mBinding.chipGroupRooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_room) {\n mChipRoomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_rooms) {\n mChipRoomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_rooms) {\n mChipRoomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_rooms) {\n mChipRoomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_rooms) {\n mChipRoomsInput = 5;\n } else {\n mChipRoomsInput = 0;\n }\n }", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "private static void addNewBook(){\n\t\tSystem.out.println(\"===Add New Book===\");\n\t\tBookDetails new_book = new BookDetails();\n\t\tScanner string_input = new Scanner(System.in); //takes string input from user\n\t\tScanner integer_input = new Scanner(System.in); //takes integer input from user\n\t\t\n\t\tSystem.out.println(\"Enter BookId: \");\n\t\tint bookId = getIntegerInput(); //ensures user input is an integer value\n\t\t/*if bookId entered already exists then continually ask user to enter bookId until a bookId that does not exist is entered. \n\t\t * Do the same if bookId is less than 1 because book's in the library will not have Id's less than 1.*/\n\t\twhile(ALL_BOOKS.containsKey(bookId) || bookId < 1){\n\t\t\tSystem.out.println(\"Book Id entered already exists! Enter BookId: \");\n\t\t\tbookId = integer_input.nextInt();\n\t\t}\n\t\tnew_book.setBookId(bookId);\n\t\t\n\t\tSystem.out.println(\"Enter Book Title: \");\n\t\tString bookTitle = string_input.nextLine();\n\t\tnew_book.setBookTitle(bookTitle);\n\t\t\n\t\tString author_firstname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's First Name: \");\n\t\t\tauthor_firstname = string_input.next();\n\t\t}while(!new_book.setAuthorFirstName(author_firstname)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tString author_middlename;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's Middle Name (Type 'null' if author has no middle name): \");\n\t\t\tauthor_middlename = string_input.next();\n\t\t}while(!new_book.setAuthorMiddleName(author_middlename)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tString author_lastname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's Last Name: \");\n\t\t\tauthor_lastname = string_input.next();\n\t\t}while(!new_book.setAuthorLastName(author_lastname)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tstring_input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Book's Publisher: \");\n\t\tString publisher = string_input.nextLine();\n\t\tnew_book.setPublisher(publisher);\n\t\t\n\t\t\n\t\t/*Set book's genre. Valid values for a book's Genre are Biology, Mathematics, Chemistry, Physics,\n\t\t * Science_Fiction, Fantasy, Action, Drama, Romance, Horror, History, Autobiography, Biography.*/\n\t\tString genre;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Book's Genre: \");\n\t\t\tgenre = string_input.next();\n\t\t}while(!new_book.setGenre(genre)); //loop until valid genre value is entered\n\t\t\n\t\t/*Set book's condition. Valid values for a book's Condition are New, Good, Worn, Damaged.*/\n\t\tString condition;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Book's Condition: \");\n\t\t\tcondition = string_input.next();\n\t\t}while(!new_book.setCondition(condition)); //loop until valid value for condition is entered\n\t\t\n\t\tALL_BOOKS.put(new_book.getBookId(), new_book);\n\t\taddToPublisherTable(new_book.getPublisher(), new_book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\taddToGenreTable(new_book, new_book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\taddToAuthorTable(new_book.getAuthor().toString(), new_book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\tSystem.out.println(\"Book Successfully Added!\");\n\t}", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public void populateRooms(){\n }", "public static void main(String[] args) {\n CustomerLoginView loginView = new CustomerLoginView();\n NewCustomerView newCustomerView = new NewCustomerView();\n MainView mainView = new MainView(loginView);\n Hotel hotel = new Hotel();\n System.out.println(String.format(\"Welcome to %s!\", hotel.getName()));\n System.out.println(\"Begin by selecting the number of rooms you'd like to request\");\n \n Scanner scanner = new Scanner(System.in);\n int numOfReservations = Integer.parseInt(scanner.nextLine());\n \n int counter = 1;\n while(counter <= numOfReservations) {\n hotel.requestRoom(counter);\n counter++;\n }\n scanner.close();\n System.out.println(hotel);\n }", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "private void EnterChange() {\r\n\r\n //try block to check if the customer enters an except integer for the Time field\r\n try{\r\n // create a reservation\r\n Reservation p1 = new Reservation(textName.getText(), Integer.parseInt(textTime.getText()));\r\n // TODO: add obj to arraylist\r\n _ReservationList.saveData(p1);\r\n\r\n }\r\n catch (Exception e){\r\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Please type an Integer only. For Example, to book for 7:00 p.m, type just 7.\");\r\n alert.showAndWait();\r\n return;\r\n }\r\n }", "public void createHotel(String name, int numberSingleRooms,int numberDoubleRooms, double priceSingleRooms,\r\n\t\t\tdouble priceDoubleRooms, int category, UUID userID, int postalCode, String adress) {\r\n\t\tif(session instanceof Hotelier) {\t\t// nur erlaubt für Hoteliers\r\n\t\t\tHotel hotel=new Hotel(name, numberSingleRooms, numberDoubleRooms, priceSingleRooms, \r\n\t\t\t\t\tpriceDoubleRooms, category, userID, postalCode, adress);\r\n\t\t\tfor (int i=0;i<numberDoubleRooms;i++) {\t\t\t// erstelllt und speichert die Zimmer des Hotels (param: HotelID, RoomType, bookedDates)\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),0, new ArrayList <DateTime>());\r\n\t\t\t}\r\n\t\t\tfor (int i=0;i<numberSingleRooms;i++) {\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),1, new ArrayList <DateTime>());\r\n\t\t\t}\t\t\r\n\t\t\thotelDAO.saveHotel(hotel);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnew IllegalArgumentException(\"Die Aktion 'createHotel' kann nur von einem Hotelier durchgeführt werden.\");\r\n\t\t}\r\n\t}", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine().trim();\n while (name.length() > 0) {\n if(name.equals(\"space gun\")){\n room.add(new SpaceGun());\n } else if(name.equals(\"lightsaber\")){\n room.add(new LightSaber());\n } else if(name.equals(\"pillow\")){\n room.add(new Pillow());\n } else if(name.equals(\"blankets\")){\n room.add(new Blankets());\n } else if(name.equals(\"Charlie McDowell\")){\n room.add(new HorrificBeast());\n } else if(name.equals(\"cryonics files\")){\n room.add(new CryoFiles());\n } else if(name.equals(\"coding transcripts\")){\n room.add(new CodingTranscripts());\n } else if(name.equals(\"bananas\")){\n room.add(new Bananas());\n } else if(name.equals(\"transmitter\")){\n room.add(new Transmitter());\n } else {\n room.add(new Thing(name));\n }\n name = in.nextLine().trim(); \n }\n }", "void askLobbyID(ArrayList<Lobby> lobbies);", "public void select_Rooms(String Enterrooms) throws InterruptedException, IOException\r\n\t{\r\n\t\t\r\n\t\tExplicitWait(select_rooms);\r\n\r\n\t\tif (select_rooms.isEnabled()) \r\n\t\t{\r\n\t\t\t//select_rooms.isDisplayed();\r\n\t\t\t/*select_rooms.click();\r\n\t\t\tSeleniumRepo.WaitForLoad(100);*/\r\n\t\t\tSeleniumRepoDropdown.selectDropDownValue(select_rooms, Enterrooms);\r\n\t\t\tlogger.info(\"rooms selected\");\r\n\t\t\ttest.log(Status.PASS, \"rooms selected\");\r\n\r\n\t\t} else \r\n\t\t{\r\n\t\t\t//System.out.println(\"Unable to select rooms\");\r\n\t\t\tlogger.error(\"Unable to select rooms\");\r\n\t\t\ttest.log(Status.FAIL, \" Unable to select rooms\");\r\n\r\n\t\t}\r\n\t\t\r\n\t\tint numberOfRooms = Integer.parseInt(Enterrooms);\t\r\n\t\tSystem.out.println(\"guest rooms \" + numberOfRooms);\r\n\r\n\r\n\t\t//Not sure what this is meant for but it will always return 1\r\n\t\tint adultslength = Listselect_adults.size();\r\n\t\tSystem.out.println(\"guest rooms sdult size \" + adultslength);\r\n\r\n\t\tfor(int j=1;j<=numberOfRooms;j++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"This is the value of j = \" + j);\r\n\t\t\t\r\n\t\t\tString minnoofadults = ReadProperties.getPropValues(\"Admin.properties\", \"MINnoofadults\");\t\r\n\t\t\tString maxnoofadults = ReadProperties.getPropValues(\"Admin.properties\", \"MAXnoofadults\");\r\n\t\t\tif (SeleniumRepo.driver.findElement(By.xpath(\"(//*[starts-with(@id,'adults-in-room')])[\"+j+\"]\")).isDisplayed()) \r\n\t\t\t{\r\n\t\t\t\tSeleniumRepo.driver.findElement(By.xpath(\"(//*[starts-with(@id,'adults-in-room')])[\"+j+\"]\")).sendKeys(Integer.toString(\r\n\t\t\t\t\t\tSeleniumRepo.getRandomNumberInRange(Integer.parseInt(minnoofadults), Integer.parseInt(maxnoofadults))));\r\n\t\t\t\t//System.out.println(\"adults is entered successfully\");\r\n\t\t\t\tlogger.info(\"adults is entered successfully\");\r\n\t\t\t\ttest.log(Status.INFO, \"adults is entered successfully\");\r\n\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"adults dropdown not found\");\r\n\t\t\t\tlogger.error(\"adults dropdown not found\");\r\n\t\t\t\ttest.log(Status.FAIL, \"adults dropdown not found\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//NOt sure how this is suppouse to work with the for loop below but it will always have a value of 1\r\n//\t\tint childrenslength = Listselect_childrens.size();\r\n//\t\t//System.out.println(childrenslength);\r\n//\r\n//\t\tfor(int i=1;i<=numberOfRooms;i++)\r\n//\t\t{\r\n//\t\t\tSystem.out.println(\"This is the value of i = \" + i);\r\n//\r\n//\t\t\tString minnoofchildrens = ReadProperties.getPropValues(\"Admin.properties\", \"MINnoofchildrens\");\r\n//\t\t\tString maxnoofchildrens = ReadProperties.getPropValues(\"Admin.properties\", \"MAXnoofchildrens\");\r\n//\t\t\tif (SeleniumRepo.driver.findElement(By.xpath(\"(//*[starts-with(@id,'children-in-room')])[\"+i+\"]\")).isDisplayed()) {\r\n//\t\t\t\tSeleniumRepo.driver.findElement(By.xpath(\"(//*[starts-with(@id,'children-in-room')])[\"+i+\"]\")).sendKeys(Integer.toString(\r\n//\t\t\t\t\t\tSeleniumRepo.getRandomNumberInRange(Integer.parseInt(minnoofchildrens), Integer.parseInt(maxnoofchildrens))));\r\n//\t\t\t\t//System.out.println(\"childrens is entered successfully\");\r\n//\t\t\t\tlogger.info(\"childrens is entered successfully\");\r\n//\t\t\t\ttest.log(Status.INFO, \"childrens is entered successfully\");\r\n//\r\n//\t\t\t}\r\n//\t\t}\r\n\r\n\t\tThread.sleep(2000);\t\r\n\t\tif (roomselectiondone.isEnabled()) \r\n\t\t{\r\n\t\t\troomselectiondone.isDisplayed();\r\n\t\t\troomselectiondone.click();\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tThread.sleep(5000);\r\n\t\t\t//System.out.println(\"Clicked on done\");\r\n\t\t\tlogger.info(\"Clicked on done\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on done\");\r\n\t\t}\r\n\r\n\t\telse \r\n\t\t{\r\n\t\t\t//System.out.println(\"Done Button Not found\");\r\n\t\t\tlogger.error(\"Done Button Not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Done Button Not found\");\r\n\r\n\t\t}\r\n\t}", "public void gestionDeHotel() {\n\t\t\n\t\t/**\n\t\t * A method for the gestion of the hotel\n\t\t */\n\t\t\t\tthis.afficheMenu();\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tString choix = \"\";\n\t\t\t\t\n\t\t\t\twhile( this.isOuvert() ) {\n\t\t\t\t\tString rep = this.optionsManager();\n\t\t\t\t\t\n\t\t\t\t\tif(rep.equals(\"o\")) {\n\t\t\t\t\t\tthis.afficheMenu();\n\t\t\t\t\t}else if(rep.equals(\"q\")) {\n\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if (rep.equals(\"x\")) {\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.err.print(\"----------------------------\\nVotre sasie est incorrect! |\\n----------------------------\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (rep.equals(\"f\")){\n\t\t\t\t\t\tString verif = this.reserver();\n\t\t\t\t\t\tif(verif.equals(\"q\")) {\n\t\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tSystem.err.print(verif);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (rep.equals(\"g\")){\n\t\t\t\t\t\tthis.liberateAroom();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(rep);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\twhile(!this.isOuvert()) {\n\t\t\t\t\tString etatDeHotel = this.isOuvert()? \"L'Hôtel est ouvert ! \" : \"L'Hôtel n'est pas ouvert ! \";\t\t\n\t\t\t\t\tString rep = this.optionsManager();\n\t\t\t\t\tif(rep.equals(\"o\")) {\n\t\t\t\t\t\tthis.afficheMenu();\n\t\t\t\t\t}else if(rep.equals(\"\\n\"+etatDeHotel+\"\\n\")){\n\t\t\t\t\t\tSystem.out.print(rep);\n\t\t\t\t\t}\n\t\t\t\t\telse if(rep.equals(\"q\")) {\n\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if (rep.equals(\"\\n-La commande Q ou Quit sont pour arrêtrer le programe.\\n-Il faut choisir un letter pour les options.\\n-La commande O pour afficher toutes les options possibles! \")) {\n\t\t\t\t\t\tSystem.out.println(rep);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.err.print(\"\\n-------------------------------------------------------------------------\\nDésolé, l'hôtel est fermé!\\nVous pouvez utiliser que l'option |o| et |Q ou Quit|\\n-------------------------------------------------------------------------\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t}", "public void addRoom(Chatroom room){\n\n }", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "private static void addNewBooking() {\n ArrayList<Customer> listCustomer = FuncFileCSVCustomer.getFileCSVToListCustomer();\n listCustomer.sort(new CustomerSort());\n int i = 1;\n for (Customer customer : listCustomer) {\n System.out.println(\"-------------------------\");\n System.out.println(\"Customer \" + i + \" : \");\n System.out.println(customer.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Customer Booking\");\n Customer customer = listCustomer.get(scanner.nextInt() - 1);\n scanner.nextLine();\n System.out.println(\"\\n1. Booking Villa.\" +\n \"\\n2. Booking House.\" +\n \"\\n3. Booking Room.\");\n System.out.println(\"Choose Service Booking\");\n String choose = scanner.nextLine();\n switch (choose) {\n case \"1\":\n i = 1;\n ArrayList<Villa> listVilla = FuncFileCSVVilla.getFileCSVToListVilla();\n for (Villa villa : listVilla) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(villa.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Villa Booking\");\n int chooseVillaBooking;\n chooseVillaBooking = scanner.nextInt();\n Villa villa = listVilla.get(chooseVillaBooking - 1);\n customer.setService(villa);\n break;\n case \"2\":\n i = 1;\n ArrayList<House> listHouse = FuncFileCSVHouse.getFileCSVToListHouse();\n for (House house : listHouse) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(house.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose House Booking\");\n int chooseHouseBooking;\n chooseHouseBooking = scanner.nextInt();\n House house = listHouse.get(chooseHouseBooking - 1);\n customer.setService(house);\n break;\n case \"3\":\n i = 1;\n ArrayList<Room> listRoom = FuncFileCSVRoom.getFileCSVToListRoom();\n for (Room room : listRoom) {\n System.out.println(\"-------------------------\");\n System.out.println(\"No : \" + i);\n System.out.println(room.showInfo());\n System.out.println(\"-------------------------\");\n i++;\n }\n System.out.println(\"Choose Room Booking\");\n int chooseRoomBooking;\n chooseRoomBooking = scanner.nextInt();\n Room room = listRoom.get(chooseRoomBooking - 1);\n customer.setService(room);\n break;\n default:\n System.out.println(\"Nhap sai, quay ve menu.\");\n backToMenu();\n break;\n\n }\n //bi ghi de do get ra khong duoc\n ArrayList<Customer> listCustomerBooking = FuncFileCSVBooking.getFileCSVToListBooking();\n //???????????????????? get tu file ra khong duoc\n listCustomerBooking.add(customer);\n FuncFileCSVBooking.writeBookingToFileCSV(listCustomerBooking);\n displayMainMenu();\n }", "public void addRoomWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 140, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 140, 100, 28);\n\n JLabel jLabelIdSite = new JLabel(\"Selectionner le site où ajouter la salle à créer : \");\n jLabelIdSite.setBounds(20, 20, 250, 28);\n\n ArrayList<String> site = controllerAdmin.getAllNamesSite();\n String[] strSite = new String[site.size()];\n for (int j = 0; j < site.size(); j++) {\n strSite[j] = site.get(j);\n }\n JComboBox jComboBoxSelectSite = new JComboBox(strSite);\n jComboBoxSelectSite.setBounds(280, 20, 200, 28);\n\n JLabel jLabelIdRoom = new JLabel(\"Saissisez l'ID de la salle : \");\n jLabelIdRoom.setBounds(20, 48, 250, 28);\n\n JTextField jTextFiedlIdRoom = new JTextField();\n jTextFiedlIdRoom.setBounds(280, 48, 200, 28);\n\n JLabel jLabelName = new JLabel(\"Saissisez le nom de la salle : \");\n jLabelName.setBounds(20, 80, 280, 28);\n\n JTextField jTextFiedldName = new JTextField();\n jTextFiedldName.setBounds(280, 80, 200, 28);\n\n JLabel jLabelCapacity = new JLabel(\"Saissisez la capacite de la salle : \");\n jLabelCapacity.setBounds(20, 108, 250, 28);\n\n JTextField jTextFiedldCapacity = new JTextField();\n jTextFiedldCapacity.setBounds(280, 108, 200, 28);\n\n addFrame.add(jLabelIdSite);\n addFrame.add(jComboBoxSelectSite);\n addFrame.add(jLabelIdRoom);\n addFrame.add(jTextFiedlIdRoom);\n addFrame.add(jLabelName);\n addFrame.add(jTextFiedldName);\n addFrame.add(jLabelCapacity);\n addFrame.add(jTextFiedldCapacity);\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Room rm = new Room();\n Site site = new Site();\n assert rm != null;\n if(!jTextFiedldName.getText().equals(\"\") && !jTextFiedldCapacity.getText().equals(\"\")){\n if(!rm.alreadyExist(jTextFiedlIdRoom.getText())){\n Room room = new Room(jTextFiedlIdRoom.getText(), Integer.parseInt(jTextFiedldCapacity.getText()), jTextFiedldName.getText(), site.findByName(Objects.requireNonNull(jComboBoxSelectSite.getSelectedItem()).toString()).getIdSite());\n room.createRoom();\n addFrame.dispose();\n }}\n else {\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n System.out.println(\"Erreur de saisie des informations\");\n addRoomWindow(controllerAdmin);\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n }\n });\n\n addFrame.setTitle(\"Ajout d'une salle\");\n addFrame.setSize(600,200);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "private static void ownerLoop() \n {\n boolean exit = false;\n Scanner input = new Scanner(System.in);\n\n while (!exit) {\n displayOwner();\n\n String[] tokens = input.nextLine().toLowerCase().split(\"\\\\s\");\n char option = tokens[0].charAt(0);\n char dataOpt = 0;\n\n if (tokens.length == 2)\n dataOpt = tokens[1].charAt(0);\n\n switch(option) {\n case 'o': occupancyMenu();\n break;\n case 'd': revenueData();\n break;\n case 's': browseRes();\n break;\n case 'r': viewRooms();\n break;\n case 'b': exit = true;\n break;\n }\n }\n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "@PostMapping(value=\"/insert/hotel\", consumes=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseClient insertNewRoom(@RequestBody Hotel hotel){\r\n\t\thotelSer.save(hotel);\r\n\t\tResponseClient res = new ResponseClient();\r\n\t\tres.setResponse(\"successfull hotel_id: \");\r\n\t\treturn res;\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == mBtnEnterRoom) {\n\t\t\tint dwRoomId=0;\n\t\t\tString strRoomId = mTxtRoomId.getText();\n\t\t\tif (strRoomId.length() == 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入房间号\", \"错误\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t} else {\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t dwRoomId = Integer.valueOf(strRoomId);\n\t\t\t\t}\n\t\t\t\tcatch (Exception k) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tSystem.out.println(k.toString());\n\t\t\t\t\tdwRoomId=0;\n\t\t\t\t}\n\t\t\t\tif(dwRoomId!=0)\n\t\t\t\t anychat.EnterRoom(dwRoomId, \"\");\n\t\t\t}\n\t\t}\n\t\tif (e.getSource() == mBtnExit) {\n\t\t\tanychat.Release();\n\t\t\tthis.dispose();\n\t\t}\n\t\tif(e.getSource()==mBtnRoom1)\n\t\t{\n\t\t\tanychat.EnterRoom(1, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom2)\n\t\t{\n\t\t\tanychat.EnterRoom(2, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom3)\n\t\t{\n\t\t\tanychat.EnterRoom(3, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom4)\n\t\t{\n\t\t\tanychat.EnterRoom(4, \"\");\n\t\t}\n\t}", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public void displayaroominfo(int roomno ){\n String query = \" SELECT Roomno, Reserved , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Roomno = ? \"; \n String status , Roomtype ;\n \n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setInt(1 ,roomno);\n ResultSet rs = Query.executeQuery();\n Room room;\n while(rs.next()){\n if(rs.getInt(\"RoomtypeID\") == 1){Roomtype = \"Single Room\" ;}\n else{Roomtype = \"Double Room\";}\n if(rs.getBoolean(\"Reserved\") == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\");\n if(rs.getInt(\"RoomtypeID\") == 1){\n room = new singleRoom();\n }else{\n room = new doubleRoom();\n }\n room.setroominfo(str);\n \n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void updateAvailability(String type) {\n\t\tString title = \"\";\n\t\tif (startDate != null & endDate != null) {\n\t\t\ttitle = \"Available Rooms \" + formatDate(startDate) + \" - \" + formatDate(endDate);\n\t\t}\n\t\tavailabilityDisplay.setText(guestModel.getRooms(type));\n\n\t\tavailabilityLabel.setText(title);\n\t\tadd(availabilityLabel);\n\t}", "private void enterRoom() {\n connect();\n\n clientName = nameTextFiled.getText();\n try {\n toServer.writeInt(ENTERROOM);\n toServer.writeUTF(clientName);\n toServer.flush();\n report(\"Client ----> Server: \" + ENTERROOM + \" \" + clientId + \" \" + nameTextFiled.getText());\n\n clientFrame.setTitle(clientName);\n btnNewGame.setEnabled(true);\n\n// loginPanel.setVisible(false);\n// centerPanel.setVisible(true);\n // disable the login frame component\n nameTextFiled.removeActionListener(clientAction);\n nameTextFiled.setEnabled(false);\n btnEnterRoom.removeActionListener(clientAction);\n btnEnterRoom.setEnabled(false);\n\n // close the login frame\n loginFrame.setVisible(false);\n loginFrame.dispose();\n\n // open the client frame\n clientFrame.setVisible(true);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void addNewPassenger() throws SQLException {\n\t\tScanner input = new Scanner(System.in);\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = connUtil.getConnection();\n\t\t\t// call needed DAOs here\n\t\t\tPassengerDAO pdao = new PassengerDAO(conn);\n\t\t\tFlightDAO fdao = new FlightDAO(conn);\n\t\t\tRouteDAO rdao = new RouteDAO(conn);\n\t\t\tAirportDAO apodao = new AirportDAO(conn);\n\t\t\tAirplaneDAO apldao = new AirplaneDAO(conn);\n\n\t\t\tPassenger passenger = new Passenger();\n\t\t\tpassenger.setId(pdao.nextAvailableId());\n\t\t\tpassenger.setBookingId(1);\n\n\t\t\t// Sets passenger name\n\t\t\tSystem.out.println(\"Enter the passenger given name\");\n\t\t\tpassenger.setGivenName(input.nextLine());\n\t\t\tSystem.out.println(\"Enter the passenger family name\");\n\t\t\tpassenger.setFamilyName(input.nextLine());\n\n\t\t\t// Sets birthday\n\t\t\tSystem.out.println(\"Enter DOB (yyyy-mm-dd)\");\n\t\t\tDate date = Date.valueOf(input.nextLine());\n\t\t\tpassenger.setDob(date);\n\n\t\t\t// Sets gender\n\t\t\tSystem.out.println(\"Enter gender (male/female/other)\");\n\t\t\tpassenger.setGender(input.nextLine());\n\n\t\t\t// Sets address\n\t\t\tSystem.out.println(\"Enter the address of the passenger\");\n\t\t\tpassenger.setAddress(input.nextLine());\n\n\t\t\t// Adds passenger to passenger table\n\t\t\tpdao.addPassenger(passenger);\n\n\t\t\tconn.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tconn.rollback();\n\t\t} finally {\n\t\t\tconn.close();\n\t\t}\n\t}", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public void updateResv(RoomMgr rm, Reservation r, int choice, int numGuest) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tLocalDate localDateNow = LocalDate.now();\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd-MMM-yyyy\");\n\t\t\n\t\tswitch (choice) {\n\t\tcase 1:\n\t\t\trm.viewAllVacantRoom(numGuest);\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter Room No to book: \");\n\t\t\t\tString roomNo = sc.nextLine();\n\t\t\t\tif (rm.checkRoomEmpty(roomNo)) {\n\t\t\t\t\tr.setRoomNo(roomNo);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Error input!\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tint adultNo = errorCheckingInt(\"Enter number of adult: \");\n\t\t\tr.setAdultNo(adultNo);\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tint kidNo = errorCheckingInt(\"Enter number of kids: \");\t\n\t\t\tsc.nextLine();\n\t\t\tr.setKidNo(kidNo);\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter date check-in (dd-MM-yyyy): \");\n\t\t\t\tString dateIn = sc.nextLine();\n\n\t\t\t\ttry {\n\t\t\t\t\tLocalDate localDateIn = LocalDate.parse(dateIn, format);\n\t\t\t\t\tif (localDateIn.isBefore(localDateNow)) {\n\t\t\t\t\t\tSystem.out.println(\"Error input. Check in date must be after today!\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(format.format(localDateIn));\n\t\t\t\t\tr.setDateCheckIn(localDateIn);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (DateTimeParseException e) {\n\t\t\t\t\tSystem.out.println(\"Error input. dd-MM-yyyy = 01-02-2018\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter date check-out (dd-MM-yyyy): \");\n\t\t\t\tString dateOut = sc.nextLine();\n\n\t\t\t\ttry {\n\n\t\t\t\t\tLocalDate localDateOut = LocalDate.parse(dateOut, format);\n\t\t\t\t\tif (localDateOut.isBefore(localDateNow)) {\n\t\t\t\t\t\tSystem.out.println(\"Error input. Check in date must be after today!\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(format.format(localDateOut));\n\t\t\t\t\tr.setDateCheckOut(localDateOut);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (DateTimeParseException e) {\n\t\t\t\t\tSystem.out.println(\"Error input. dd-MM-yyyy = 01-02-2018\");\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase 6:\n\t\t\tSystem.out.printf(\"\\n===>Please select from the following:\\n\");\n\t\t\tSystem.out.println(\"(1) \" + rStatus[0]);\n\t\t\tSystem.out.println(\"(2) \" + rStatus[1]);\n\t\t\tSystem.out.println(\"(3) \" + rStatus[2]);\n\t\t\tSystem.out.println(\"(4) \" + rStatus[3]);\n\t\t\tSystem.out.println(\"(5) Return\");\n\t\t\tchoice = errorCheckingInt(\"Select option: \", 5);\n\t\t\tsc.nextLine();\n\n\t\t\tif (choice != 5) {\n\t\t\t\tr.setResvStatus(rStatus[choice - 1]);\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Returning.....\");\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"Error input\");\n\t\t\tbreak;\n\n\t\t}\n\t}", "public static void main(String[] args) throws Exception{\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Restaurant API Menu\");\n System.out.println(\"1. Get all menu sections\");\n System.out.println(\"2. Get a menu section by ID\");\n System.out.println(\"3. Add a new menu section\");\n System.out.println(\"4. Edit a menu section\");\n System.out.println(\"5. Delete a menu section\");\n System.out.println(\"6. Exit\");\n // continously print the menu, until the user quits\n while(sc.hasNextLine()) {\n // if input 1, go to getAll which calls the doGetList method that\n // shows all the records in the database\n String input = sc.nextLine();\n if (input.equals(\"1\")) {\n System.out.println(\"Response Body:\");\n System.out.println(getAll());\n }\n // if input 2, use read method to get the result from doGet method\n if (input.equals(\"2\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Response Body:\");\n System.out.println(read(id));\n }\n // if input 3, use assign method to get the result from doPost method\n if (input.equals(\"3\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Please insert the name\");\n String name = sc.nextLine();\n Result r = new Result();\n Boolean flag = assign(name, id, r);\n // print the error info when the user tends to add new menue which has the \n // id that already in the database\n if (flag == false) {\n System.out.println(\"Response Body:\");\n System.out.println(\"fail to add, there already exists a record with the same id\");\n }\n \n }\n // if input 3, use edit method to get the result from doPut method\n if (input.equals(\"4\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Please insert the name\");\n String name = sc.nextLine(); \n Boolean flag = edit(name, id);\n // print the error info when the user tends to edit menue which has the \n // id that not in the database\n if (flag == false) {\n System.out.println(\"Response Body:\");\n System.out.println(\"fail to edit, there isn't a record with the id\");\n }\n }\n // if input 3, use clear method to call doDelete method\n if (input.equals(\"5\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n Boolean flag = clear(id);\n JSONObject json = new JSONObject();\n json.put(\"success\", flag);\n System.out.println(json.toString());\n }\n // if input 6, quit\n if (input.equals(\"6\")) {\n System.out.println(\"quitting the client...\");\n break;\n }\n System.out.println();\n System.out.println(\"Restaurant API Menu\");\n System.out.println(\"1. Get all menu sections\");\n System.out.println(\"2. Get a menu section by ID\");\n System.out.println(\"3. Add a new menu section\");\n System.out.println(\"4. Edit a menu section\");\n System.out.println(\"5. Delete a menu section\");\n System.out.println(\"6. Exit\");\n }\n }", "private void createOrderMenu()\n {\n String phoneEmployee = null;\n String phoneCustomer = null;\n HashMap<String, Integer> barcodes = new HashMap<>();\n boolean quit = false;\n\n while(!quit) {\n printCreateOrderMenu();\n int input = getInput();\n switch(input) {\n case 0: \n quit = true;\n break;\n case 1: \n phoneEmployee = addPerson();\n break;\n case 2: \n phoneCustomer = addPerson();\n break;\n case 3: \n addProduct(barcodes);\n break;\n case 4: \n quit = createOrder(phoneEmployee, phoneCustomer, barcodes);\n break;\n default: \n System.out.println(\"Vælg et tal fra menuen.\");\n System.out.println(\"\");\n break;\n }\n }\n\n }", "public void check_choice(int ch)\n\t{\n\t\tswitch(ch)\n\t\t{\n\t\t\t//Case 1 for Add values\n\t\t\tcase 1:\n\t\t\t\t//Getting inputs from user\n\t\t\t\tSystem.out.println(\"Enter First Name :\");\n\t\t\t\tfirst_name=me.next();\n\t\t\t\tSystem.out.println(\"Enter Last Name :\");\n\t\t\t\tlast_name=me.next();\n\t\t\t\tSystem.out.println(\"Enter Address :\");\n\t\t\t\taddress=me.next();\n\t\t\t\tSystem.out.println(\"Enter State :\");\n\t\t\t\tstate=me.next();\n\t\t\t\tSystem.out.println(\"Enter City :\");\n\t\t\t\tcity=me.next();\n\t\t\t\tSystem.out.println(\"Enter Pin Code :\");\n\t\t\t\tpincode=me.next();\n\t\t\t\tSystem.out.println(\"Enter Mobile Number :\");\n\t\t\t\tmobile_no=me.next();\n\n\t\t\t\t//Getting size of arraylist\n\t\t\t\tsize=arr.size();\n\t\t\t\t\n\t\t\t\t//Adding data to arraylist with separations\n\n\t\t\t\tarr.add(first_name+\" | \"+last_name+\" | \"+address+\" | \"+state+\" | \"+city+\" | \"+pincode+\" | \"+mobile_no);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Added successfully\");\n\n\t\t\t\t//Calling method for displaying data in list\n\t\t\t\tthis.show_book();\n\n\t\t\t\t//Calling method for displaying main menu\n\t\t\t\tthis.main_menu();\n\t\t\t\tbreak;\n\n\t\t\t//Case 2 for Update values\n\t\t\tcase 2:\n\n\t\t\t\t//Getting size of arraylist\n\t\t\t\tsize=arr.size();\n\n\t\t\t\t//Checking size of arraylist\n\t\t\t\tif(size>0)\n\t\t\t\t{\n\t\t\t\t\t//Calling method for displaying data in list\n\t\t\t\t\tthis.show_book();\n\n\t\t\t\t\t//Getting input for update\n\t\t\t\t\tSystem.out.println(\"Select serial number to update\");\n\t\t\t\t\tupdate_no=me.nextInt();\n\n\t\t\t\t\t//Getting data from user selected serial number\n\t\t\t\t\tString line=arr.get(update_no-1);\n\n\t\t\t\t\t//Breaking string by using delimeter & converting to array\n\t\t\t\t\tString[] words = line.split(\"\\\\|\");\n\n\t\t\t\t\t//Checking serial number and size\n\t\t\t\t\tif(update_no>0 && update_no<=size)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Displaying & getting fields to select for update\n\t\t\t\t\t\tSystem.out.println(\"Select field you want to update\");\n\t\t\t\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\t\t\t\tSystem.out.print(\"1.First Name \\n2.Last Name \\n3.Address \\n4.State \\n5.City \\n6.Pin Code \\n7.Mobile No \\n8.Main Menu\\n\");\n\t\t\t\t\t\tSystem.out.println(\"===========================================================\");\n\t\t\t\t\t\tfield=me.nextInt();\n\t\t\t\t\t\tif(field==8)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.main_menu();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(field>=1 && field<=7)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Getting value for field\n\t\t\t\t\t\t\tSystem.out.println(\"Enter value you want to Update\");\n\t\t\t\t\t\t\tnew_val=me.next();\n\n\t\t\t\t\t\t\t//Updating string by index\n\t\t\t\t\t\t\twords[field-1]=new_val;\n\n\t\t\t\t\t\t\t//Updating value of array list\n\t\t\t\t\t\t\tarr.set(update_no-1, words[0]+\" | \"+words[1]+\" | \"+words[2]+\" | \"+words[3]+\" | \"+words[4]+\" | \"+words[5]+\" | \"+words[6]);\n\t\t\t\t\t\t\tSystem.out.println(\"Updated successfully\");\n\n\t\t\t\t\t\t\t//Calling method for displaying data in list after updation\n\t\t\t\t\t\t\tthis.show_book();\n\t\t\t\t\t\t\tthis.main_menu();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Printing error message\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid choice\");\n\t\t\t\t\t\t\tthis.main_menu();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t \tSystem.out.println(\"Please enter valid serial number\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Nothing to update. Please add some values\");\n\t\t\t\t\tthis.main_menu();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//Case 3 for Deleting values\n\t\t\tcase 3:\n\n\t\t\t\t//Getting & checking size of array list\n\t\t\t\tsize=arr.size();\n\t\t\t\tif(size>0)\n\t\t\t\t{\n\t\t\t\t\t//Calling method for displaying data in list\n\t\t\t\t\tthis.show_book();\n\n\t\t\t\t\t//Getting serial number for delete a value\n\t\t\t\t\tSystem.out.println(\"Select serial number to delete\");\n\t\t\t\t\tdelete_no=me.nextInt();\n\n\t\t\t\t\t//Checking index number from array list\n\t\t\t\t\tif(delete_no>0 && delete_no<=size)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t//Deleting value via index number\n\t\t\t\t\t\tarr.remove(delete_no-1);\n\t\t\t\t\t\tSystem.out.println(\"Deleted successfully\");\n\n\t\t\t\t\t\t//Calling method for displaying data in list after deletion\n\t\t\t\t\t\tthis.show_book();\n\t\t\t\t\t\tthis.main_menu();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Please enter valid serial number\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Nothing to delete. Please add some values\");\n\t\t\t\t\tthis.main_menu();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t//Case 4 for closing program\n\t\t\tcase 4:\n\n\t\t\t\t//Calling method for terminating program\n\t\t\t\tjava.lang.System.exit(0);\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid choice...\");\n\t\t\t\t\tthis.main_menu();\n\t\t\t\t\t\n\t\t}\n\t}", "@PostMapping(\"/rooms\")\n public Room createRoom (\n @Valid\n @RequestBody Room room){\n return roomRepository.save(room);\n }", "public void addPart() {\n\n if(isValidPart()) {\n double price = Double.parseDouble(partPrice.getText());\n String name = partName.getText();\n int stock = Integer.parseInt(inventoryCount.getText());\n int id = Integer.parseInt(partId.getText());\n int minimum = Integer.parseInt(minimumInventory.getText());\n int maximum = Integer.parseInt(maximumInventory.getText());\n String variableText = variableTextField.getText();\n\n if (inHouse.isSelected()) {\n InHouse newPart = new InHouse(id,name,price,stock,minimum,maximum,Integer.parseInt(variableText));\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n\n } else if (outsourced.isSelected()) {\n Outsourced newPart = new Outsourced(id,name,price,stock,minimum,maximum,variableText);\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n }\n try {\n InventoryData.getInstance().storePartInventory();\n InventoryData.getInstance().storePartIdIndex();\n } catch (IOException e) {\n e.printStackTrace();\n }\n exit();\n\n }\n }", "public static void request(int type) {\n\n String array[] = null;\n Scanner scanner = new Scanner(System.in);\n\n switch (type) {\n case 1:\n// array=Employee.EmployeeChoices();\n break;\n /* min=1;\n max=8;*/\n case 2:\n break;// type 3 is to quit\n case 4:\n// array= HREmployee.employeeHRChoices();\n break;\n default:\n System.out.println(\"Error! Call tech team\");\n break;\n }\n int min = 1;// 0 is the name of the prompt, not a choice\n int max = array.length;\n printPrompt(array);\n int request = scanner.nextInt();\n validRequest(request, min, max);\n //directs to Homepage where the actions are\n if (type == 4) {\n// HREmployee.HRhomePage(request);\n } else if (type == 1) {\n// Employee.employeeHomePage(request);\n }\n\n\n /* choices(type,request);*/\n }", "public static void main(String[] args) {\n try {\n Model m = new Model();\n //Customer c = new Customer(\"Pam Satan III\", \"bad@inter.net\", \"Norwich\", \"V\", \"02/12\", \"2136871466\");\n //c = m.CUSTOMERS.getCustomer(c.getName(), c.getEmail());\n /*Customer pam = m.CUSTOMERS.createCustomer(c);\n System.out.println(pam);\n List<Room> list = new ArrayList<>();\n list.add(request);\n //have pam make bookings for this date until she has used up all the available rooms, should exception\n //out\n for(int i = 0; i < 100; i++) {\n m.BOOKINGS.makeBooking(c, list, LocalDate.parse(\"2017-12-24\"), LocalDate.parse(\"2017-12-28\"));\n }\n //Booking booktest = m.BOOKINGS.getBooking(15976);\n int foo = 1;*/\n //c.setName(\"Jordan Jorgens\");\n //m.CUSTOMERS.updateCustomer(c);\n //Customer check = m.CUSTOMERS.getCustomer(12955);\n //System.out.println(check);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n Room r = (Room)null;\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "private void initHotelsAndReservations() \n\t{\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(\"Hotels.txt\");\n\t\t\tScanner fs = new Scanner(fis);\n\t\t\twhile(fs.hasNextLine())\n\t\t\t{\n\t\t\t\tScanner is = new Scanner(fs.nextLine());\n\t\t\t\tis.useDelimiter(\",\");\n\t\t\t\tint id = Integer.parseInt(is.next().trim());\n\t\t\t\tString name = is.next().trim();\n\t\t\t\tString address = is.next().trim();\n\t\t\t\tString city = is.next().trim();\n\t\t\t\tString state = is.next().trim();\n\t\t\t\tint pricePerNight = Integer.parseInt(is.next().trim());\n\t\t\t\th = new Hotel (id, name, address, city, state, pricePerNight);\n\t\t\t\thotels.add(h);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * The catch block checks to make sure that the file is found\n\t\t */\n\t\tcatch( FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.err.println(\"File not found!\");\n\t\t}\n\n\t\t/**\n\t\t * Binding hotel reservations to model/JComboBox\n\t\t */\n\t\tfor(Hotel h1: hotels)\n\t\t\thotelsModel.addElement(h1);\n\t\t/**\n\t\t * Binding hotel reservations to model/JList\n\t\t */\n\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\tfor(Reservation r1 : selectedHotel.getReservations())\n\t\t\treservationsModel.addElement(r1);\n\t}", "public static void ownerLoop() {\n boolean exit = false;\n Scanner input = new Scanner(System.in);\n\n while (!exit) {\n displayOwner();\n\n String[] tokens = input.nextLine().toLowerCase().split(\"\\\\s\");\n char option = tokens[0].charAt(0);\n char dataOpt = 0;\n\n if (tokens.length == 2)\n dataOpt = tokens[1].charAt(0);\n\n switch(option) {\n case 'o': InnReservations.clearScreen();\n occupancy();\n break;\n case 'd': InnReservations.clearScreen();\n revenue(tokens);\n break;\n case 's': InnReservations.clearScreen();\n reservations();\n break;\n case 'r': InnReservations.clearScreen();\n rooms();\n break;\n case 'b': InnReservations.clearScreen();\n exit = true;\n break;\n }\n }\n }", "public void addAlaCarteMenu() {\n\t\tboolean isRunning = true;\n\n\t\twhile (isRunning) {\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\tint menuTypeNo;\n\t\t\tString menuType = \" \";\n\t\t\t// When the user enters 1,2,3,4 - > The type gets automatically added.\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Please Enter Menu Type(-1 to Complete): \\n1 : Appetizers \\n2 : Main \\n3 : Sides \\n4 : Drinks\");\n\n\t\t\tmenuTypeNo = scan.nextInt();\n\t\t\t\n\t\t\tdo {\n\t\t\t\tif (menuTypeNo == -1) {\n\t\t\t\t\tisRunning = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (menuTypeNo == 1) {\n\t\t\t\t\tmenuType = \"Appetizers\";\n\t\t\t\t} else if (menuTypeNo == 2) {\n\t\t\t\t\tmenuType = \"Main\";\n\t\t\t\t} else if (menuTypeNo == 3) {\n\t\t\t\t\tmenuType = \"Sides\";\n\t\t\t\t} else if (menuTypeNo == 4) {\n\t\t\t\t\tmenuType = \"Drink\";\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid Input, Try Again..\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tboolean idChecker = true;\n\t\t\t\t\n\t\t\t\t// Retrieve menuData to validate\n\t\t\t\tFile f = new File(\"menuData\");\n\n\t\t\t\tdo {\n\t\t\t\t\tif (f.isFile()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\t\t\t\t\tmm.clear();\n\t\t\t\t\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\t\t\t\t\t\t\tois.close();\n\t\t\t\t\t\t\tfis.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\n\t\t\t\t\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\t\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\t\t\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\t\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\t\t\t\t} catch (ClassNotFoundException c) {\n\t\t\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print(\"Please Enter Menu ID: \\nM\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (idChecker) {\n\t\t\t\t\t\t\tscan.nextLine();\n\t\t\t\t\t\t\tmenuID = \"M\" + scan.nextLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!idChecker) {\n\t\t\t\t\t\t\tmenuID = \"M\" + scan.next();\n\t\t\t\t\t\t\tscan.nextLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (final AlacarteMenu amItem: mm) {\n\t\t\t\t\t\t\tif (amItem.getMenuName().equalsIgnoreCase(menuID)) {\n\t\t\t\t\t\t\t\tidChecker = false;\n\t\t\t\t\t\t\t\tSystem.out.println(\"Duplicated ID found!\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tidChecker = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (!f.isFile()) {\n\t\t\t\t\t\tSystem.out.print(\"Please Enter Menu ID: \\nM\");\n\t\t\t\t\t\t scan.nextLine(); \n\t\t\t\t\t\tmenuID = \"M\" + scan.nextLine();\n\t\t\t\t\t\tidChecker = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!idChecker);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Please Enter Menu Item Description: \");\n\t\t\t\tString menuDesc = scan.nextLine();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Please Enter Menu Item Price: \");\n\t\t\t\tdouble menuPrice = scan.nextDouble();\n\n\t\t\t\tAlacarteMenu aam = new AlacarteMenu(menuID, menuDesc, menuPrice, menuType);\n\t\t\t\tmm.add(aam);\n\n\t\t\t\ttry {\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"menuData\");\n\t\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\t\toos.writeObject(mm);\n\t\t\t\t\toos.close();\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Failed to add menu item.\");\n\t\t\t\t}\n\t\t\t} while (menuTypeNo > 5 && menuTypeNo != -1);\n\t\t}\n\t}", "public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\t\t\tRoomAdd ra=new RoomAdd();\r\n\t\t\t\t\t\tra.getsShell().open();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsShell.setMinimized(true);\r\n\t\t\t\t\t\t/*if(ra.flag){\r\n\t\t\t\t\t\t\tnewRoom=ra.getRoom();\r\n\t\t\t\t\t\t\ttableViewer.add(SystemManageShell.newRoom);\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t}", "public static void processAddnewServicesMenu() {\n switch (ScannerUtils.scanner.nextLine()) {\n case ADD_NEW_VILLA:\n addNewVilla();\n break;\n case ADD_NEW_HOUSE:\n addNewHouse();\n break;\n case ADD_NEW_ROOM:\n addNewRoom();\n break;\n case BACK_TO_MAIN_MENU:\n processMain();\n break;\n case EXIT:\n System.exit(0);\n break;\n default:\n System.out.println(\"Please select from 1 to 4\");\n returnAddNewServicesMenu();\n }\n }", "@Override\n public void onClickCreateRoom(String code) {\n\n boolean status = networkControl.checkDialogPresence(getApplicationContext(),MultiplayerActivity.this);\n if(status){\n loadingDialog = new LoadingDialog(MultiplayerActivity.this);\n loadingDialog.startDialog(getResources().getString(R.string.wait_access_room));\n loadingDialog.setDataToCancel(code);\n loadingDialog.setVisibleClick(true);\n\n HashMap<String,String> data = new HashMap<>();\n data.putAll((Map<String,String>) preferences.getAll());\n String nickname = data.get(KEY_NICKNAME_PREFERENCES);\n\n addRoomsEventListener(loadingDialog,code,nickname);\n }\n\n\n }", "@Override\n @Transactional\n public HotelResponseDTO createHotel(AddHotelRequestDTO addHotelRequest) {\n Hotel hotel = new Hotel();\n String generatedHotelId = CommonUtil.getGeneratedId();\n hotel.setHotelId(generatedHotelId);\n hotel.setName(addHotelRequest.getName());\n hotel.setDescription(addHotelRequest.getDescription());\n hotel.setLocation(addHotelRequest.getLocation());\n hotel.setDefaultCheckInTime(addHotelRequest.getDefaultCheckInTime());\n hotel.setDefaultCheckOutTime(addHotelRequest.getDefaultCheckOutTime());\n if (addHotelRequest.getFacilities() != null) {\n hotel.setFacilities(String.join(\",\", addHotelRequest.getFacilities()));\n }\n hotel.setDeleted(false);\n Date createdDate = new Date();\n hotel.setCreatedDate(createdDate);\n hotel.setLastModifiedDate(createdDate);\n hotelRepository.save(hotel);\n\n List<AddRoomRequestDTO> roomRequests = addHotelRequest.getRooms();\n if (roomRequests != null && roomRequests.size() > 0) {\n List<Room> rooms = roomRequests.stream().map(roomRequest -> {\n Room room = new Room();\n String generatedRoomId = CommonUtil.getGeneratedId();\n room.setRoomId(generatedRoomId);\n RoomType roomType = RoomType.fromCode(roomRequest.getRoomType());\n room.setRoomType(roomType);\n BedType bedType = BedType.fromCode(roomRequest.getBedType());\n room.setBedType(bedType);\n room.setNumberOfAdults(roomRequest.getNumberOfAdults());\n room.setNumberOfChildren(roomRequest.getNumberOfChildren());\n room.setBasicFare(roomRequest.getBasicFare());\n room.setTaxPercentage(roomRequest.getTaxPercentage());\n if (roomRequest.getFacilities() != null) {\n room.setFacilities(String.join(\",\", roomRequest.getFacilities()));\n }\n room.setCreatedDate(createdDate);\n room.setLastModifiedDate(createdDate);\n room.setDeleted(false);\n room.setHotel(hotel);\n return room;\n }).collect(Collectors.toList());\n roomRepository.saveAll(rooms);\n hotel.setRooms(rooms);\n }\n logger.info(\"Created hotel information successfully | hotelId:{}\", generatedHotelId);\n return makeHotelResponseDTO(hotel);\n }", "private static void DelRoom (){\n boolean DelRoomLoop = true;\n //loop for delete room process\n while (DelRoomLoop) {\n //checking if there are rooms to delete\n if (HotelRoom.roomList.isEmpty() || HotelRoom.AllRoomsOccupied() == true) {\n System.out.println(\"Apologies, there are no available rooms!\");\n break;\n } \n else {\n System.out.println(\"Here is a list of rooms:\");\n //call the method for showing a list of all rooms\n HotelRoom.DisplayAllRooms();\n System.out.println(\"-----------------------------\");\n System.out.print(\"Room number: \");\n //try/catch for delete room input\n try {\n //get the user's input\n int delRoomNumber = RecInput.nextInt();\n //loop through the room list to find whether the room number matches one of the rooms\n //and delete the one asked by the user\n boolean roomNumberExist = false;\n for (int i = 0; i < HotelRoom.roomList.size(); i++){\n\n if (delRoomNumber == HotelRoom.roomList.get(i).roomNumber && HotelRoom.roomList.get(i).occupied == false){\n roomNumberExist = true;\n //room is deleted\n HotelRoom.roomList.remove(i);\n System.out.println(\"The room number \" + delRoomNumber + \" is deleted\");\n System.out.println(\"-----------------------------\");\n //breaking loop to exit process\n DelRoomLoop = false;\n } \n\n }\n if(roomNumberExist == false) {\n //handling if user inputs incorrect room number\n System.out.println(\"The room number you entered is invalid\");\n System.out.println(\"-----------------------------\");\n }\n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //Cleaning scanner\n RecInput.next();\n }\n }\n }\n }", "public void initiateGame()\n {\n Scanner scan = new Scanner(System.in);\n System.out.println(\"========================\");\n System.out.println(\"Olympic Game\\n\\tGame Selection >>>>>> Game Initiation\");\n System.out.println(\"========================\");\n System.out.println(\"How many athletes in this game? from 4 to 8\");\n boolean input = false;\n do\n {\n try // check the input\n {\n this.participantNum = scan.nextInt();\n if(this.participantNum >= 4 && this.participantNum <= 8) //check the number of participant between 4 and 8\n {\n input = true;\n }else\n {\n System.out.println(\"please enter a number from 4 to 8\");\n }\n }\n catch (InputMismatchException ime)\n {\n System.out.println(\"please enter a number\");\n }\n scan.nextLine(); //clean scan and avoid from infinite loop\n }while (!input); // jump do-while loop when input is true\n\n System.out.print(\"\\n\");\n System.out.println(\"Add Participants Randomly? Y/N \");\n this.matchType(); // match integer game type with String\n this.createGame(); // add new game in game array list\n this.addParticipant(); // add athletes in the new game\n\n }", "public void onButtonClick(View v) {\n // initialize editText with method findViewById()\n // here editText will hold the name of room which is given by user\n EditText editText = findViewById(R.id.conferenceName);\n\n // store the string input by user in editText in\n // an local variable named text of string type\n String text = editText.getText().toString();\n\n // if user has typed some text in\n // EditText then only room will create\n if (text.length() > 0) {\n // creating a room using JitsiMeetConferenceOptions class\n // here .setRoom() method will set the text in room name\n // here launch method with launch a new room to user where\n // they can invite others too.\n JitsiMeetConferenceOptions options\n = new JitsiMeetConferenceOptions.Builder()\n .setRoom(text)\n .build();\n JitsiMeetActivity.launch(this, options);\n }\n\n }", "public static void addRoom(String roomNumber, Double price, RoomType roomType) {\r\n\r\n Room room = new Room(roomNumber, price, roomType);\r\n\r\n if (roomList.contains(getARoom(roomNumber))) {\r\n System.out.println(\"This room number already exists. The room can not be created.\");\r\n } else {\r\n //room = new Room(room.getRoomNumber(), room.getRoomPrice(), room.getRoomType());\r\n roomList.add(room);\r\n System.out.println(\"The room was successfully added to our room list.\");\r\n }\r\n }", "@GetMapping(\"/showFormForAddRoom\")\r\n\tpublic String showFormForAddRoom(Model theModel) {\n\t\tRoom theRoom = new Room();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"room\", theRoom);\r\n\t\t\r\n\t\treturn \"/rooms/room-form\";\r\n\t}", "Room updateOrAddRoom(String username, Room room);", "public void setRoomtypeid(Integer roomtypeid) {\n this.roomtypeid = roomtypeid;\n }", "public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}" ]
[ "0.6243044", "0.6092849", "0.60890186", "0.59952044", "0.59944725", "0.59779316", "0.59007", "0.5880551", "0.583931", "0.58324033", "0.5812156", "0.5754763", "0.5604666", "0.551724", "0.54999375", "0.5472383", "0.54663235", "0.5443977", "0.54308754", "0.5429826", "0.5415329", "0.53913504", "0.5383675", "0.5378593", "0.5365478", "0.53645766", "0.5328157", "0.53219503", "0.5316866", "0.53019834", "0.52952296", "0.52880335", "0.5254532", "0.5244177", "0.5238684", "0.523547", "0.5210925", "0.52063626", "0.5203663", "0.519667", "0.5192981", "0.5183224", "0.51805073", "0.51763", "0.5173147", "0.51727754", "0.51598275", "0.51532495", "0.51391727", "0.5125012", "0.5108823", "0.5097057", "0.5097021", "0.50781536", "0.5077695", "0.50653315", "0.5050059", "0.50481135", "0.502798", "0.50261796", "0.50063413", "0.499752", "0.49953142", "0.4984629", "0.49835297", "0.49587953", "0.49553916", "0.49542874", "0.49525756", "0.4950619", "0.49483076", "0.49434137", "0.49433967", "0.49365112", "0.4933208", "0.49288383", "0.4919297", "0.491789", "0.4915182", "0.4912573", "0.49019608", "0.48819798", "0.48736557", "0.48698497", "0.485398", "0.48503685", "0.4836408", "0.48362947", "0.48283118", "0.48267686", "0.4826029", "0.48247507", "0.4814904", "0.48121047", "0.48111534", "0.48101223", "0.48037502", "0.47976324", "0.4783654", "0.4781651" ]
0.6936747
0
Links the current HOTEL and ADDRESS attributes values into the HOTEL_ADDRESS relation:
private void linkHotelAddress(Connection connection) throws SQLException { String sql = "INSERT INTO Hotel_Address VALUES (?, ?, ?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); pStmt.setString(1, getHotelName()); pStmt.setInt(2, getBranchID()); pStmt.setString(3, getCity()); pStmt.setString(4, getState()); pStmt.setInt(5, getZip()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}", "public String getHouseAddr() {\n return houseAddr;\n }", "private void populateAddressInfo(){\n userNameLabel.setText(userAccount.getUsername());\n address1Label.setText(userAccount.getPerson().getAddress().getAddressLine1());\n address2Label.setText(userAccount.getPerson().getAddress().getAddressLine2());\n cityLabel.setText(userAccount.getPerson().getAddress().getCity());\n stateLabel.setText(userAccount.getPerson().getAddress().getState());\n nationLabel.setText(userAccount.getPerson().getAddress().getCountry());\n zipLabel.setText(userAccount.getPerson().getAddress().getZipcode());\n emailLabel.setText(userAccount.getPerson().getEmail());\n }", "public Address address() {\n return new Address(alert.get_address());\n }", "public Address getAddress(){\n\t\treturn address;\n\t}", "@Override\n public Adress getAdress() {\n return adress;\n }", "public String getHotelAddress() {\n\t\treturn this.address;\n\t}", "public Address getAddress() {\n return address;\n }", "public Address getAddress() {\n return address;\n }", "public Address getAddress() {\n return address;\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}", "Address getAddress() {\n\t\t\treturn editedAddress;\n\t\t}", "public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "public String getAddress() {return address;}", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "java.lang.String getHotelAddress();", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress(){\n return address;\n\n }", "public String getAddress(){\n\t\treturn address;\n\t}", "public String getAddress(){\n\t\treturn this.address;\n\t}", "public String getAddress()\n {\n \treturn address;\n }", "public void getAddress() {\n if (mLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), mLocation);\n } else {\n mLocation = null;\n if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n Location currLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n if (currLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(currLocation.getLatitude(), currLocation.getLongitude()));\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 5, this);\n if (mCurrLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(mCurrLocation.getLatitude(), mCurrLocation.getLongitude()));\n } else {\n // Default location in case location search doesn't work on first try\n mBusinessAddress = DiscoverConstants.DEFAULT_LOCATION;\n }\n }\n } else {\n mBusinessAddress = null;\n }\n }\n }", "public Adress getAdress() {\r\n // Bouml preserved body begin 00040C02\r\n\t return adress;\r\n // Bouml preserved body end 00040C02\r\n }", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressWithDeliverability addNewAddressHistory();", "@Override\n\tpublic String getOnAddress() {\n\t\treturn onAddress;\n\t}", "public String getAddress(){\r\n return address;\r\n }", "public String getAddress(){\n return address;\n }", "public String getAddress(){\n return address;\n }", "public String getAddress(){\n return address;\n }", "public Address getAddress() { return address; }", "private String getAddress() {\n String add = \"\";\n if (mLocationHelper != null) {\n add = getString(R.string.address, mLocationHelper.getAddress());\n }\n return add;\n }", "@Override\n\tpublic String getAddressDetails() {\n\t\treturn \"[\" + this.street + \" \" + this.city + \" \" + this.state + \" \" + this.zip + \"]\";\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "@Override\r\n\tpublic String getAddress() {\n\t\treturn address;\r\n\t}", "public String getAddress() {\r\n\t\treturn this.address;\r\n\t}", "public void setAddress(String address) { this.address = address; }", "public AdressBook() {\r\n addressEntryList = new LinkedList<>();\r\n }", "public void setAdress(Adress adr) {\r\n // Bouml preserved body begin 00040F82\r\n\t this.adress = adr;\r\n // Bouml preserved body end 00040F82\r\n }", "public String getAddress() {\n return this._address;\n }", "public String getAddress() {\n return m_Address;\n }", "public final String getAddress() {\n return address;\n }", "public com.commercetools.api.models.common.Address getAddress() {\n return this.address;\n }", "public java.lang.String getAddress() {\r\n return address;\r\n }", "@Override\n\tpublic String getAddress() {\n\t\treturn address;\n\t}", "Restaurant setRestaurantAddress(Address address);", "protected void addAddressPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_address_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_address_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__ADDRESS,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }", "public List<Address> listAddress()\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address order by address.id asc\").list();\n\n return result;\n }" ]
[ "0.591911", "0.5875727", "0.58733684", "0.5775337", "0.57628316", "0.5750001", "0.57380265", "0.57265085", "0.57265085", "0.57265085", "0.5700209", "0.5700209", "0.5700209", "0.5700209", "0.5700209", "0.5700209", "0.5700209", "0.5684629", "0.5669221", "0.56597465", "0.5658555", "0.56470335", "0.56400234", "0.56400234", "0.56396174", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56394506", "0.56350183", "0.5633093", "0.5612823", "0.5601957", "0.5600934", "0.55990875", "0.55956423", "0.55956423", "0.55906665", "0.55906665", "0.558613", "0.558613", "0.5577521", "0.5567835", "0.5561464", "0.55449176", "0.55449176", "0.55449176", "0.55268145", "0.5519079", "0.5509629", "0.5500316", "0.5500316", "0.5500316", "0.5500316", "0.5500316", "0.5500316", "0.5500316", "0.54972917", "0.5494665", "0.5491716", "0.546782", "0.5467567", "0.5466422", "0.54624635", "0.5459355", "0.545357", "0.54535466", "0.54362243", "0.54192007", "0.5418856", "0.5416923" ]
0.0
-1
Links the current HOTEL and ROOM attributes values into the HOTEL_ROOMS relation:
private void linkHotelRoom(Connection connection, Scanner scan) throws SQLException { String sql = "INSERT INTO Hotel_Rooms VALUES (?, ?, ?, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); System.out.print("Please enter the number of " + getType() + "s the hotel has: "); setQuantity(scan.nextInt()); pStmt.setString(1, getHotelName()); pStmt.setInt(2, getBranchID()); pStmt.setString(3, getType()); pStmt.setInt(4, getQuantity()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Road> getRoads() {\n\t\treturn new ArrayList<Road>(roadsByUri.values());\n\t}", "public void linkRoads() {\r\n\t\tfor (Road road : this.roads) {\r\n\t\t\tfor (Integer id : road.getLinkedIDs()) {\r\n\t\t\t\tfor (Road link : this.roads) {\r\n\t\t\t\t\tif (id == link.getID()) {\r\n\t\t\t\t\t\troad.linkRoad(link);\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}", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "public void makeRoads()\r\n\t{\r\n\t\tfor(int i=0; i<roads.length; i++)\r\n\t\t\troads[i] = new Road(i*SCREEN_HEIGHT/20,SCREEN_WIDTH,SCREEN_HEIGHT/20-10);\r\n\t}", "public ObjectProp getRelationship() {\n return relationship;\n }", "public void viewRoads(){\n for(int i = 0; i < roads.size(); i++)\n System.out.println(\"[\" + (i+1) + \"] \" + roads.get(i).getName());\n }", "public Long getRelateId() {\n return relateId;\n }", "public Rogue getRogue() {\n return (gameRoomBelongsTo);\n }", "private void setRoads(RnsReader rnsReader) {\n\t\t// s is never null\n\t\troadsByUri.clear();\n\t\tSet<RoadSegmentReader> s = rnsReader.getRoadSegments(null);\n\t\t\n\t\tfor(RoadSegmentReader rsr : s){\n\t\t\tRoad r = (new ObjectFactory()).createRoad();\n\t\t\tr.setRoadName(rsr.getRoadName());\n\t\t\tString roadUri = buildRoadUriFromId(rsr.getRoadName());\n\t\t\tr.setSelf(roadUri);\n\t\t\tif(!roadsByUri.containsKey(roadUri)){\n\t\t\t\tputResource(r);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onRelationshipChanged() {\n\t\tloadData();\n\t}", "void setROIs(Object rois);", "public void relate(HNode id, Object o);", "public void roadList(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(i + \" \" + roads.get(i).start.getCityName() + \", \" + roads.get(i).end.getCityName());\n }\n }", "public Map<String, String> getRelationAttributes() {\n return relationAttributes;\n }", "void relLoadProperties( long relId, boolean light, PropertyReceiver receiver );", "public ArrayList<Road> loadRoads()\n\t{\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.RoadTable.ROADNAME[0] + \", \" +\n\t\t\t\tDBContract.RoadTable.LENGTH[0] + \", \" + DBContract.RoadTable.DURATION[0] + \", \" +\n\t\t\t\tDBContract.RoadTable.PRICE[0] + \" FROM \" + DBContract.RoadTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Road> result = new ArrayList<Road>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie la nouvelle route */\n\t\t\t\t\tRoad tmp = new Road(cursor.getString(0), cursor.getDouble(1), cursor.getDouble(2),\n\t\t\t\t\t\t\tcursor.getDouble(3));\t\n\t\t\t\t\tresult.add(tmp);\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "LinkRelation createLinkRelation();", "public void setRmTable(Rooms value);", "public HashMap<String, Relation> getRelations() {\n return relations;\n }", "public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }", "@SuppressWarnings(\"unused\")\n private static void storeOval(OvalRoi roi,\n MetadataStore store, int roiNum, int shape)\n {\n // TODO: storeOval\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "public void onRelationshipChanged();", "@SuppressWarnings(\"unchecked\")\n\tprivate CoffeeDetailRto mapToRto(CoffeeDetail coffeeDetail) {\n\n\t\treturn CoffeeDetailRto.builder().id(coffeeDetail.getId()).image(coffeeDetail.getImage())\n\t\t\t\t.startPrice(coffeeDetail.getCoffee().getStartPrice()).title(coffeeDetail.getCoffee().getTitle())\n\t\t\t\t.description(coffeeDetail.getCoffee().getDescription())\n\t\t\t\t.selection(coffeeDetail.getSelection().stream().map(selection -> {\n\t\t\t\t\treturn SelectionRto.builder().type(selection.getType()).id(selection.getId())\n\t\t\t\t\t\t\t.label(selection.getLabel()).items(selection.getItems().stream().map(item -> {\n\t\t\t\t\t\t\t\treturn SelectionItemRto.builder().itemName(item.getItemName())\n\t\t\t\t\t\t\t\t\t\t.plusPrice(item.getPlusPrice()).id(item.getId()).build();\n\t\t\t\t\t\t\t}).collect(Collectors.toList())).build();\n\t\t\t\t}).collect(Collectors.toList())).build();\n\t}", "public String getRelation() {\n return relation;\n }", "public IfcDoorLiningProperties(IfcGloballyUniqueId GlobalId, IfcOwnerHistory OwnerHistory, IfcLabel Name, IfcText Description, IfcPositiveLengthMeasure LiningDepth, IfcPositiveLengthMeasure LiningThickness, IfcPositiveLengthMeasure ThresholdDepth, IfcPositiveLengthMeasure ThresholdThickness, IfcPositiveLengthMeasure TransomThickness, IfcLengthMeasure TransomOffset, IfcLengthMeasure LiningOffset, IfcLengthMeasure ThresholdOffset, IfcPositiveLengthMeasure CasingThickness, IfcPositiveLengthMeasure CasingDepth, IfcShapeAspect ShapeAspectStyle)\n\t{\n\t\tthis.GlobalId = GlobalId;\n\t\tthis.OwnerHistory = OwnerHistory;\n\t\tthis.Name = Name;\n\t\tthis.Description = Description;\n\t\tthis.LiningDepth = LiningDepth;\n\t\tthis.LiningThickness = LiningThickness;\n\t\tthis.ThresholdDepth = ThresholdDepth;\n\t\tthis.ThresholdThickness = ThresholdThickness;\n\t\tthis.TransomThickness = TransomThickness;\n\t\tthis.TransomOffset = TransomOffset;\n\t\tthis.LiningOffset = LiningOffset;\n\t\tthis.ThresholdOffset = ThresholdOffset;\n\t\tthis.CasingThickness = CasingThickness;\n\t\tthis.CasingDepth = CasingDepth;\n\t\tthis.ShapeAspectStyle = ShapeAspectStyle;\n\t\tresolveInverses();\n\t}", "public void link_rooms() {\n numberGen = new Random();\n int index = numberGen.nextInt(roomList.size());\n int direction = numberGen.nextInt(2);\n Room linkRoom = roomList.get(index);\n\n for(Room destRoom: roomList) {\n draw_link(linkRoom.getPosition(), destRoom, direction);\n }\n }", "public void initRelations(ValueChangeEvent ev) {\r\n\t\ttry {\r\n\t\t\t// Limpia lista de relaciones\r\n\t\t\tobject.getRelcos().clear();\r\n\t\t\t// Obtiene valor del concepto seleccionado\r\n\t\t\tString cosccosak = ev.getNewValue().toString();\r\n\t\t\t// Obtiene valores de acuerdo al concepto\r\n\t\t\tList<Seprelco> relcos = seprelcoDao.findByConcept(cosccosak);\r\n\t\t\t// Recorre lista\r\n\t\t\tfor (Seprelco relco : relcos) {\r\n\t\t\t\t// Inicia nuevo registro de sedrelco\r\n\t\t\t\tSedrelco drelco = new Sedrelco();\r\n\t\t\t\t// Prepara objeto\r\n\t\t\t\tdrelco.prepareObject();\r\n\t\t\t\t// Concepto\r\n\t\t\t\tdrelco.setCosccosak(relco.getId().getCosccosak());\r\n\t\t\t\tdrelco.setRcocrcoak(relco.getId().getRcocrcoak());\r\n\t\t\t\t// Descripcion relacion\r\n\t\t\t\tdrelco.setRcodrcoaf(relco.getRcodrcoaf());\r\n\t\t\t\t// Adiciona objeto a la lista\r\n\t\t\t\tobject.getRelcos().add(drelco);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {/* Error */\r\n\t\t\t// Muestra mensaje\r\n\t\t\tthis.processErrorMessage(e.getMessage());\r\n\t\t\t// Log\r\n\t\t\tLogLogger.getInstance(this.getClass()).logger(\r\n\t\t\t\t\tExceptionUtils.getFullStackTrace(e), LogLogger.ERROR);\r\n\t\t}\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations getFurtherRelations();", "public Rooms getRmTable();", "public String getRel() {\r\n return rel;\r\n }", "public ArrayList<Human> getResidents(){\n return this.residents;\n }", "@Override\n public void onRelationshipMapLoaded() {\n }", "@Override\n public String toString() {\n return \"RelatedOrg {\"\n + \"}\";\n }", "@Override\n public void updateBys() { updateLabelLists(getRTParent().getEntityTagTypes()); fillCommonRelationshipsMenu(); }", "RelationshipRecord relLoadLight( long id );", "List<IViewRelation> getViewRelations();", "@ManyToOne\r\n\t@JoinColumn(name=\"RLLB_ID\")\r\n\tpublic RelacionLaboral getRelacionLaboral() {\r\n\t\treturn this.relacionLaboral;\r\n\t}", "public java.lang.String getRoadwayRef()\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(ROADWAYREF$16);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public void setRelationAttributes(Map<String, String> relationAttributes) {\n this.relationAttributes = relationAttributes;\n }", "private void load() {\n Uri poiUri = Uri.withAppendedPath(Wheelmap.POIs.CONTENT_URI_POI_ID,\r\n String.valueOf(poiID));\r\n\r\n // Then query for this specific record:\r\n Cursor cur = getActivity().managedQuery(poiUri, null, null, null, null);\r\n\r\n if (cur.getCount() < 1) {\r\n cur.close();\r\n return;\r\n }\r\n\r\n cur.moveToFirst();\r\n\r\n WheelchairState state = POIHelper.getWheelchair(cur);\r\n String name = POIHelper.getName(cur);\r\n String comment = POIHelper.getComment(cur);\r\n int lat = (int) (POIHelper.getLatitude(cur) * 1E6);\r\n int lon = (int) (POIHelper.getLongitude(cur) * 1E6);\r\n int nodeTypeId = POIHelper.getNodeTypeId(cur);\r\n int categoryId = POIHelper.getCategoryId(cur);\r\n\r\n NodeType nodeType = mSupportManager.lookupNodeType(nodeTypeId);\r\n // iconImage.setImageDrawable(nodeType.iconDrawable);\r\n\r\n setWheelchairState(state);\r\n // nameText.setText(name);\r\n\r\n String category = mSupportManager.lookupCategory(categoryId).localizedName;\r\n // categoryText.setText(category);\r\n nodetypeText.setText(nodeType.localizedName);\r\n commentText.setText(comment);\r\n addressText.setText(POIHelper.getAddress(cur));\r\n websiteText.setText(POIHelper.getWebsite(cur));\r\n phoneText.setText(POIHelper.getPhone(cur));\r\n\r\n /*\r\n * POIMapsforgeOverlay overlay = new POIMapsforgeOverlay();\r\n * overlay.setItem(name, comment, nodeType, state, lat, lon);\r\n * mapView.getOverlays().clear(); mapView.getOverlays().add(overlay);\r\n * mapController.setCenter(new GeoPoint(lat, lon));\r\n */\r\n }", "public static void populateWithHATEOASLinks(EducationWrapper educationWrapper, UriInfo uriInfo) {\n\n EducationResource.populateWithHATEOASLinks(educationWrapper.getEducation(), uriInfo);\n\n for(Employee employee : educationWrapper.getEducatedEmployees())\n pl.salonea.jaxrs.EmployeeResource.populateWithHATEOASLinks(employee, uriInfo);\n }", "public CycFort getRelevancyRelationship () {\n return relevancyRelationship;\n }", "private void buildHorseRace(HorseRace hr) {\n if (hr != null && hr.getId() !=null ) {\n try {\n RaceDao raceDao = factory.createDao(RaceDao.class);\n HorseDao horseDao = factory.createDao(HorseDao.class);\n BreedDao breedDao = factory.createDao(BreedDao.class);\n\n hr.setRace(raceDao.read(hr.getRace().getId()));\n hr.setHorse(horseDao.read(hr.getHorse().getId()));\n Breed breed = breedDao.read(hr.getHorse().getBreed().getId());\n Horse horse = horseDao.read(hr.getHorse().getId());\n horse.setBreed(breed);\n hr.setHorse(horse);\n } catch (PersistentException e) {\n e.printStackTrace();\n }\n }\n }", "public RelationObject(String relation, EVAnnotation relatum) {\n\t\tthis.relation = relation;\n\t\tthis.relatum = relatum;\n\t}", "public Long getRelId() {\n return relId;\n }", "public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}", "private void addRelationShip() {\n ParseObject story = ParseObject.createWithoutData(\"Story\", objectId);\n\n // Get current User\n ParseUser user = ParseUser.getCurrentUser();\n\n // Create relationship collumn UserLove\n ParseRelation relation = user.getRelation(\"StoryLove\");\n\n // Add story to Relation\n relation.add(story);\n\n // user save relation\n user.saveInBackground(new SaveCallback() {\n\n @Override\n public void done(ParseException e) {\n if (e == null) {\n Toast.makeText(StoryDetails.this, \"User like this story, go to YourFavorite to see!!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error saving: \" + e.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n });\n\n\n ParseObject post = new ParseObject(\"UserStory\");\n // Create an LoveStory relationship with the current user\n\n ParseRelation<ParseUser> relation1 = post.getRelation(\"UserLove\");\n ParseRelation<ParseObject> relation2 = post.getRelation(\"StoryLove\");\n relation1.add(user);\n relation2.add(story);\n // Save the post and return\n post.saveInBackground(new SaveCallback() {\n\n @Override\n public void done(ParseException e) {\n if (e == null) {\n Toast.makeText(StoryDetails.this, \"You like this story, go to YourFavorite to see!!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error saving: \" + e.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n });\n\n }", "public String getRelToMoth() {\n if (ChildType_Type.featOkTst && ((ChildType_Type)jcasType).casFeat_relToMoth == null)\n jcasType.jcas.throwFeatMissing(\"relToMoth\", \"net.myerichsen.gedcom.ChildType\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((ChildType_Type)jcasType).casFeatCode_relToMoth);}", "public void addExtHybridResourceRelationship(TaxonModel taxonModel, DwcaWriter dwcaWriter) throws IOException{\n\t\tMap<Term,String> recordValues = new HashMap<Term,String>();\t\t\n\t\tfor(TaxonModel currHybridParent : taxonModel.getHybridparents()){\n\t\t\trecordValues.put(DwcTerm.resourceID, taxonModel.getId().toString());\n\t\t\trecordValues.put(DwcTerm.relatedResourceID, currHybridParent.getId().toString());\n\t\t\trecordValues.put(DwcTerm.relationshipOfResource, HYBRID_PARENT_RELATIONSHIP);\n\t\t\trecordValues.put(DwcTerm.scientificName, currHybridParent.getLookup().getCalnameauthor());\n\t\t\tdwcaWriter.addExtensionRecord(DwcTerm.ResourceRelationship, recordValues);\n\t\t\trecordValues.clear();\n\t\t}\n\t}", "@Override\r\n public String toString() {\r\n String ans = this.nom + \"\\n\" + this.coordBase.toString() + \" \\n Robots : \\n\";\r\n for (Robot ro : this.robots) {\r\n ans += ro.toString() + \"\\n\";\r\n }\r\n return ans;\r\n }", "public int getNumRoads() {\n \t\treturn roads.size();\n \t}", "org.hl7.fhir.ObservationRelated addNewRelated();", "public void addRelations(T model);", "public void openOtherRecords()\n {\n Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE);\n Tour recTour = (Tour)((ReferenceField)recBooking.getField(Booking.TOUR_ID)).getReferenceRecord(this);\n super.openOtherRecords();\n }", "public OBOProperty getDefaultRelationship() {\n return DEFAULT_REL; // genotype influences phenotype\n }", "public Building getRoof();", "static public void set_actor_data(){\n\t\t\n\t\tEdit_row_window.attrs = new String[]{\"actor name:\", \"rating:\", \"birth year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_cinema_movies m, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_cinema_actor_movie am\" +\n\t\t\t\t\t\t\t\t\t\t\t\" where am.movie_id=m.id and am.actor_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\n\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"movie name\", \"rating\", \"release year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. release year:\";\n\t\tEdit_row_window.linked_category_name = \"MOVIES\";\n\t}", "public void populateRooms(){\n }", "public Object clone()\n\t{\n\t\tIfcDoorLiningProperties ifcDoorLiningProperties = new IfcDoorLiningProperties();\n\t\tif(this.GlobalId != null)\n\t\t\tifcDoorLiningProperties.setGlobalId((IfcGloballyUniqueId)this.GlobalId.clone());\n\t\tif(this.OwnerHistory != null)\n\t\t\tifcDoorLiningProperties.setOwnerHistory((IfcOwnerHistory)this.OwnerHistory.clone());\n\t\tif(this.Name != null)\n\t\t\tifcDoorLiningProperties.setName((IfcLabel)this.Name.clone());\n\t\tif(this.Description != null)\n\t\t\tifcDoorLiningProperties.setDescription((IfcText)this.Description.clone());\n\t\tif(this.LiningDepth != null)\n\t\t\tifcDoorLiningProperties.setLiningDepth((IfcPositiveLengthMeasure)this.LiningDepth.clone());\n\t\tif(this.LiningThickness != null)\n\t\t\tifcDoorLiningProperties.setLiningThickness((IfcPositiveLengthMeasure)this.LiningThickness.clone());\n\t\tif(this.ThresholdDepth != null)\n\t\t\tifcDoorLiningProperties.setThresholdDepth((IfcPositiveLengthMeasure)this.ThresholdDepth.clone());\n\t\tif(this.ThresholdThickness != null)\n\t\t\tifcDoorLiningProperties.setThresholdThickness((IfcPositiveLengthMeasure)this.ThresholdThickness.clone());\n\t\tif(this.TransomThickness != null)\n\t\t\tifcDoorLiningProperties.setTransomThickness((IfcPositiveLengthMeasure)this.TransomThickness.clone());\n\t\tif(this.TransomOffset != null)\n\t\t\tifcDoorLiningProperties.setTransomOffset((IfcLengthMeasure)this.TransomOffset.clone());\n\t\tif(this.LiningOffset != null)\n\t\t\tifcDoorLiningProperties.setLiningOffset((IfcLengthMeasure)this.LiningOffset.clone());\n\t\tif(this.ThresholdOffset != null)\n\t\t\tifcDoorLiningProperties.setThresholdOffset((IfcLengthMeasure)this.ThresholdOffset.clone());\n\t\tif(this.CasingThickness != null)\n\t\t\tifcDoorLiningProperties.setCasingThickness((IfcPositiveLengthMeasure)this.CasingThickness.clone());\n\t\tif(this.CasingDepth != null)\n\t\t\tifcDoorLiningProperties.setCasingDepth((IfcPositiveLengthMeasure)this.CasingDepth.clone());\n\t\tif(this.ShapeAspectStyle != null)\n\t\t\tifcDoorLiningProperties.setShapeAspectStyle((IfcShapeAspect)this.ShapeAspectStyle.clone());\n\t\treturn ifcDoorLiningProperties;\n\t}", "public void setRoof(Building building);", "public Room getDoorRoom()\n {\n return room;\n }", "public List<Resident> getAllResidents();", "public String toString() { \n StringBuffer sb = new StringBuffer(); \n sb.append(\"[\"); \n sb.append(\"]:\"); \n sb.append(prlKey);\n sb.append(\"|\");\n sb.append(prlPinKey);\n // attribute 'prlFirstName' not usable (type = String Long Text)\n sb.append(\"|\");\n sb.append(rcdOrderBy);\n sb.append(\"|\");\n sb.append(relationtype);\n sb.append(\"|\");\n sb.append(relationship);\n sb.append(\"|\");\n sb.append(activeStatus);\n return sb.toString(); \n }", "public Relations() {\n relations = new ArrayList();\n }", "public Room getTheObject(){\n return this;\n }", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "static private void addRelations( final JCas jCas,\n final FhirPractitioner practitioner,\n final FhirNoteSpecs noteSpecs,\n final FhirResourceCreator<Annotation, Basic> aCreator,\n final Map<IdentifiedAnnotation, Basic> annotationBasics,\n final Map<Annotation, Basic> simpleBasics ) {\n final Collection<BinaryTextRelation> relations = JCasUtil.select( jCas, BinaryTextRelation.class );\n for ( BinaryTextRelation relation : relations ) {\n final RelationArgument arg1 = relation.getArg1();\n final Annotation source = arg1.getArgument();\n Basic basicSource;\n if ( source instanceof IdentifiedAnnotation ) {\n basicSource = annotationBasics.get( (IdentifiedAnnotation)source );\n } else {\n basicSource = getSimpleBasic( jCas, source, practitioner, noteSpecs, aCreator, simpleBasics );\n }\n final RelationArgument arg2 = relation.getArg2();\n final Annotation target = arg2.getArgument();\n Basic basicTarget;\n if ( target instanceof IdentifiedAnnotation ) {\n basicTarget = annotationBasics.get( (IdentifiedAnnotation)target );\n } else {\n basicTarget = getSimpleBasic( jCas, target, practitioner, noteSpecs, aCreator, simpleBasics );\n }\n final String type = relation.getCategory();\n basicSource.addExtension( FhirElementFactory.createRelation( type, basicTarget ) );\n }\n }", "public static void main(String args[]) {\n Model model = ModelFactory.createDefaultModel(); \n\n//set namespace\n Resource NAMESPACE = model.createResource( relationshipUri );\n \tmodel.setNsPrefix( \"rela\", relationshipUri);\n \n// Create the types of Property we need to describe relationships in the model\n Property childOf = model.createProperty(relationshipUri,\"childOf\"); \n Property siblingOf = model.createProperty(relationshipUri,\"siblingOf\");\n Property spouseOf = model.createProperty(relationshipUri,\"spouseOf\");\n Property parentOf = model.createProperty(relationshipUri,\"parentOf\"); \n \n \n// Create resources representing the people in our model\n Resource Siddharth = model.createResource(familyUri+\"Siddharth\");\n Resource Dhvanit = model.createResource(familyUri+\"Dhvanit\");\n Resource Rekha = model.createResource(familyUri+\"Rekha\");\n Resource Sandeep = model.createResource(familyUri+\"Sandeep\");\n Resource Kanchan = model.createResource(familyUri+\"Kanchan\");\n Resource Pihu = model.createResource(familyUri+\"Pihu\");\n Resource DwarkaPrasad = model.createResource(familyUri+\"Dwarkesh\");\n Resource Shakuntala = model.createResource(familyUri+\"Shakuntala\");\n Resource Santosh = model.createResource(familyUri+\"Santosh\");\n Resource Usha = model.createResource(familyUri+\"Usha\");\n Resource Priyadarshan = model.createResource(familyUri+\"Priyadarshan\");\n Resource Sudarshan = model.createResource(familyUri+\"Sudarshan\");\n Resource Pragya = model.createResource(familyUri+\"Pragya\");\n Resource Shailendra = model.createResource(familyUri+\"Shailendra\");\n Resource Rajni = model.createResource(familyUri+\"Rajni\");\n Resource Harsh = model.createResource(familyUri+\"Harsh\");\n Resource Satendra = model.createResource(familyUri+\"Satendra\");\n Resource Vandana = model.createResource(familyUri+\"Vandana\");\n Resource Priyam = model.createResource(familyUri+\"Priyam\");\n Resource Darshan = model.createResource(familyUri+\"Darshan\");\n Resource Vardhan = model.createResource(familyUri+\"Vardhan\");\n \n List<Statement> list = new ArrayList(); \n list.add(model.createStatement(Dhvanit,spouseOf,Kanchan)); \n list.add(model.createStatement(Sandeep,spouseOf,Rekha)); \n list.add(model.createStatement(DwarkaPrasad,spouseOf,Shakuntala)); \n list.add(model.createStatement(Santosh,spouseOf,Usha)); \n list.add(model.createStatement(Shailendra,spouseOf,Rajni)); \n list.add(model.createStatement(Satendra,spouseOf,Vandana)); \n list.add(model.createStatement(Sandeep,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Sandeep,childOf,Shakuntala)); \n list.add(model.createStatement(Santosh,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Santosh,childOf,Shakuntala)); \n list.add(model.createStatement(Shailendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Shailendra,childOf,Shakuntala)); \n list.add(model.createStatement(Satendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Satendra,childOf,Shakuntala)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Sandeep)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Santosh)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Shailendra)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Satendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Sandeep)); \n list.add(model.createStatement(Shakuntala,parentOf,Santosh)); \n list.add(model.createStatement(Shakuntala,parentOf,Shailendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Satendra)); \n list.add(model.createStatement(Sandeep,parentOf,Siddharth)); \n list.add(model.createStatement(Sandeep,parentOf,Dhvanit)); \n list.add(model.createStatement(Rekha,parentOf,Siddharth)); \n list.add(model.createStatement(Rekha,parentOf,Dhvanit)); \n list.add(model.createStatement(Siddharth,childOf,Rekha)); \n list.add(model.createStatement(Dhvanit,childOf,Rekha)); \n list.add(model.createStatement(Siddharth,childOf,Sandeep)); \n list.add(model.createStatement(Dhvanit,childOf,Sandeep)); \n list.add(model.createStatement(Harsh,childOf,Shailendra)); \n list.add(model.createStatement(Harsh,childOf,Rajni)); \n list.add(model.createStatement(Shailendra,parentOf,Harsh)); \n list.add(model.createStatement(Rajni,parentOf,Harsh)); \n list.add(model.createStatement(Santosh,parentOf,Priyadarshan)); \n list.add(model.createStatement(Santosh,parentOf,Sudarshan));\n list.add(model.createStatement(Santosh,parentOf,Pragya));\n list.add(model.createStatement(Usha,parentOf,Priyadarshan)); \n list.add(model.createStatement(Usha,parentOf,Sudarshan));\n list.add(model.createStatement(Usha,parentOf,Pragya));\n list.add(model.createStatement(Priyadarshan,childOf,Santosh));\n list.add(model.createStatement(Pragya,childOf,Santosh));\n list.add(model.createStatement(Sudarshan,childOf,Santosh));\n list.add(model.createStatement(Priyadarshan,childOf,Usha));\n list.add(model.createStatement(Pragya,childOf,Usha));\n list.add(model.createStatement(Sudarshan,childOf,Usha));\n list.add(model.createStatement(Satendra,parentOf,Priyam)); \n list.add(model.createStatement(Satendra,parentOf,Darshan));\n list.add(model.createStatement(Satendra,parentOf,Vardhan));\n list.add(model.createStatement(Vandana,parentOf,Priyam)); \n list.add(model.createStatement(Vandana,parentOf,Darshan));\n list.add(model.createStatement(Vandana,parentOf,Vardhan));\n list.add(model.createStatement(Priyam,childOf,Satendra));\n list.add(model.createStatement(Darshan,childOf,Satendra));\n list.add(model.createStatement(Vardhan,childOf,Satendra));\n list.add(model.createStatement(Priyam,childOf,Vandana));\n list.add(model.createStatement(Darshan,childOf,Vandana));\n list.add(model.createStatement(Vardhan,childOf,Vandana));\n list.add(model.createStatement(Pihu,childOf,Dhvanit));\n list.add(model.createStatement(Pihu,childOf,Kanchan));\n list.add(model.createStatement(Dhvanit,parentOf,Pihu));\n list.add(model.createStatement(Kanchan,parentOf,Pihu));\n list.add(model.createStatement(Siddharth,siblingOf,Dhvanit));\n list.add(model.createStatement(Dhvanit,siblingOf,Siddharth)); \n list.add(model.createStatement(Priyadarshan,siblingOf,Sudarshan));\n list.add(model.createStatement(Priyadarshan,siblingOf,Pragya));\n list.add(model.createStatement(Sudarshan,siblingOf,Priyadarshan));\n list.add(model.createStatement(Sudarshan,siblingOf,Pragya));\n list.add(model.createStatement(Pragya,siblingOf,Priyadarshan));\n list.add(model.createStatement(Pragya,siblingOf,Sudarshan)); \n list.add(model.createStatement(Priyam,siblingOf,Darshan));\n list.add(model.createStatement(Priyam,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Darshan));\n list.add(model.createStatement(Santosh,siblingOf,Sandeep));\n list.add(model.createStatement(Santosh,siblingOf,Shailendra));\n list.add(model.createStatement(Santosh,siblingOf,Satendra));\n list.add(model.createStatement(Sandeep,siblingOf,Santosh));\n list.add(model.createStatement(Sandeep,siblingOf,Shailendra));\n list.add(model.createStatement(Sandeep,siblingOf,Satendra));\n list.add(model.createStatement(Shailendra,siblingOf,Santosh));\n list.add(model.createStatement(Shailendra,siblingOf,Sandeep));\n list.add(model.createStatement(Shailendra,siblingOf,Satendra));\n list.add(model.createStatement(Satendra,siblingOf,Shailendra));\n list.add(model.createStatement(Satendra,siblingOf,Santosh));\n list.add(model.createStatement(Satendra,siblingOf,Sandeep));\n \n model.add(list);\n try{\n \t File file=new File(\"/Users/siddharthgupta/Documents/workspace/FamilyModel/src/family/family.rdf\");\n \t \tFileOutputStream f1=new FileOutputStream(file);\n \t \tRDFWriter d = model.getWriter(\"RDF/XML-ABBREV\");\n \t \t\t\td.write(model,f1,null);\n \t\t}catch(Exception e) {}\n }", "public final native String getRelationship() /*-{\n return this.getRelationship();\n }-*/;", "@Override\n public String toString() {\n return \"Apartment(To rent){\" + \"id = \" + id + \n \"description=\" + description + \"price=\" + price + \"rooms=\" + rooms + \"mail= \" + mail + \", name = \" + name + \", phoneNr = \" + phoneNr \n + \"'}'\";\n }", "@Override\r\n\tpublic List<Map<String, Object>> agentSaleRelationship(String agentname) {\n\t\treturn agentMapper.agentSaleRelationship(agentname);\r\n\t}", "public String get_relation() {\n\t\treturn relation;\n\t}", "private void changeRelationshipListApi(List<EntityRelationshipType> relationList, LosConfigDetails owner,\n\t\t\tLosConfigDetails owned, LosConfigDetails subsidary, EntityRelationshipType changingRelation) {\n\t\tLong relationTypeId = getRelationTypeId(changingRelation);\n\t\tif (changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(subsidary);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owned);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNED)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.SUBSIDIARY)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t}\n\t\trelationList.add(changingRelation);\n\t}", "public interface RfpHotel extends RfpCompany {\n\n EntityImage getImage();\n\n int getRating();\n\n HotelChain getChain();\n\n List<String> getAmenities();\n\n HotelCategory getCategory();\n\n String getBrandChainName();\n\n String getMasterChainName();\n\n String getMasterChainId();\n}", "public java.lang.String getRELATION_ID() {\r\n return RELATION_ID;\r\n }", "@Override\n\tpublic Object getModel() \n\t{\n\t\treturn room;\n\t}", "public void setRois(Roi[] rois) {\n this.rois = rois;\n }", "public String getRightRoadId() {\n return rightRoadId;\n }", "public void setRogue(Rogue newRogue) {\n gameRoomBelongsTo = newRogue;\n }", "public org.LexGrid.relations.Relations[] getRelations() {\n return relations;\n }", "protected com.ibm.ivj.ejb.associations.interfaces.SingleLink getPeopleLink() {\n\tif (peopleLink == null)\n\t\tpeopleLink = new ChangeLogToPeopleLink(this);\n\treturn peopleLink;\n}", "public String toString() {\n\t\treturn \"Road from \" + getLeave() + \" to \" + getArrive() + \" with toll \" + getToll();\n\t}", "@Override\n\tpublic LinkedList<Vehicle> getUserRentHistory() {\n\t\treturn this.vehiclesRented;\n\t}", "public Set<OpconRegitemRelation> getOpconRegitemRelation() {\n return opconRegitemRelation;\n }", "void setFurtherRelations(ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations furtherRelations);", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "public ArrayList<Journey> loadHistory(ArrayList<Contact> contactList, ArrayList<Road> roadList)\n\t{\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.JourneyTable.JOURNEY_ID[0] + \", \" +\n\t\t\t\tDBContract.JourneyTable.DATE[0] + \", \" + DBContract.JourneyTable.ROADNAME[0] +\n\t\t\t\t\" FROM \" + DBContract.JourneyTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Journey> result = new ArrayList<Journey>();\n\t\t\n\t\t/* Contruction du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\twhile(!cursor.isAfterLast())\n\t\t\t{\n\t\t\t\t/* Requete SQL secondaire pour construire les sous-listes de contacts */\n\t\t\t\tlong id = cursor.getLong(0);\n\t\t\t\tCursor contacts = mainDatabase.rawQuery(\"SELECT \" +\n\t\t\t\t\t\tDBContract.JourneyContactTable.CONTACT_ID[0] + \" FROM \" + DBContract.JourneyContactTable.TABLE_NAME +\n\t\t\t\t\t\t\" WHERE \" + DBContract.JourneyContactTable.JOURNEY_ID[0] + \"=\" + Long.toString(id), null);\n\t\t\t\t\n\t\t\t\t/* Construction de la liste de contact sur base de l'ArrayList contactList */\n\t\t\t\tArrayList<Contact> subList = new ArrayList<Contact>();\n\t\t\t\tif(contacts.moveToFirst())\n\t\t\t\t{\n\t\t\t\t\twhile(!contacts.isAfterLast())\n\t\t\t\t\t{\n\t\t\t\t\t\t//TODO mod -1\n\t\t\t\t\t\tLog.d(\"debug\", \"contact id found in database : \" + contacts.getLong(0));\n\t\t\t\t\t\tsubList.add(contactList.get((int) (contacts.getLong(0) - 1)));\n\t\t\t\t\t\tcontacts.moveToNext();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontacts.close();\n\t\t\t\t\n\t\t\t\t/* Ajout du nouveau Journey a result */\n\t\t\t\tJourney newJourney;\n\t\t\t\tRoad newRoad = findByName(cursor.getString(2), roadList);\n\t\t\t\tDate newDate;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tnewDate = df.parse(cursor.getString(1));\n\t\t\t\t}\n\t\t\t\tcatch (ParseException e)\n\t\t\t\t{\n\t\t\t\t\tLog.e(\"error\", \"Unvalid date format found in Journey \" + cursor.getLong(0));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\tif(newRoad==null)\n\t\t\t\t{\n\t\t\t\t\tLog.e(\"error\", \"Unvalid roadName found in Journey \" + cursor.getLong(0));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tnewJourney = new Journey(subList, newRoad, newDate);\n\t\t\t\t}\n\t\t\t\tcatch(EmptyContactListException e)\n\t\t\t\t{\n\t\t\t\t\tLog.e(\"error\", \"No contacts linked to this Journey (id:\" + cursor.getLong(0) + \")\");\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\tresult.add(newJourney);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\t//TODO debug print\n\t\tLog.d(\"info\",\"History loaded successfully - \" + result.size() + \" entries loaded\");\n\t\treturn result;\n\t}", "public void setRelateId(Long relateId) {\n this.relateId = relateId;\n }", "Object getROIs();", "@Override\n public String toString() {\n return\n ownerId + \"|\" + petId + \"|\" + name + \"|\" + species + \"|\" + gender + \"|\" + active + \"|\" + breed + \"|\" +\n color + \"|\" + birthdayOffset + \"|\" + comment + \"|\" + refVet1 + \"|\" + refVet2 + \"|\" +\n primaryDoctorId + \"|\" + firstVisitOffset + \"|\" + lastVisitOffset + \"|\" + weight;\n }", "@Override\r\n\tpublic List<Map<String, Object>> agentBuyRelationship(String agentname) {\n\t\treturn agentMapper.agentBuyRelationship(agentname);\r\n\t}", "private static void addDoorsLR(Room roomAdjacent, Room roomCurrent) {\n\t\tA_Passage pass = new PassageHorizontal(roomAdjacent, roomCurrent);\n\t\t_maze.addPassage(pass);\n\t\troomAdjacent.addDoor(pass.getDoorFirst());\n\t\troomCurrent.addDoor(pass.getDoorSecond());\n\t\t_interactive.addArray(new I_UserInteract[] { pass.getDoorSecond(),\n\t\t\t\tpass.getDoorFirst(), pass, roomAdjacent, roomCurrent });\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Refueling [OrderID=\" + OrderID + \", ownerID=\" + ownerID + \", CarNumber=\" + CarNumber + \", GasStation=\"\r\n\t\t\t\t+ GasStation + \", address=\" + address + \", GasType=\" + GasType + \", RateForLiter=\" + RateForLiter\r\n\t\t\t\t+ \", Qunatity=\" + Qunatity + \", Price=\" + Price + \", Date=\" + Date + \", pumpNumber=\" + pumpNumber\r\n\t\t\t\t+ \", service=\" + service + \", time=\" + time + \", saleID=\" + saleID + \"]\";\r\n\t}", "public String getARo() {\r\n return aRo;\r\n }", "private void changingRelations(LosConfigDetails owner, LosConfigDetails owned, LosConfigDetails subsidary,\n\t\t\tString commercialSuffix, List<String> childIds, ParentEntityNode parent) {\n\t\tparent.setChildren(Arrays.asList());\n\t\tchildIds.add(parent.getChildId());\n\t\tLong relationId = getConfigId(parent);\n\t\tif ((long) relationId == LOSEntityConstants.OWNER && parent.getParentId().endsWith(commercialSuffix)\n\t\t\t\t&& parent.getChildId().endsWith(commercialSuffix)) {\n\t\t\tparent.setLosConfigDetails(subsidary);\n\t\t} else if ((long) relationId == LOSEntityConstants.OWNER) {\n\t\t\tparent.setLosConfigDetails(owned);\n\t\t} else if ((long) relationId == LOSEntityConstants.OWNED) {\n\t\t\tparent.setLosConfigDetails(owner);\n\t\t} else if ((long) relationId == LOSEntityConstants.SUBSIDIARY) {\n\t\t\tparent.setLosConfigDetails(owner);\n\t\t}\n\t}", "@Override\n public String toString() {\n return \"CapteurVitesse(\"+sonRail+\",PositionSurRail:\"+positionSurRail+\")\";\n }", "public static void createAggregatedRelationship (AbstractStructureElement from, AbstractStructureElement to, ArrayList<KDMRelationship> relations) {\n\t\tif (from.getAggregated().size() > 0) {\r\n\t\t\t//System.out.println(\"MAIOR QUE 1, TODO\");\r\n\r\n\t\t\t//Andre - pega os aggragated que ja estão no from\r\n\t\t\tEList<AggregatedRelationship> aggregatedFROM = from.getAggregated();\t\t\r\n\r\n\t\t\t//Andre - começa um for nesses aggregated\r\n\t\t\tfor (int i = 0; i < aggregatedFROM.size(); i++) {\r\n\r\n\t\t\t\t//Andre - verifica se o aggregated que ja existe tem o mesmo destino que o que esta pra ser criado \r\n\t\t\t\tif (to.getName().equalsIgnoreCase(aggregatedFROM.get(i).getTo().getName())) {\r\n\r\n\t\t\t\t\t//Andre - se tiver o mesmo destino ele adiciona as relacoes novas e atualiza a densidade, depois disso ele pega e sai do for\r\n\t\t\t\t\t//ADICIONAR\r\n\r\n\t\t\t\t\taggregatedFROM.get(i).setDensity(aggregatedFROM.get(i).getDensity()+relations.size());\r\n\t\t\t\t\taggregatedFROM.get(i).getRelation().addAll(relations);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Andre - se for o ultimo aggregated do for e mesmo assim não encontrou o com o mesmo destino que esta pra ser criado \r\n\t\t\t\t//Andre - entao cria um novo aggregated para ser adicionado\r\n\t\t\t\t//se chegar no ultimo e nao encontrar\r\n\t\t\t\tif (i == (aggregatedFROM.size()-1)) {\r\n\r\n\t\t\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\t\t\tnewRelationship.setFrom(from);\r\n\t\t\t\t\tnewRelationship.setTo(to);\r\n\t\t\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t//Andre - se não tiver um agrregated na layer from adiciona um com as relacoes que podem entre duas layers\r\n\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\tnewRelationship.setFrom(from);\r\n\t\t\tnewRelationship.setTo(to);\r\n\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t}\r\n\r\n\t\t//Fernando - Limpando lista \r\n\t\trelations.clear();\r\n\t\tfrom = null;\r\n\t\tto = null;\r\n\r\n\r\n\t}", "public Relationship getRelationship() {\n\t\treturn relationship;\n\t}", "public String[] listRelations();", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }" ]
[ "0.51777494", "0.48262832", "0.48166475", "0.4804603", "0.4796827", "0.475835", "0.4736072", "0.4700653", "0.46794108", "0.4673738", "0.46307474", "0.4618268", "0.46178693", "0.4548553", "0.45131868", "0.4494408", "0.44911596", "0.44756335", "0.447545", "0.44652542", "0.44497213", "0.44433016", "0.44413903", "0.44377232", "0.4434055", "0.44323722", "0.4424103", "0.4408706", "0.44073403", "0.44072762", "0.4403014", "0.43976438", "0.43904215", "0.43816525", "0.43803093", "0.43760943", "0.43724608", "0.43503428", "0.4347123", "0.4344988", "0.43425003", "0.43371606", "0.43319452", "0.4331678", "0.43298566", "0.43238285", "0.43230414", "0.4322816", "0.43169206", "0.43059373", "0.42964643", "0.4287444", "0.42853191", "0.42840794", "0.42822006", "0.4281376", "0.42683807", "0.42604846", "0.42604467", "0.4256846", "0.42513302", "0.42496154", "0.4246034", "0.42401987", "0.42352337", "0.42335272", "0.42322034", "0.42318422", "0.42256114", "0.42213815", "0.42201093", "0.42192933", "0.42121404", "0.42092392", "0.42011812", "0.42002454", "0.4199621", "0.41976097", "0.41971555", "0.41911453", "0.4182023", "0.41817436", "0.4176117", "0.41717362", "0.41675672", "0.4163792", "0.41624165", "0.4159216", "0.41581988", "0.41529682", "0.41518354", "0.4149471", "0.4144995", "0.41419837", "0.41415456", "0.41388446", "0.4138173", "0.41380182", "0.41355115", "0.4133638", "0.41280234" ]
0.0
-1
Creates a list of entries for dates from a start and end date:
public void createDateList(Connection connection) throws SQLException { Scanner scan = new Scanner(System.in); DatabaseMetaData dmd = connection.getMetaData(); ResultSet rs = dmd.getTables(null, null, "DATELIST", null); if (rs != null) { System.out.print("Please provide a start date: "); LocalDate start = LocalDate.parse(scan.nextLine()); System.out.print("Please provide an end date: "); LocalDate end = LocalDate.parse(scan.nextLine()); while (!start.isAfter(end)){ String sql = "INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); pStmt.setString(1, start.toString()); pStmt.setString(2, end.toString()); try { pStmt.executeUpdate(); } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } } } else { System.out.println("ERROR: Error loading CUSTOMER Table."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }", "public List<Food> getPortionedFoodsInDateTimeRange(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToPortionedFoods(entriesInRange);\n }", "public List<Login> getUsers(Date startDate, Date endDate);", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public static List<Row> filterDate(List<Row> inputList, LocalDateTime startOfDateRange, LocalDateTime endOfDateRange) {\n\t\t//checks to ensure that the start of the range (1st LocalDateTime input) is before the end of the range (2nd LocalDateTime input)\n\t\tif(startOfDateRange.compareTo(endOfDateRange) > 0) {\n\t\t\t//if not, then send an error and return empty list\n\t\t\tGUI.sendError(\"Error: start of date range must be before end of date range.\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\n\t\tList<Row> outputList = new ArrayList<>();\n\n\t\t//iterate through inputList, adding all rows that fall within the specified date range to the outputList\n\t\tfor(Row row : inputList) {\n\t\t\tif(row.getDispatchTime().compareTo(startOfDateRange) >= 0 && row.getDispatchTime().compareTo(endOfDateRange) <= 0) {\n\t\t\t\toutputList.add(row);\n\t\t\t}\n\t\t}\n\n\t\t//outputList is returned after being populated\n\t\treturn outputList;\n\t}", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public List<Food> getFoodsInDateTimeRange(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToFoods(entriesInRange);\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "public java.util.List<DataEntry> findAll(int start, int end);", "private void getRecords(LocalDate startDate, LocalDate endDate) {\n foods = new ArrayList<>();\n FoodRecordDao dao = new FoodRecordDao();\n try {\n foods = dao.getFoodRecords(LocalDate.now(), LocalDate.now(), \"\");\n } catch (DaoException ex) {\n Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public static ArrayList<String> datespanToList(String datePattern,String dateSpan)\n\t{\n\t\tArrayList<String> listDate = new ArrayList<String>();\n\t\tString fromDate = \"\";\n\t\tString toDate = \"\";\n\t\tint index = dateSpan.indexOf(\"-\");\n\t\tif(index!=-1)\n\t\t{\n\t\t\tfromDate = dateSpan.substring(0,index);\n//\t\t\tSystem.out.println(\"fromDate=\"+fromDate);\n\t\t\ttoDate = dateSpan.substring(index+1);\n//\t\t\tSystem.out.println(\"toDate=\"+toDate);\n\t\t\tif(fromDate.compareTo(toDate)>0)\n\t\t\t\treturn listDate;\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tDate d;\n\t\t\ttry {\n\t\t\t\tSimpleDateFormat sf = new SimpleDateFormat(datePattern);\n\t\t\t\td = sf.parse(fromDate);\n\t\t\t\tc.setTime(d);\n//\t\t\t\tSystem.out.println(TimeOperator.timeFormatConvert(\"yyMMdd\",c.getTime()));\n\t\t\t\tString tempDate = \"\";\n\t\t\t\tfor(int i=1;i<5000;i++)//should not be more than 5000 days!\n\t\t\t\t{\n\t\t\t\t\ttempDate = TimeOperator.timeFormatConvert(datePattern,c.getTime());\n\t\t\t\t\tlistDate.add(tempDate);\n\t\t\t\t\tif(toDate.equals(tempDate))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tc.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tlistDate.add(dateSpan);\n\t\treturn listDate;\n\t}", "protected List<String> getAxisList(Date startDate, Date endDate, int calendarField) {\n List<String> stringList = new ArrayList<String>();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date tempDate = startDate;\n Calendar tempCalendar = Calendar.getInstance();\n tempCalendar.setTime(tempDate);\n\n while (tempDate.before(endDate)) {\n stringList.add(simpleDateFormat.format(tempDate));\n tempCalendar.add(calendarField, 1);\n tempDate = tempCalendar.getTime();\n }\n\n return stringList;\n }", "void setDateRange(Date start, Date end);", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public ArrayList<Event> getCalendarEventsBetween(Calendar startingDate, Calendar endingDate)\n {\n ArrayList<Event> list = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n Calendar eventCalendar = events.get(i).getCalendar();\n\n if(isSame(startingDate, eventCalendar) || isSame(endingDate, eventCalendar) ||\n (eventCalendar.before(endingDate) && eventCalendar.after(startingDate)))\n {\n list.add(events.get(i));\n }\n }\n return list;\n }", "public ArrayList<Event> getEventsByInterval(Calendar initial_date, Calendar final_date) {\n\t\tArrayList<Event> result = new ArrayList<Event>();\n\t\tboolean insert = true;\n\t\t\n\t\tfor (int i = 0; i < events.size(); i++) {\t\t\t\n\t\t\tif (initial_date != null && final_date != null) {\t\t\n\t\t\t\tif (!events.get(i).getInitial_date().after(initial_date)\n\t\t\t\t\t\t|| !events.get(i).getFinal_date().before(final_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t} else if (initial_date != null) {\n\t\t\t\tif (!events.get(i).getInitial_date().after(initial_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t} else if (final_date != null) {\n\t\t\t\tif (!events.get(i).getFinal_date().before(final_date)) {\n\t\t\t\t\tinsert = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (insert) {\n\t\t\t\tresult.add(events.get(i));\n\t\t\t}\n\t\t\tinsert = true;\n\t\t}\n\t\treturn result;\n\t}", "public List<ServiceType> getAllByDate(Date startDate , Date endDate) {\n\t\t// TODO Auto-generated method stub\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tsession.beginTransaction();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList <ServiceType> lst =(List<ServiceType>) session.createCriteria(ServiceType.class)\n\t\t.add(Restrictions.ge(\"createDate\", startDate))\n\t\t.add(Restrictions.lt(\"createDate\", endDate))\n\t\t.list();\n\t\tsession.close();\n\t\treturn lst;\n\t}", "@Override\n\tpublic List<Besoin> BesionByDate (String dateStart, String dateEnd) {\n\t\treturn dao.BesionByDate(dateStart, dateEnd);\n\t}", "public List<Idea> getIdeasPublishedBetween(Calendar start, Calendar end) throws DataAccessException {\n List<Idea> ret = new ArrayList<>();\n if (!start.after(end)) {\n try {\n String queryStr = \"select i from Idea i \"\n + \"where i.publishedDate > start and \"\n + \"i.publishedDate < end\";\n Object res = em.createQuery(queryStr)\n .getResultList();\n ret = (List<Idea>) res;\n } catch (PersistenceException | EJBException pe) {\n throw new DataAccessException(pe, \"Error getting ideas between dates\");\n }\n }\n return ret;\n }", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "default List<ZonedDateTime> getExecutionDates(ZonedDateTime startDate, ZonedDateTime endDate) {\n if (endDate.equals(startDate) || endDate.isBefore(startDate)) {\n throw new IllegalArgumentException(\"endDate should take place later in time than startDate\");\n }\n List<ZonedDateTime> executions = new ArrayList<>();\n ZonedDateTime nextExecutionDate = nextExecution(startDate).orElse(null);\n\n if (nextExecutionDate == null) return Collections.emptyList();\n while(nextExecutionDate != null && (nextExecutionDate.isBefore(endDate) || nextExecutionDate.equals(endDate))){\n executions.add(nextExecutionDate);\n nextExecutionDate = nextExecution(nextExecutionDate).orElse(null);\n }\n return executions;\n }", "private void generateMarkedDates() {\n this.markedDates = new HashMap<>();\n for (Task t : logic.getAddressBook().getTaskList()) {\n\n if (markedDates.containsKey(t.getStartDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getStartDate().getDate())) {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getStartDate().getDate(), t.getPriority().getPriorityLevel());\n }\n\n if (markedDates.containsKey(t.getEndDate().getDate())) {\n if (t.getPriority().getPriorityLevel() > markedDates.get(t.getEndDate().getDate())) {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n } else {\n markedDates.put(t.getEndDate().getDate(), t.getPriority().getPriorityLevel());\n }\n }\n }", "protected void addDateRange() {\n addFieldset(startDatePicker, \"Start Date\", \"startDate\");\n addFieldset(endDatePicker, \"End Date\", \"endDate\");\n }", "public List<Book> getBooksFilteredByDate(GregorianCalendar startDate, GregorianCalendar endDate)\r\n\t{\r\n\t\tList<Book> books = new ArrayList<Book>();\r\n\t\tif(startDate.compareTo(endDate) != -1) {\r\n\t\t\tbooks = null;\r\n\t\t}\r\n\t\tfor(Book book : items) {\r\n\t\t\tGregorianCalendar date = book.getPubDate();\r\n\t\t\tboolean beforeEnd = true;\r\n\t\t\tif(endDate != null) {\r\n\t\t\t\tbeforeEnd = date.compareTo(endDate) == -1;\r\n\t\t\t}\r\n\t\t\tboolean afterStart = date.compareTo(startDate) > -1;\r\n\t\t\tif(beforeEnd && afterStart) {\r\n\t\t\t\tbooks.add(book);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn books;\r\n\t}", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "List<Product> findAllByDateCreateBetween(Date startDate, Date endDate);", "List<Map<String, Object>> betweenDateFind(String date1, String date2) throws ParseException;", "public static Iterable<AnalyticsResults> getAllEvents(Date start, Date end) {\n\t\ttry {\n\t\t\treturn Common.query(\n\t\t\t\t\t\"{CALL GetAnalyticsForDateRange(?,?)}\",\n\t\t\t\t\tprocedure -> {\n\t\t\t\t\t\tprocedure.setDate(1, start);\n\t\t\t\t\t\tprocedure.setDate(2, end);\n\t\t\t\t\t},\n\t\t\t\t\tAnalyticsResults::listFromResults\n\t\t\t);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"GetAnalyticsForDateRange\");\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t}", "public Collection<BaseData> getBaseDataByDate(Date startDate, Date endDate){\n\t\tQuery query = em.createQuery(\"from BaseData c where c.date_time >= :sDate AND c.date_time <= :eDate\");\n\t\tquery.setParameter(\"sDate\",startDate);\n\t\tquery.setParameter(\"eDate\", endDate);\n\t\treturn (List<BaseData>)query.getResultList();\n\t}", "@GetMapping(\"/get\")\n public List<Task> getTasksBetweenDateAndTime(@RequestParam(\"dstart\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateStart,\n @RequestParam(\"dend\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateEnd,\n @RequestParam(value = \"number\", required = false, defaultValue = \"0\") int number) {\n return taskService.filterTasks(dateStart, dateEnd, number);\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }", "@Override\n public List<Event> searchByInterval(Date leftDate, Date rightDate) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.dateBegin BETWEEN :leftDate and :rightDate \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"leftDate\", leftDate)\n .setParameter(\"rightDate\", rightDate);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }", "LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);", "public List<DateType> toDateList() {\n List<DateType> result = new ArrayList<>();\n if (fromDate != null) {\n result.add(fromDate);\n }\n if (toDate != null) {\n result.add(toDate);\n }\n if (fromToDate != null) {\n result.add(fromToDate);\n }\n return result;\n }", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "public ArrayList<LogBean> queryLogByDate(int currentPage, Date start,\n\t\t\tDate end, int pageSize) {\n\t\treturn ld.getLogByDate(currentPage,start,end,pageSize);\n\t}", "@Query(value = \"SELECT DATE(created_on),value FROM lost_products WHERE created_on >= ? AND created_on<= ?\", nativeQuery = true)\n List<Object[]> getLostsBetweenDates(LocalDate startDate, LocalDate endDate);", "public List<TimeSheet> getTimeSheetsBetweenTwoDateForAllEmp(LocalDate startDate, LocalDate endDate) {\n log.info(\"Inside TimeSheetService#getTimeSheetByPid Method\");\n return timeSheetRepository.getTimeSheets(startDate, endDate);\n }", "private List<Long> makeListOfDatesLong(HashSet<Calendar> workDays) {\n List<Long> days = new ArrayList<>();\n if (workDays != null) {\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n //days.add(sdf.format(date.getTime()));\n days.add(date.getTimeInMillis());\n }\n }\n return days;\n }", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "static public Vector<File> searchDateFiles(File dir, Date beginDate, Date endDate, String prefix) {\n\n\t\tVector<File> toReturn=new Vector<File>();\n\n\t\t// if directory ha files \n\t\tif(dir.isDirectory() && dir.list()!=null && dir.list().length!=0){\n\n//\t\t\tserach only files starting with prefix\n\n\t\t\t// get sorted array\n\t\t\tFile[] files=getSortedArray(dir, prefix);\n\n\t\t\tif (files == null){\n\t\t\t\tthrow new SpagoBIServiceException(SERVICE_NAME, \"Missing files in specified interval\");\n\t\t\t}\n\n\t\t\t// cycle on all files\n\t\t\tboolean exceeded = false;\n\t\t\tfor (int i = 0; i < files.length && !exceeded; i++) {\n\t\t\t\tFile childFile = files[i];\n\n\t\t\t\t// extract date from file Name\n\t\t\t\tDate fileDate=null;\n\t\t\t\ttry {\n\t\t\t\t\tfileDate = extractDate(childFile.getName(), prefix);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tlogger.error(\"error in parsing log file date, file will be ignored!\",e);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// compare beginDate and timeDate, if previous switch file, if later see end date\n\t\t\t\t// compare then end date, if previous then endDate add file, else exit\n\n\t\t\t\t// if fileDate later than begin Date\n\t\t\t\tif(fileDate !=null && fileDate.after(beginDate)){\n\t\t\t\t\t// if end date later than file date\n\t\t\t\t\tif(endDate.after(fileDate)){\n\t\t\t\t\t\t// it is in the interval, add to list!\n\t\t\t\t\t\ttoReturn.add(childFile);\n\t\t\t\t\t}\n\t\t\t\t\telse { // if file date is later then end date, we are exceeding interval\n\t\t\t\t\t\texceeded = true;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "public DateRange getDateRange();", "public void addEvent(String date, String name, String start, String end) {\n\n // Create event based on the parameters\n Event event = new Event(name, start, end);\n\n Boolean foundEventList = false;\n\n for (EventList e : events) {\n if (e.getDate().equals(date)) {\n e.add(event);\n foundEventList = true;\n break;\n }\n }\n\n if (!foundEventList) {\n EventList eventList = new EventList(date);\n eventList.add(event);\n events.add(eventList);\n }\n\n update();\n }", "public List<String> getListOfAllWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.DAY_OF_MONTH, -7);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n }\n\n return list;\n }", "public List<String> getListOfWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n int count = 1;\n\n while (current.compareTo(first) > 0) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n\n if (count <= 4) {\n c.add(Calendar.DAY_OF_MONTH, -7);\n } else if (count <= 16) {\n c.add(Calendar.MONTH, -1);\n } else {\n c.add(Calendar.YEAR, -1);\n }\n\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n count++;\n }\n\n return list;\n }", "public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {\n\n ArrayList<String> yyyyMMList = new ArrayList<String>();\n try {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(dateFrom.split(\"-\")[0]), Integer.parseInt(dateFrom.split(\"-\")[1]) - 1, Integer.parseInt(dateFrom.split(\"-\")[2]));\n\n String yyyyTo = dateTo.split(\"-\")[0];\n String mmTo = Integer.parseInt(dateTo.split(\"-\")[1]) + \"\";\n if (mmTo.length() < 2) {\n mmTo = \"0\" + mmTo;\n }\n String yyyymmTo = yyyyTo + mmTo;\n\n while (true) {\n String yyyy = calendar.get(Calendar.YEAR) + \"\";\n String mm = (calendar.get(Calendar.MONTH) + 1) + \"\";\n if (mm.length() < 2) {\n mm = \"0\" + mm;\n }\n yyyyMMList.add(yyyy + mm);\n\n if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {\n break;\n }\n calendar.add(Calendar.MONTH, 1);\n }\n return yyyyMMList;\n } catch (Exception e) {\n throw new Exception(\"getYYYYMMList : dateFrom(yyyy-mm-dd)=\" + dateFrom + \" : dateTo(yyyy-mm-dd)\" + dateTo + \" : \" + e.toString());\n }\n }", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public List<String> retrieveByDate(List<String> jobId, String userId,\n Calendar startDate, Calendar endDate) throws DatabaseException, IllegalArgumentException;", "void generateResponseHistory(LocalDate from, LocalDate to);", "public String getInDateTimeRangeToString(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToString(entriesInRange);\n }", "public List<LocalDate> createLocalDates( final int size ) {\n\n\t\tfinal List<LocalDate> list = new ArrayList<>(size);\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tlist.add(LocalDate.ofEpochDay(i));\n\t\t}\n\n\t\treturn list;\n\t}", "public static SortedMap<Date, Set<Task>> calendar(Iterable<Task> tasks, Date start, Date end) throws Exception {\n TreeMap<Date, Set<Task>> calendar = new TreeMap<Date, Set<Task>>();\n for (Task task : Tasks.incoming(tasks, start, end))\n for (Date date : Tasks.events(task, start, end))\n if (!calendar.keySet().contains(date)) {\n Set<Task> tasksSet = new HashSet<>();\n tasksSet.add(task);\n calendar.put(date, tasksSet);\n } else {\n Set<Task> tasksSetNew = calendar.get(date);\n tasksSetNew.add(task);\n calendar.put(date, tasksSetNew);\n }\n return calendar;\n }", "@WebMethod public ArrayList<Event> getEvents(LocalDate date);", "public List<Reserva> getReservasPeriod(String dateOne, String dateTwo){\n /**\n * Instancia de SimpleDateFormat para dar formato correcto a fechas.\n */\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n /**\n * Crear nuevos objetos Date para recibir fechas fomateadas.\n */\n Date dateOneFormatted = new Date();\n Date dateTwoFormatted = new Date();\n /**\n * Intentar convertir las fechas a objetos Date; mostrar registro de\n * la excepción si no se puede.\n */\n try {\n dateOneFormatted = parser.parse(dateOne);\n dateTwoFormatted = parser.parse(dateTwo);\n } catch (ParseException except) {\n except.printStackTrace();\n }\n /**\n * Si la fecha inicial es anterior a la fecha final, devuelve una lista\n * de Reservas creadas dentro del intervalo de fechas; si no, devuelve\n * un ArrayList vacío.\n */\n if (dateOneFormatted.before(dateTwoFormatted)){\n return repositorioReserva.findAllByStartDateAfterAndStartDateBefore\n (dateOneFormatted, dateTwoFormatted);\n } else {\n return new ArrayList<>();\n }\n }", "public ArrayList<Salary> getSalariesByStartDateAndEndDateAndEmployeeId(String startDate,\n String endDate,\n String employeeId) {\n ArrayList<Salary> salaries = new ArrayList<>();\n for (Salary s : allSalaries.values()) {\n if (s.getEmployeeId().equals(employeeId)) {\n try {\n Date start = CalendarUtil.sdfDayMonthYear.parse(startDate);\n Date currentStart = CalendarUtil.sdfDayMonthYear.parse(EventRepository.getInstance()\n .getEventByEventId(s.getEventId()).getNgayBatDau());\n Date end = CalendarUtil.sdfDayMonthYear.parse(endDate);\n Date currentEnd = CalendarUtil.sdfDayMonthYear.parse(EventRepository.getInstance()\n .getEventByEventId(s.getEventId()).getNgayKetThuc());\n if ((start.compareTo(currentStart) <= 0 && currentStart.compareTo(end) <= 0) ||\n start.compareTo(currentEnd) <= 0 && currentEnd.compareTo(end) <= 0) {\n salaries.add(s);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n return salaries;\n }", "public Vector<Event> getEventsInDay(Date par){\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<Event> result = new Vector<Event>();\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n \n SimpleDateFormat format1 = new SimpleDateFormat(\"dd-MM-YY\");\n \n //build the sql statement\n String sql = \"select * from event where to_date('\" + format1.format(par) + \"','DD-MM-YY') \";\n sql+= \"between to_date(start_time,'DD-MM-YY') and to_date(end_time,'DD-MM-YY')\";\n \n \n //System.out.println(sql);\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql that is constructed using the supplied parameters\n st = con.prepareCall(sql);\n \n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n \n Event e = new Event(rs.getLong(\"id\"),rs.getString(\"id\") + \",\" + rs.getString(\"name\"),rs.getDate(\"start_time\"),rs.getDate(\"end_time\"));\n ;\n result.add(e);\n \n }\n \n }\n catch (SQLException e){\n e.printStackTrace();\n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n \n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n return result;\n \n \n }", "@Override\n public List<UserQuery> getQueries(LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserQuery.class));\n return handle.createQuery(UserQuery.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(UserQuery.class)\n .list();\n });\n }", "public List<Transaction> getTransactions(String startdate, String enddate) {\r\n List<Transaction> transactionList = null;\r\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\r\n try {\r\n org.hibernate.Transaction hbtransaction = session.beginTransaction();\r\n Query q = session.createQuery (\"from finance.entity.Transaction trans WHERE (trans.effdate BETWEEN :startdate AND :enddate) AND trans.category.extra = false AND trans.deleted = false ORDER BY trans.effdate, trans.category.sortId\");\r\n q.setParameter(\"startdate\", java.sql.Date.valueOf(startdate));\r\n q.setParameter(\"enddate\", java.sql.Date.valueOf(enddate));\r\n transactionList = (List<Transaction>) q.list();\r\n hbtransaction.commit();\r\n } catch (Exception e) {\r\n throw e;\r\n }\r\n return transactionList;\r\n }", "private static List<DateRange> transformeAdvancedCase(\n final ZonedDateTime startRange,\n final ZonedDateTime endRange,\n final List<DateRange> reservedRanges) {\n\n final List<DateRange> availabilityRanges = new ArrayList<>();\n final List<DateRange> reservedRangesExtended = new ArrayList<>(reservedRanges);\n\n // if first DateRange starts after startRange\n if (reservedRanges.get(0).getStartDate().isAfter(startRange)) {\n // add a synthetic range that ends at startRange. Its startDate is not important\n final DateRange firstSyntheticDateRange = new DateRange(startRange.minusDays(1), startRange);\n reservedRangesExtended.add(0, firstSyntheticDateRange);\n }\n\n // if last DateRange ends before endRange\n if (reservedRanges.get(reservedRanges.size() - 1).getEndDate().isBefore(endRange)) {\n // add a synthetic range that starts at endRange. Its endDate is not important\n final DateRange lastSyntheticDateRange = new DateRange(endRange, endRange.plusDays(1));\n reservedRangesExtended.add(lastSyntheticDateRange);\n }\n\n Iterator<DateRange> iterator = reservedRangesExtended.iterator();\n DateRange current = null;\n DateRange next = null;\n\n while (iterator.hasNext()) {\n\n // On the first run, take the value from iterator.next(), on consecutive runs,\n // take the value from 'next' variable\n current = (current == null) ? iterator.next() : next;\n\n final ZonedDateTime startDate = current.getEndDate();\n\n if (iterator.hasNext()) {\n next = iterator.next();\n final ZonedDateTime endDate = next.getStartDate();\n DateRange availabilityDate = new DateRange(startDate, endDate);\n availabilityRanges.add(availabilityDate);\n }\n }\n\n return availabilityRanges;\n }", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "@Override\n\tpublic List<Affectation> getAllAfByKeyDate(String dateStart, String dateEnd) {\n\t\treturn dao.getAllAfByKeyDate(dateStart, dateEnd);\n\t}", "@Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n List<MeasurementEvent> findForPeriodTest(Date startDate, Date endDate);", "public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByStart(Date... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.START, values);\n }", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "public ArrayList<Foods> DataBaseLogFoodsGetFoods (long initialDate, long finalDate) {\n SQLiteDatabase db = this.getWritableDatabase();\n String query = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \" + COLUMN_DATE + \" BETWEEN \" +\n + initialDate + \" AND \" + finalDate + \" ORDER BY \" + COLUMN_DATE +\n \" ASC\";\n\n Cursor cursor = db.rawQuery(query, null);\n\n cursor.moveToFirst();\n int counter = cursor.getCount();\n ArrayList<Foods> foodsList = new ArrayList<>();\n for ( ; counter > 0; ) {\n if (cursor.isAfterLast()) break;\n Foods food = new Foods();\n food.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_ID)));\n food.setDate(cursor.getLong(cursor.getColumnIndex(COLUMN_DATE)));\n food.setName(cursor.getString(cursor.getColumnIndex(COLUMN_NAME)));\n food.setBrand(cursor.getString(cursor.getColumnIndex(COLUMN_BRAND)));\n food.setUnitsLogged(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS_LOGGED)));\n food.setCaloriesLogged(cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES_LOGGED)));\n food.setUnits(cursor.getFloat(cursor.getColumnIndex(COLUMN_UNITS)));\n food.setUnitType(cursor.getString(cursor.getColumnIndex(COLUMN_UNIT_TYPE)));\n food.setCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_CALORIES)));\n food.setMealTime(cursor.getString(cursor.getColumnIndex(COLUMN_MEAL_TIME)));\n food.setIsCustomCalories(cursor.getInt(cursor.getColumnIndex(COLUMN_IS_CUSTOM_CALORIES)) == 1);\n foodsList.add(food);\n cursor.moveToNext();\n }\n\n cursor.close();\n db.close(); // Closing database connection\n return foodsList;\n }", "public java.util.List<Todo> findAll(int start, int end);", "@Override\n\tpublic List<Affectation> getAllAfByKeyDate(Date dateStart, Date dateEnd) {\n\t\treturn dao.getAllAfByKeyDate(dateStart, dateEnd);\n\t}", "public void fillList(int roomid, String inputdateTo, String inputdateFrom) {\n list = new ArrayList();\n Connection cnn = null;\n Statement st = null;\n ResultSet rs = null;\n\n String sql = \"select sche.scheduleID as ID,shift.shiftname as shiftname,lab.roomName as roomName,d.dateword as datework,\"\n + \" we.keyword as keywork,sche.status as status,sche.dateworkID sdateworkID from tbl_schedule as sche inner join \"\n + \" tbl_shiftname as shift on sche.shiftID=shift.shiftID inner \"\n + \" join tbl_labroom as lab on sche.roomID=lab.roomID inner join \"\n + \" tbl_datework as d on sche.dateworkID=d.datewordID inner join \"\n + \" days_week as we on d.dayID=we.dayID where lab.roomID=\" + roomid;\n if (inputdateTo.trim().length() > 3) {\n sql += \" and d.dateword >='\" + inputdateTo + \"'\";\n }\n if (inputdateFrom.trim().length() > 3) {\n sql += \" and d.dateword <='\" + inputdateFrom + \"'\";\n }\n sql += \" order by ID desc \";\n //String connectionURL = \"jdbc:odbc:sem4\";\n try {\n //Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n //cnn = DriverManager.getConnection(connectionURL, \"lab\", \"\");\n cnn = dbconnect.Connect();\n st = cnn.createStatement();\n rs = st.executeQuery(sql);\n int count = 0;\n String ID = \"\";\n String shiftname = \"\";\n String status = \"\";\n String roomName = \"\";\n String datework = \"\";\n String daysweek = \"\";\n int dateworkID = 0;\n SimpleDateFormat formarter = new SimpleDateFormat(\"EE, MMM d,yyyy\");\n while (rs.next()) {\n count = count + 1;\n ID += rs.getInt(\"ID\") + \"/\";\n shiftname += rs.getString(\"shiftname\") + \"/\";\n roomName = rs.getString(\"roomName\");\n\n datework = formarter.format(rs.getDate(\"datework\"));\n daysweek = rs.getString(\"keywork\");\n status += rs.getString(\"status\") + \"/\";\n dateworkID = rs.getInt(\"sdateworkID\");\n int totalShift = cntShiftShow();\n if (count % totalShift == 0) {\n list.add(new classSchedule(ID, shiftname, roomName, datework, daysweek, status, dateworkID));\n ID = \"\";\n shiftname = \"\";\n status = \"\";\n roomName = \"\";\n datework = \"\";\n daysweek = \"\";\n }\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(showSchedule.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public List<Timetable> getListSearch(String from, String to) throws Exception;", "@Override\r\n\tpublic List<HomePack> queryList(Date start,Date end,List<String> station) {\n\t\tList<HomePack> list = homePageDao.queryList(start,end,station);\r\n\t\treturn list;\r\n\t}", "@Override\r\n\tpublic List<Price> queryPriceBei(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryPriceBei(start,end);\r\n\t\treturn list;\r\n\t}", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "public static List<Long> getData_entryDates() {\r\n\t\treturn data_entryDates;\r\n\t}", "public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }", "public ArrayList<Menu> buscarPorFecha(Date fechaIni,Date fechaTer );", "@SuppressWarnings(\"unchecked\")\n public List<ConnectionMeterEvent> findConnectionMeterEventsForPeriod(LocalDate fromDate, LocalDate endDate) {\n StringBuilder queryString = new StringBuilder();\n queryString.append(\"SELECT cme FROM ConnectionMeterEvent cme \");\n queryString.append(\" WHERE cme.dateTime >= :fromDate \");\n // it is inclusive because i add a day to the endDate\n queryString.append(\" AND cme.dateTime < :endDate \");\n\n Query query = getEntityManager().createQuery(queryString.toString());\n query.setParameter(\"fromDate\", fromDate.toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"endDate\", endDate.plusDays(1).toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n\n return query.getResultList();\n }", "public ArrayList<ConsumptionInstance> generateConsumptionInstances(long start_time, long end_time) {\n GregorianCalendar c = (GregorianCalendar) this.start_date.clone();\n ArrayList<ConsumptionInstance> result = new ArrayList<>();\n Collections.sort(this.timings);\n\n while(c.getTimeInMillis() < end_time + Utility.MILLIS_IN_DAY) {\n for (TimeOfDay t : timings) {\n c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(t.getHour()));\n c.set(Calendar.MINUTE, Integer.valueOf(t.getMinute()));\n long millis = c.getTimeInMillis();\n\n if (start_time <= millis && millis < end_time) {\n ConsumptionInstance ci = new ConsumptionInstance(this.id, (GregorianCalendar) c.clone(),\n this.drug);\n if (deleted.contains(millis)) {\n ci.setDeleted(true);\n }\n result.add(ci);\n }\n }\n c.add(Calendar.DAY_OF_MONTH, this.interval);\n }\n\n return result;\n }", "public void AddAvailableDates()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < openDates.size(); i++)\n\t\t\t{\n\t\t\t\tboolean inTable = CheckAvailableDate(openDates.get(i)); \n\t\t\t\tif(inTable == false)\n\t\t\t\t{\n\t\t\t\t\tquery = \"INSERT INTO Available(available_hid, price_per_night, startDate, endDate)\"\n\t\t\t\t\t\t\t+\" VALUE(\"+hid+\", \"+price+\", '\"+openDates.get(i).stringStart+\"', '\"+openDates.get(i).stringEnd+\"')\";\n\t\t\t\t\tint result = con.stmt.executeUpdate(query); \n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void populateDemo(Connection connection, LocalDate start, LocalDate end) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"DateList\", null);\n\n if (rs != null){\n\n while (!start.isAfter(end)){\n\n String sql = \"INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))\";\n\n String sql1 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql2 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 300)\";\n String sql3 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql4 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql5 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 15, 400)\";\n String sql6 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql7 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 20, 800)\";\n String sql8 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql9 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 25, 1000)\";\n String sql10 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql11 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 350)\";\n String sql12 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Twin Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 250)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n PreparedStatement pStmt1 = connection.prepareStatement(sql1);\n PreparedStatement pStmt2 = connection.prepareStatement(sql2);\n PreparedStatement pStmt3 = connection.prepareStatement(sql3);\n PreparedStatement pStmt4 = connection.prepareStatement(sql4);\n PreparedStatement pStmt5 = connection.prepareStatement(sql5);\n PreparedStatement pStmt6 = connection.prepareStatement(sql6);\n PreparedStatement pStmt7 = connection.prepareStatement(sql7);\n PreparedStatement pStmt8 = connection.prepareStatement(sql8);\n PreparedStatement pStmt9 = connection.prepareStatement(sql9);\n PreparedStatement pStmt10 = connection.prepareStatement(sql10);\n PreparedStatement pStmt11 = connection.prepareStatement(sql11);\n PreparedStatement pStmt12 = connection.prepareStatement(sql12);\n\n pStmt.clearParameters();\n pStmt1.clearParameters();\n pStmt2.clearParameters();\n pStmt3.clearParameters();\n pStmt4.clearParameters();\n pStmt5.clearParameters();\n pStmt6.clearParameters();\n pStmt7.clearParameters();\n pStmt8.clearParameters();\n pStmt9.clearParameters();\n pStmt10.clearParameters();\n pStmt11.clearParameters();\n pStmt12.clearParameters();\n\n pStmt.setString(1, start.toString());\n pStmt1.setString(1, start.toString());\n pStmt2.setString(1, start.toString());\n pStmt3.setString(1, start.toString());\n pStmt4.setString(1, start.toString());\n pStmt5.setString(1, start.toString());\n pStmt6.setString(1, start.toString());\n pStmt7.setString(1, start.toString());\n pStmt8.setString(1, start.toString());\n pStmt9.setString(1, start.toString());\n pStmt10.setString(1, start.toString());\n pStmt11.setString(1, start.toString());\n pStmt12.setString(1, start.toString());\n\n start = start.plusDays(1);\n\n pStmt.setString(2, start.toString());\n pStmt1.setString(2, start.toString());\n pStmt2.setString(2, start.toString());\n pStmt3.setString(2, start.toString());\n pStmt4.setString(2, start.toString());\n pStmt5.setString(2, start.toString());\n pStmt6.setString(2, start.toString());\n pStmt7.setString(2, start.toString());\n pStmt8.setString(2, start.toString());\n pStmt9.setString(2, start.toString());\n pStmt10.setString(2, start.toString());\n pStmt11.setString(2, start.toString());\n pStmt12.setString(2, start.toString());\n\n try {\n pStmt.executeUpdate();\n pStmt1.executeUpdate();\n pStmt2.executeUpdate();\n pStmt3.executeUpdate();\n pStmt4.executeUpdate();\n pStmt5.executeUpdate();\n pStmt6.executeUpdate();\n pStmt7.executeUpdate();\n pStmt8.executeUpdate();\n pStmt9.executeUpdate();\n pStmt10.executeUpdate();\n pStmt11.executeUpdate();\n pStmt12.executeUpdate();\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n pStmt1.close();\n pStmt2.close();\n pStmt3.close();\n pStmt4.close();\n pStmt5.close();\n pStmt6.close();\n pStmt7.close();\n pStmt8.close();\n pStmt9.close();\n pStmt10.close();\n pStmt11.close();\n pStmt12.close();\n }\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public java.util.List<DataEntry> findAll(\n\t\tint start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);", "public List<Viaje> getClientTravelsInPeriod(String clientNif, Date initDate, Date endDate) {\n EntityManager em = getEntityManager();\n return em.createNamedQuery(\"Viaje.getClientTravelsByDate\")\n .setParameter(\"clientNif\", clientNif)\n .setParameter(\"initDate\", initDate)\n .setParameter(\"endDate\", endDate).getResultList();\n }", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfTransactionDate(LocalDate lowerInclusive, LocalDate upperInclusive) {\n return fetchRange(Income.INCOME.TRANSACTION_DATE, lowerInclusive, upperInclusive);\n }", "public ListDatesFiles(DataDate startDate, DownloadMetaData data, ProjectInfoFile project) throws IOException\r\n {\r\n sDate = startDate;\r\n mData = data;\r\n lDates = null;\r\n mapDatesFiles = null;\r\n mProject = project;\r\n mapDatesFiles = null;\r\n mapDatesFilesSet = new Boolean(false);\r\n }", "public void setDateRange(Date start, Date end)\n {\n descriptorManager.readFileDescriptors(start,end);\n }", "@Override\r\n\tpublic void getPhotosByDate(String start, String end) {\n\t\tDate begin=null;\r\n\t\tDate endz=null;\r\n\t\t/*check if valid dates have been passed for both of the variables*/\r\n\t\ttry {\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\r\n\t\t\tdateFormat.setLenient(false);\r\n\t\t\tbegin = dateFormat.parse(start);\r\n\t\t\tendz = dateFormat.parse(end);\r\n\t\t\t}\r\n\t\t\tcatch (ParseException e) {\r\n\t\t\t String error=\"Error: Invalid date for one of inputs\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t\t}\r\n\t\tif(begin.after(endz)){\r\n\t\t\tString error=\"Error: Invalid dates! Your start is after your end\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t}\r\n\t\t/*I don't need the this if but I'm going to keep it\r\n\t\t * to grind your gears*/\r\n\t\tif(endz.before(begin)){\r\n\t\t\tString error=\"Error: Invalid dates! Your end date is before your start\";\r\n\t\t\t setErrorMessage(error);\r\n\t\t\t showError();\r\n\t\t\t return;\r\n\t\t}\r\n\t\tString listPhotos=\"\";\r\n\t\tList<IAlbum> album1=model.getUser(userId).getAlbums();\r\n\t\tString success=\"\";\r\n\t\tString albumNames=\"\";\r\n\t//\tInteractiveControl.PhotoCompare comparePower=new InteractiveControl.PhotoCompare();\r\n\t\tfor(int i=0; i<album1.size();i++){\r\n\t\t\tIAlbum temp=album1.get(i);\r\n\t\t\tList<IPhoto> photoList=temp.getPhotoList();\r\n\t\t\tInteractiveControl.PhotoCompare comparePower=new InteractiveControl.PhotoCompare();\r\n\t\t\tCollections.sort(photoList, comparePower);\r\n\t\t\tfor(int j=0; j<photoList.size();j++){\r\n\t\t\t\tif(photoList.get(j).getDate().after(begin) && photoList.get(j).getDate().before(endz)){\r\n\t\t\t\t\t/* getPAlbumNames(List<IAlbum> albums, String photoId)*/\r\n\t\t\t\t\talbumNames=getPAlbumNames(album1, photoList.get(j).getFileName());\r\n\t\t\t\t\tlistPhotos=listPhotos+\"\"+photoList.get(j).getCaption()+\" - \"+albumNames+\"- Date: \"+photoList.get(j).getDateString()+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuccess=\"Photos for user \"+userId+\" in range \"+start+\" to \"+end+\":\\n\"+listPhotos;\r\n\t\tsetErrorMessage(success);\r\n\t\tshowError();\r\n\t\t\r\n\r\n\t}", "private List<Object[]> getAllVisitInfoFromDailyReportByStartDateAndEndDate(final Date startDate, final Date endDate,\n final Employee_mst selectedEmployee) {\n return this.dailyRepo\n .getAllVisitInfoFromDailyReportByStartDateAndEndDate(selectedEmployee.getEmp_code(), startDate, endDate)\n .getResultList();\n }", "public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }", "public ArrayList<Question> filterByStart(ArrayList<Question> input, LocalDate start) {\n\n /* The final filtered arrayList */\n ArrayList<Question> filtered = new ArrayList<>();\n\n /* Go through the entire input arraylist checking each question. */\n for (int i = 0 ; i < input.size(); i++) {\n\n /* If the question date is after the start date, then add it to the new ArrayList. */\n if (input.get(i).getDate().compareTo(start) >= 0) {\n filtered.add(input.get(i));\n }\n }\n\n return filtered;\n }", "Map<String, List<BuildDetails>> getProjectExecutions(String startDate,\n\t String endDate);", "@Override\n\tpublic List<Equipment> getEquipmentByDate(String dateStart, String dateEnd) {\n\t\treturn dao.getEquipmentByDate(dateStart, dateEnd);\n\t}" ]
[ "0.7009231", "0.69498444", "0.65329903", "0.64257705", "0.6372772", "0.63676393", "0.63311815", "0.6325997", "0.62828755", "0.62800634", "0.62723625", "0.62187004", "0.61844546", "0.6177208", "0.6124976", "0.6123458", "0.609915", "0.6086441", "0.6063628", "0.6050861", "0.6034648", "0.6029146", "0.6022481", "0.5935598", "0.59334415", "0.5921383", "0.58778685", "0.58751714", "0.58743244", "0.587385", "0.58718973", "0.58252466", "0.58158296", "0.5806956", "0.5794042", "0.5784106", "0.57834864", "0.5774128", "0.5772442", "0.576444", "0.5761815", "0.57434297", "0.57416815", "0.5732643", "0.5720197", "0.5719714", "0.5716181", "0.5716159", "0.57124156", "0.5698675", "0.56752014", "0.56573856", "0.56504303", "0.56459", "0.56426364", "0.5639243", "0.563158", "0.56202847", "0.5611581", "0.5608703", "0.55994236", "0.5596644", "0.55959344", "0.5593229", "0.5566421", "0.55569774", "0.55564386", "0.55412674", "0.55358607", "0.55340767", "0.55188835", "0.5518385", "0.55099136", "0.55063206", "0.55057716", "0.549932", "0.54989845", "0.5481545", "0.54810697", "0.54797864", "0.547719", "0.5453572", "0.54521453", "0.5449021", "0.54472476", "0.54465145", "0.54455465", "0.54438865", "0.54383224", "0.54231155", "0.54227215", "0.54193574", "0.5412026", "0.54091424", "0.540667", "0.540625", "0.54016167", "0.53952336", "0.53841996", "0.53768677" ]
0.63009864
8
Finds the available reservation(s) for a customer given their CID:
public void searchCustomerReservations(Connection connection, int CID) throws SQLException { ResultSet rs = null; String sql = "SELECT res_num FROM Reservation WHERE c_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setCID(CID); pStmt.setInt(1, getCID()); try { System.out.printf(" Reservations for C_ID (%d):\n", getCID()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println("Reservation number: " + rs.getInt(1)); } } catch (SQLException e) { e.printStackTrace(); } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Customer> findByKey(String cid) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, parseInt(cid));\n rest = ppst.executeQuery();\n\n while(rest.next()){\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "public Reservation[] findResaClient(int id_client){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tPreparedStatement prepare;\r\n\t\t\tprepare = SC.prepareStatement(\"SELECT * FROM reservation where id_client=?\");\r\n\t\t\tprepare.setInt(1, id_client);\r\n\t\t\tResultSet result = prepare.executeQuery();\r\n\t\t\t\r\n\t\t\tPreparedStatement prepareCount = SC.prepareStatement(\"SELECT COUNT(*) FROM reservation where id_client=?\"); \r\n\t\t\tprepareCount.setInt(1, id_client);\r\n\t\t\tResultSet resultCount = prepareCount.executeQuery();\r\n\t\t\t\r\n\t\t\tReservation[] reservation = new Reservation[resultCount.getInt(1)];\r\n\t\t\tfor(int i=0; i<reservation.length;i++){\r\n\t\t\t\treservation[i] = find(result.getInt(\"Id_reservation\"));\r\n\t\t\t\tresult.next();\r\n\t\t\t}\r\n\t\t\treturn reservation;\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic List<Reservation> rechercherReservation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}", "public static List<ClientReservedTime> getClientReservedTimes(int clientID) {\n\t\tConnection conn = DBConnection.getConnection();\n\t\tList<ClientReservedTime> clientReservedTimes = new ArrayList<>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"SELECT \" +\n\t\t\t\t\t\" r.ID AS id,\" +\n\t\t\t\t\t\" r.DAY_ID AS dayID,\" +\n\t\t\t\t\t\" r.ST_TIME AS startTime,\" +\n\t\t\t\t\t\" r.DURATION AS duration,\" +\n\t\t\t\t\t\" r.RES_CODE_ID AS reserveCode,\" +\n\t\t\t\t\t\" r.RESERVE_GR_TIME AS gregorianDate,\" +\n\t\t\t\t\t\" r.CLIENT_ID as clientID,\" +\n\t\t\t\t\t\" SUM(rs.SERVICE_PRICE) AS cost,\" +\n\t\t\t\t\t\" c.ID AS companyID,\" +\n\t\t\t\t\t\" c.COMP_NAME AS companyName,\" +\n\t\t\t\t\t\" c.COVER_URL AS companyCover,\" +\n\t\t\t\t\t\" u.ID AS unitID,\" +\n\t\t\t\t\t\" u.UNIT_NAME AS unitName,\" +\n\t\t\t\t\t\" IFNULL(com.comment, ' ') AS comment,\" +\n\t\t\t\t\t\" IFNULL(com.SERVICE_RATE, 0) AS commentRate,\" +\n\t\t\t\t\t\" IFNULL(com.ID, 0) AS commentID,\" +\n\t\t\t\t\t\" IFNULL(com.SERVICE_RATE, 0) AS serviceRate,\" +\n\t\t\t\t\t\" IF(com.ID IS NULL and date_add(now(), interval r.DURATION minute)\" +\n \" > r.RESERVE_GR_TIME, TRUE, FALSE) AS commentable\" +\n\t\t\t\t\t\" FROM\" +\n\t\t\t\t\t\" alomonshi.reservetimes r\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" alomonshi.comments com ON com.RES_TIME_ID = r.ID\" +\n\t\t\t\t\t\" AND com.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" reservetimeservices rs ON rs.RES_TIME_ID = r.ID\" +\n\t\t\t\t\t\" AND rs.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" units u ON r.UNIT_ID = u.ID AND u.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" LEFT JOIN\" +\n\t\t\t\t\t\" companies c ON u.COMP_ID = c.ID AND c.IS_ACTIVE IS TRUE\" +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" r.STATUS = \" + ReserveTimeStatus.RESERVED.getValue() +\n\t\t\t\t\t\" AND r.CLIENT_ID = \" + clientID +\n\t\t\t\t\t\" GROUP BY r.ID\" +\n\t\t\t\t\t\" ORDER BY r.DAY_ID DESC, r.ST_TIME DESC \";\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillClientReserveTimeList(rs, clientReservedTimes);\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn clientReservedTimes;\n\t}", "public List<ReservationDTO> seachReservationBypid(int pid) {\n\t\treturn dao.seachReservationBypid(pid);\r\n\t}", "public List<Reservation> getAllEventsForCustomer() {\n\t\tString currentUsername = null;\n\t\ttry {\n\t\t\tcurrentUsername = customerService.getCurrentUserAccount().getUsername();\n\t\t} catch (AnonymusUserException e) {\n\t\t\tLOG.error(\"Cannot get reservations for Customer. Cause: \" + e.getMessage());\n\t\t}\n\t\treturn reservationRepository.findAllByUsername(currentUsername);\n\t}", "@Override\n\tpublic List<Appointment> findCustCarAppoinmentX(int cust_id) {\n\t\treturn appointmentMapper.findCustCarAppoinmentX(cust_id);\n\t}", "List<ISeatHold> findAndHoldSeats(int numSeats, String customerEmail) throws SeatsNotAvailableException;", "private void loadReservation() {\n email = getIntent().getStringExtra(\"USER_EMAIL\");\n list = new ArrayList<>();\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n /*\n Get list reservations of current customer\n */\n db.collection(\"customers\")\n .whereEqualTo(\"customerEmail\", email)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<QuerySnapshot> task) {\n if (task.isSuccessful() && !task.getResult().isEmpty()) {\n DocumentSnapshot doc = task.getResult().getDocuments().get(0);\n String docID = doc.getId();\n db.collection(\"reservations\")\n .whereEqualTo(\"customerId\", docID)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n Reservation res = document.toObject(Reservation.class);\n res.setReservationId(document.getId());\n list.add(res);\n }\n /*\n Binding data to recyclerview\n */\n reserAdap = new ReservationAdapter(list, CancelReservation.this); //Call LecturerAdapter to set data set and show data\n LinearLayoutManager manager = new LinearLayoutManager(CancelReservation.this); //Linear Layout Manager use to handling layout for each Lecturer\n recyclerView.setAdapter(reserAdap);\n recyclerView.setLayoutManager(manager);\n } else {\n\n }\n }\n });\n }\n\n }\n });\n\n }", "@Test\n public void findByCustomerTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n Mockito.when(reservationDao.findByCustomerId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByCustomer(10L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }", "public List<ICase> searchCases(Date date, String CPR, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCPR().equals(CPR) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "@Override\n\tpublic List<BranchInfoVo> creserveList(String id) throws SQLException {\n\t\treturn sqlSession.selectList(\"yes.areserveselectAll\", id);\n\t}", "@Override\n\tpublic List<Reservation> selectionnerReservations(final ContexteConsommation contexte)\n\t\t\tthrows IllegalArgumentException, ContexteConsommationInvalideException {\n\t\treturn null;\n\t}", "public List<ReservationModel> getReservationsByDoctorAndTimeSlot(Integer doctorId, String startDate,\n\t\t\tString startTime) {\n\t\tList<ReservationModel> result = new ArrayList<ReservationModel>();\n\t\tList<Reservation> reservationsList = this.reservationRepository.findByDoctorIdAndTimeSlot(doctorId, startDate,\n\t\t\t\tstartTime);\n\t\tif (reservationsList != null) {\n\t\t\tfor (Reservation reservation : reservationsList) {\n\t\t\t\tresult.add(reservation.toModel(this.mapper));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "String reserveSeats(String seatHoldId, String customerEmail) throws BookingNotAvailableException;", "public List<ReservationModel> findReservationInIdList(Collection<Integer> reservationIds) {\n\t\tList<ReservationModel> result = new ArrayList<ReservationModel>();\n\t\tList<Reservation> reservations = this.reservationRepository.findInIdList(reservationIds);\n\t\tif (reservations != null) {\n\t\t\tfor (Reservation reservation : reservations) {\n\t\t\t\tif (MssContextHolder.getHospitalParentId() != null && MssContextHolder.getHospitalParentId() == 1) {\n\t\t\t\t\tresult.add(reservation.toModel(mapper, \"exclude-departmentAnddoctor\"));\n\t\t\t\t} else {\n\t\t\t\t\tresult.add(reservation.toModel(mapper));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<BookingCus> BookingC() {\n\n try {\n //create a new vector to save the data on DB\n List<BookingCus> bookCus = new ArrayList<BookingCus>();\n //SQL code\n String cmdsql = \"SELECT * FROM BookingCust;\";\n PreparedStatement stmt = connect.prepareStatement(cmdsql);\n ResultSet rs = stmt.executeQuery();\n\n //While there is some register, save it in the list\n while (rs.next()) {\n BookingCus BookingCuslist = new BookingCus();\n\n BookingCuslist.setIdBookingCust(rs.getInt(\"idBookingCust\"));\n BookingCuslist.setidCus(rs.getInt(\"idCus\"));\n BookingCuslist.setfname(rs.getString(\"fname\"));\n BookingCuslist.setDate(rs.getString(\"Date\"));\n BookingCuslist.setTime(rs.getString(\"Time\"));\n\n bookCus.add(BookingCuslist);\n }\n return bookCus;\n\n } catch (SQLException error) {\n JOptionPane.showMessageDialog(null, \"ERROR: FAIL TO BOOK YOUR SLOT, TRY AGAIN!\", \"ERROR MESSAGE!\", JOptionPane.ERROR_MESSAGE);\n }\n return null;\n }", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "@Transactional\r\n\tpublic List<Room> getReservable(Integer posti, LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.getPosti(posti);\r\n\t\tl.removeAll(this.getReservedFromTo(from, to));\r\n\t\treturn l;\r\n\t}", "List<Bill> findBillsForReservation(long reservationId);", "@GetMapping(\"/reservation\")\n public List<Reservation> getReservations(@RequestParam int userID) { return reservationDataTierConnection.getReservations(userID); }", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}", "public void getClientrecords(int ClientID ,String Cname){\n \n String query2 = \" SELECT resID , Roomno , checkindate , Days , TotalMoney , Client.Name \"\n + \" FROM Reservation \"\n + \"INNER JOIN Client ON Client.CID = Reservation.clientID \"\n + \" WHERE CID = ? AND Name = ?\"; \n \n \n try {\n \n PreparedStatement Query2 = conn.prepareStatement(query2);\n Query2.setInt(1,ClientID);\n Query2.setString(2, Cname);\n ResultSet rs2 = Query2.executeQuery();\n Client c = new Client();\n List<String> lst = new ArrayList<>() ;\n while( rs2.next()){ \n String str =\" Reservation ID: \"+rs2.getInt(\"resID\")+\" Room Number: \"+rs2.getInt(\"Roomno\")+\" Checkindate: \"+rs2.getString(\"checkindate\")+\" Days: \"+rs2.getInt(\"Days\")+\" Total Money: \"+rs2.getDouble(\"TotalMoney\") +\"\\n\"; \n lst.add(str);\n }\n \n c.setresinfo(lst);\n \n \n \n \n\n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "List<Reservation> findReservationsByUserBookId (Long userId);", "public ResultSet getCustomerInfo(int cid) throws IllegalStateException{\n\t \n if(!isLoggedIn())\n throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n try{\n \t stmt = con.createStatement();\n String queryString = \"Select * FROM CUSTOMER where\"\n \t\t+ \" id= '\" + cid +\"'\";\n result = stmt.executeQuery(queryString);\n } \n catch (Exception E) {\n \t E.printStackTrace();\n }\n return result;\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_onWait() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=0;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List<Reservation> findByReservationUser_Id(@Param(\"id\") int id);", "public List<ICase> searchCases(String CPR, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCPR().equals(CPR) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n\n return cases;\n }", "private Reservation(int id, Customer customer, Period period, Vehicle vehicle) {\r\n \t\tthis.id \t = id;\r\n \t\tthis.customer = customer;\r\n \t\tthis.period\t = period;\r\n \t\tthis.vehicle = vehicle;\r\n \t\t\r\n \t\tfields = new HashMap<String, String>();\r\n \t\tfields.put(\"id\", id + \"\");\r\n \t\tfields.put(\"customer\", customer.id + \"\");\r\n \t\tfields.put(\"period\", period.id + \"\");\r\n \t\tfields.put(\"vehicle\", vehicle.id + \"\");\r\n \t}", "public ArrayList<Customer> findValidCustomers(Integer UserId);", "public List<Boardreservation> getBoardReservations(int boardID);", "private static void fillClientReserveTimeList(ResultSet resultSet\n\t\t\t, List<ClientReservedTime> clientReservedTimes) {\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tClientReservedTime clientReservedTime = new ClientReservedTime();\n\t\t\t\tfillClientReserveTime(resultSet, clientReservedTime);\n\t\t\t\t//Fill comment section\n\t\t\t\tfillClientReserveTimeCommentSection(resultSet, clientReservedTime);\n\t\t\t\tclientReservedTimes.add(clientReservedTime);\n\t\t\t}\n\t\t}catch (SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "@SuppressWarnings(\"rawtypes\")\n public MapList getCustomerCRs(Context context, String[] args) throws Exception {\n\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n try {\n\n StringList slselectObjStmts = getSLCTableSelectables(context);\n\n Map programMap = (Map) JPO.unpackArgs(args);\n String strProgProjId = (String) programMap.get(\"objectId\");\n // TIGTK-16801 : 30-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProjId);\n StringBuffer sbObjectWhere = new StringBuffer();\n sbObjectWhere.append(\"(type==\\\"\");\n sbObjectWhere.append(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n sbObjectWhere.append(\"\\\"&&attribute[\");\n sbObjectWhere.append(TigerConstants.ATTRIBUTE_PSS_CRORIGINTYPE);\n sbObjectWhere.append(\"] == \");\n sbObjectWhere.append(\"\\\"\");\n sbObjectWhere.append(\"Customer\");\n sbObjectWhere.append(\"\\\")\");\n // TIGTK-16801 : 30-08-2018 : END\n\n DomainObject domainObj = DomainObject.newInstance(context, strProgProjId);\n\n MapList mapList = domainObj.getRelatedObjects(context, relationship_pattern.getPattern(), // relationship pattern\n type_pattern.getPattern(), // object pattern\n slselectObjStmts, // object selects\n null, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n sbObjectWhere.toString(), // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n finalType, // Postpattern\n null, null, null);\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:Start\n if (mapList.size() > 1) {\n // return sortCRListByState(context, mapList);\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:START\n MapList mlReturn = sortCRListByState(context, mapList);\n\n Iterator<Map<String, String>> itrCR = mlReturn.iterator();\n while (itrCR.hasNext()) {\n Map tempMap = itrCR.next();\n String strCRId = (String) tempMap.get(DomainConstants.SELECT_ID);\n MapList mlIA = getImpactAnalysis(context, strCRId);\n\n String strIAId = \"\";\n if (!mlIA.isEmpty()) {\n Map mpIA = (Map) mlIA.get(0);\n strIAId = (String) mpIA.get(DomainConstants.SELECT_ID);\n }\n tempMap.put(\"LatestRevIAObjectId\", strIAId);\n // TIGTK-16801 : 30-08-2018 : START\n tempMap.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 30-08-2018 : END\n }\n return mlReturn;\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:END\n } else {\n return mapList;\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:End\n } catch (Exception ex) {\n logger.error(\"Error in getCustomerCRs: \", ex);\n throw ex;\n }\n }", "public Customer getCustomer(String cID, ArrayList<Customer> customers) throws NotFoundException\r\n\t{\t\r\n\t\tCustomer cust = null;\r\n\t\tfor(int i=0; i<customers.size(); i++)\r\n\t\t{\r\n\t\t\tif(customers.get(i).getcID().equals(cID))\r\n\t\t\t\tcust = customers.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tif(cust == null)\r\n\t\t\tthrow new NotFoundException(cID);\r\n\t\t\r\n\t\treturn cust;\t\t\r\n\t}", "public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }", "public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }", "public Collection<ReservationDetails> getBookCopies(int bookId) throws RemoteException;", "public List<ICase> searchCases(Date date, int id) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCaseNumber() == id) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "public static Map<MiddayID, List<ReserveTime>> getClientUnitReserveTimeInADay(int dateID, int unitID)\n\t{\n\t\tConnection conn = DBConnection.getConnection();\n\t\tMap<MiddayID, List<ReserveTime>> reserveTimes = new HashMap<>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString command = \"select * from RESERVETIMES\" +\n\t\t\t\t\t\" where DAY_ID = \" +\n\t\t\t\t\tdateID +\n\t\t\t\t\t\" and UNIT_ID = \" +\n\t\t\t\t\tunitID +\n\t\t\t\t\t\" and STATUS = \" + ReserveTimeStatus.RESERVABLE.getValue() +\n\t\t\t\t\t\" ORDER BY ST_TIME\";\n\t\t\tResultSet rs = stmt.executeQuery(command);\n\t\t\tfillReserveTimeList(rs, reserveTimes);\n\n\t\t}catch(SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn reserveTimes;\n\t}", "@GetMapping(\"/customer/{customerId}\")\n public List<ScheduleDTO> getScheduleForCustomer(@PathVariable long customerId) {\n List<Pet> customerPets = petService.findPetsByOwner(customerId);\n //Initialise array list for Schedule objects\n List<Schedule> customerSchedule = new ArrayList<>();\n //Get Schedules for each Pet in list\n customerPets.forEach((pet) ->\n customerSchedule.addAll(scheduleService.getScheduleForPet(pet.getId())));\n\n List<ScheduleDTO> scheduleDTOList = customerSchedule.stream()\n .map(ScheduleController::convertScheduleToScheduleDTO)\n .collect(Collectors.toList());\n return scheduleDTOList;\n }", "public Collection ejbFindByCustomerId(final Integer customerId)\n {\n PreparedStatement ps = null;\n try \n {\n ps = getConnection().prepareStatement(\"SELECT ID FROM CCBMPACCOUNT WHERE CUSTOMERID = ?\");\n ps.setInt(1, customerId.intValue());\n ResultSet rs = ps.executeQuery();\n Collection result = new ArrayList();\n while (rs.next()) \n {\n result.add(new Integer(rs.getInt(1)));\n } // end of if ()\n rs.close();\n return result;\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception in findbyCustomerID\", e);\n throw new EJBException(e);\n } // end of try-catch\n finally\n {\n try \n {\n if (ps != null) {ps.close();}\n }\n catch (Exception e)\n {\n Category.getInstance(getClass().getName()).info(\"Exception closing ps: \" + e);\n } // end of try-catch\n } // end of finally\n }", "public void reserve(int customerId){\n\t\treserved = true;\n\t\tthis.customerId = customerId;\n\t}", "public String reserveSeats(final int seatHoldId, final String customerEmail) {\n\n\t\tint bookinfRefNo = (int) (Math.random() * 1000000);\n\n\t\tQuery searchUserQuery = new Query(Criteria.where(\"_id\").is(seatHoldId));\n\t\tHoldSeatDTO holdSeatDTO = mongoTemplate.findOne(searchUserQuery,\n\t\t\t\tHoldSeatDTO.class);\n\t\tif (null != holdSeatDTO) {\n\t\t\tholdSeatDTO.setStatus(SeatStatus.BOOKED.toString());\n\t\t\tholdSeatDTO.setBookinfRefNo(bookinfRefNo);\n\t\t\tholdSeatDTO.setCustomerEmail(customerEmail);\n\t\t\tmongoTemplate.save(holdSeatDTO);\n\t\t\treturn holdSeatDTO.getBookinfRefNo() + \"\";\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"200001\", NOT_FOUND_ERROR);\n\t\t}\n\n\t}", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "SeatHold reserveSeats(Long requestId, String customerEmail);", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status, cs.customer_family_size FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id join city c on cs.customer_city=c.city_id WHERE cs.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public Reservation(Customer customer, Period period, Vehicle vehicle) {\r\n \t\tthis.id \t = 0;\r\n \t\tthis.customer = customer;\r\n \t\tthis.period = period;\r\n \t\tthis.vehicle = vehicle;\r\n \t\t\r\n \t\tfields = new HashMap<String, String>();\r\n \t\tfields.put(\"customer\", customer.id + \"\");\r\n \t\tfields.put(\"period\", period.id + \"\");\r\n \t\tfields.put(\"vehicle\", vehicle.id + \"\");\r\n \t}", "public List<ICase> searchCases(Date date, String CPR) {\n List<ICase> cases = new ArrayList<>();\n for (ICase aCase : allCases) {\n if (aCase.getCreationDate().equals(calendar.formatToString(date)) && aCase.getCPR().equals(CPR)) {\n cases.add(aCase);\n }\n }\n return cases;\n }", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<Account> getAccountsForCustomerId(int customerId);", "@RequestMapping(value = \"/rs/customers/{customerId}/contacts\", method = RequestMethod.GET)\n public @ResponseBody\n ResourceItems list(@PathVariable Long customerId, @PageableDefault(size = 100) Pageable pageable) {\n Customer customer = new Customer(customerId);\n\n Iterable<Contact> contacts = service.findAll(customer, pageable);\n\n return builder.build(contacts);\n }", "public List<ResourceSelection> selectResourceSelection() {\n\n\t\tList<ResourceSelection> customers = new ArrayList<ResourceSelection>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from resource_selection\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tResourceSelection customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new ResourceSelection();\n\n\t\t\t\tcustomer.setRank(resultSet.getString(\"rank\"));\n\t\t\t\tcustomer.setName(resultSet.getString(\"name\"));\n\t\t\t\tcustomer.setContainer_types(resultSet.getString(\"container_types\"));\n\t\t\t\tcustomer.setEnvironment_types(resultSet.getString(\"environment_types\"));\n\t\t\t\tcustomer.setHost_groups(resultSet.getString(\"host_groups\"));\n\t\t\t\tcustomer.setPlacement(resultSet.getString(\"placement\"));\n\t\t\t\tcustomer.setMinimum(resultSet.getString(\"minimum\"));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}", "@Override\r\n\tpublic List<Client> findNameTel(Long cid) {\n\t\treturn this.getSqlSessionTemplate().selectList(changeToNameSpace(\"findNameTel\"), cid);\r\n\t}", "public static ArrayList<CustomerInfoBean> getDoCutomers_inactive(\r\n\t\t\tint districtId) {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status, familySize;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status, cs.customer_family_size FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE cd.district_id=\"\r\n\t\t\t\t\t+ districtId\r\n\t\t\t\t\t+ \" AND a.appliance_status =0 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tfamilySize = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tbean.setFamilySize(familySize);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "Collection<Reservation> getReservations() throws DataAccessException;", "public Customer displayCustomer(int cid);", "public List<Contract> getContract(int crontactno) {\n\t\treturn contractdao.getContract(crontactno);\n\t}", "public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(!reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public static ArrayList<CustomerInfoBean> getDoCutomers_notinterested(\r\n\t\t\tint districtId) {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status, familySize;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status, cs.customer_family_size FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE cd.district_id=\"\r\n\t\t\t\t\t+ districtId + \" AND cs.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tfamilySize = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tbean.setFamilySize(familySize);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_onInActive() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,a.appliance_status, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE a.appliance_status=0\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<HashMap<String, String>> getDoCustomersWithSalesmanIdSearch(\r\n\t\t\tint start, int length, String search, int id) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tHashMap<String, String> map = null;\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_do_customers_with_salesman_id_search(?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, search);\r\n\t\t\tcall.setInt(4, id);\r\n\t\t\trs = call.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmap = new HashMap<>();\r\n\t\t\t\tmap.put(\"customerId\", rs.getInt(\"customer_id\") + \"\");\r\n\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\tmap.put(\"customerCnic\", rs.getString(\"customer_cnic\"));\r\n\t\t\t\tmap.put(\"customerDateOfBirth\", rs.getDate(\"date_of_birth\") + \"\");\r\n\t\t\t\tmap.put(\"customerAddress\", rs.getString(\"customer_address\"));\r\n\t\t\t\tmap.put(\"customerCity\", rs.getInt(\"customer_city\") + \"\");\r\n\t\t\t\tmap.put(\"customerPhone\", rs.getString(\"customer_phone\"));\r\n\t\t\t\tmap.put(\"customerPhone2\", rs.getString(\"customer_phone2\"));\r\n\t\t\t\tmap.put(\"customerImage\", rs.getBlob(\"customr_image\") + \"\");\r\n\t\t\t\tmap.put(\"customerFatherName\", rs.getString(\"father_name\"));\r\n\t\t\t\tmap.put(\"customerMotherName\", rs.getString(\"mother_name\"));\r\n\t\t\t\t/* map.put(\"customerEmail\", rs.getString(\"email\")); */\r\n\t\t\t\tmap.put(\"customerGender\", rs.getString(\"gender\"));\r\n\t\t\t\tmap.put(\"customerAge\", rs.getInt(\"age\") + \"\");\r\n\t\t\t\tmap.put(\"customerCreated\", rs.getString(\"created_on\"));\r\n\t\t\t\tmap.put(\"customerOccupation\", rs.getString(\"occupation\"));\r\n\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public boolean reserveCar(int id, int customerID, String location)\n throws RemoteException, DeadlockException;", "public ArrayList<Object> getGuestsReservations(int guestId){\n \n return dbf.getGuestsReservations(guestId); \n }", "public synchronized void scan(Long id){\n logger.info(\"Scanned customer \" + id);\n shopService.onScannedEnteringCustomer(id);\n }", "public List<Vehicle> getVehicles(String garageObjectId, Customer incomingCustomer){\n List<Vehicle> vehicleList = new ArrayList<>();\n List<ParseObject> list = this.parseEngine.getChildObjects\n (ParseDataFieldNames.customerId,incomingCustomer.getObjectId(), garageObjectId, ObjectType.Vehicle);\n if(list==null){\n return vehicleList;\n }\n if(!list.isEmpty() && list.size()>0){\n for(ParseObject parseObject : list){\n Vehicle foundVehicle = new Vehicle();\n foundVehicle.setObjectId(parseObject.getObjectId());\n foundVehicle.setMake(parseObject.getString(ParseDataFieldNames.make.toString()));\n foundVehicle.setModel(parseObject.getString(ParseDataFieldNames.model.toString()));\n foundVehicle.setYear(parseObject.getInt(ParseDataFieldNames.year.toString()));\n\n // add to list\n vehicleList.add(foundVehicle); \n }\n }\n return vehicleList;\n }", "@Override\n\tpublic List<ReservationDetails> getMyReservations(User user) {\n\t\t\n\t\t\n\t\treturn rdDAO.getMyReservations(user);\n\t}", "@Override\n\tpublic List<Appointment> findCarAppoinmentByCarIDX(int c_id) {\n\t\treturn appointmentMapper.findCarAppoinmentByCarIDX(c_id);\n\t}", "@Override\n\tpublic void receiveCustomers() {\n\t\tfor(int i=interactionCounter; i<customers.size()&&customers.get(i).getArrival()<=currentTurn; i++){\n\t\t\tcustomersInLine.add(customers.get(i));\n\t\t\tcustomersInRestaurant++;\n\t\t\tinteractionCounter++;\t\n\t\t}\t\n\t}", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_Accepted() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id WHERE e.status=1 or e.status=6;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List<Customer> findById(String i) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE id = ?\");\n ppst.setString(1, i);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "List<Appointment> getAppointmentByCustomerNumber(long customerNumber);", "@Override\n\tpublic List<Customer> getCustomerById(int customerid) {\n\t\treturn null;\n\t}", "public static <Customers> ObservableList<Customers> getCustomerAppointments(int customerId) {\n\n ObservableList<Customers> appointmentList = FXCollections.observableArrayList();\n try {\n String sql = \"SELECT Customer_ID FROM customers\";\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ResultSet rs = ps.executeQuery();\n\n while(rs.next()) {\n int customerID = rs.getInt(\"Customer_ID\");\n models.Customers A = new models.Customers(customerID);\n appointmentList.add((Customers) A);\n }\n } catch (Exception throwables) {\n throwables.printStackTrace();\n }\n return appointmentList;\n }", "public String queryCustomerInfo(int id, int customerID)\n throws RemoteException, DeadlockException;", "private ApiReturnModel getBookingsOnclinic(Clinic clinic,String date) {\n\t\tlogger.debug(\"In get bookings on clinic\");\r\n\t\tUtils utils=new Utils();\r\n\t\tApiReturnModel returnModel = null;\r\n\t\tList<BookingModel> bookings=null;\r\n\t\t\r\n\t\tif(date!=null){\r\n\t\t\tDate bookingByDate=utils.convertStringToDateOnly(date);\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic,utils.convertStringToDateOnly(bookingByDate));\r\n\t\t}else\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic);\r\n\t\t// User user=userDao.findByid(Integer.parseInt(userId));\r\n\t\treturnModel=commonReturnBookingModel(bookings);\r\n\t\treturn returnModel;\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested_Super() {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE e.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "List<Demand> searchDemandForDisconnectionRequest(String tenantId, Set<String> consumerCodes,\n\t\t\t\t\t\t\t\t\t\t\t\t\t Long fromDateSearch, Long toDateSearch, RequestInfo requestInfo, Boolean isDemandPaid, Boolean isDisconnectionRequest) {\n\t\tList<Demand> demandList = searchDemand(tenantId, consumerCodes, null, toDateSearch, requestInfo,\n\t\t\t\tnull, isDisconnectionRequest);\n\t\tif (!CollectionUtils.isEmpty(demandList)) {\n\t\t\t//Sorting the demandList in descending order to pick the latest demand generated\n\t\t\tdemandList = demandList.stream().sorted(Comparator.comparing(Demand::getTaxPeriodTo)\n\t\t\t\t\t.reversed()).collect(Collectors.toList());\n\t\t}\n\t\treturn demandList;\n\t}", "public static ArrayList<Customer> getOwners(String aid) {\n \tArrayList<Customer> customers = new ArrayList<Customer>();\n \tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t return customers;\n }", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "public Optional<Booking> findClientActiveBooking(int clientCode) {\n for (Room room : hotel.getRooms()) {\n for (Booking booking : room.getBookings()) {\n if (booking.getClientCode() == clientCode\n && booking.isActive()) {\n return Optional.of(booking);\n }\n }\n\n }\n return Optional.empty();\n }", "@Override\n\tpublic ArrayList<Reservation> getReservationsByDate(Date date, int duration) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<ContractDetailTO> findRangedContractDetailList(HashMap<String, Object> searchDate) {\r\n\t\treturn contractApplicationService.findRangedContractDetailList(searchDate);\r\n\t}", "public ReservationModel findKcckReservationById(Integer reservationId) {\n\n\t\tKcckReservationInfo kcckReservationInfo = this.reservationRepository.findKcckReservationById(reservationId);\n\t\tif (kcckReservationInfo != null) {\n\t\t\tReservationModel reservationModel = new ReservationModel();\n\t\t\treservationModel.setReservationId(kcckReservationInfo.getReservationId());\n\t\t\treservationModel.setHospitalId(kcckReservationInfo.getHospitalId());\n\t\t\treservationModel.setDeptId(kcckReservationInfo.getDeptId());\n\t\t\treservationModel.setDoctorId(kcckReservationInfo.getDoctorId());\n\t\t\treservationModel.setPatientId(kcckReservationInfo.getPatientId());\n\t\t\treservationModel.setPatientName(kcckReservationInfo.getPatientName());\n\t\t\treservationModel.setNameFurigana(kcckReservationInfo.getNameFurigana());\n\t\t\treservationModel.setPhoneNumber(kcckReservationInfo.getPhoneNumber());\n\t\t\treservationModel.setEmail(kcckReservationInfo.getEmail());\n\t\t\treservationModel.setReservationDate(kcckReservationInfo.getReservationDate());\n\t\t\treservationModel.setReservationTime(kcckReservationInfo.getReservationTime());\n\t\t\treservationModel.setSessionId(kcckReservationInfo.getSessionId());\n\t\t\treservationModel.setReservationCode(kcckReservationInfo.getReservationCode());\n\t\t\treservationModel.setReminderTime(kcckReservationInfo.getReminderTime());\n\t\t\treservationModel.setDoctorName(kcckReservationInfo.getDoctorName());\n\t\t\treservationModel.setDoctorCode(kcckReservationInfo.getDoctorCode());\n\t\t\treservationModel.setDeptName(kcckReservationInfo.getDeptName());\n\t\t\treservationModel.setCardNumber(kcckReservationInfo.getPatientCode());\n\t\t\treservationModel.setDepartmentCode(kcckReservationInfo.getDeptCode());\n\t\t\treservationModel.setPatientSex(kcckReservationInfo.getPatientGender());\n\t\t\tif (kcckReservationInfo.getPatientBirthDay() != null) {\n\t\t\t\treservationModel.setPatientBirtday(\n\t\t\t\t\t\tMssDateTimeUtil.convertDateToStringByLocale(kcckReservationInfo.getPatientBirthDay(),\n\t\t\t\t\t\t\t\tDateTimeFormat.DATE_FORMAT_YYYYMMDD_EXTEND, MssContextHolder.getLocale()));\n\t\t\t}\n\t\t\treturn reservationModel;\n\t\t}\n\t\treturn null;\n\t}", "public Customer getFullCustomerDetail(String cid) throws CustomerNotFoundException {\r\n \ttry {\r\n\t return (Customer) this.entityManager.createQuery(\"select customer from Customer as customer left join fetch customer.calls where customer.cid=:cid\")\r\n\t .setParameter(\"cid\", cid)\r\n\t .getSingleResult();\r\n \t} catch (NoResultException e) {\r\n \t\tthrow new CustomerNotFoundException();\r\n \t}\r\n }", "public static ArrayList<HashMap<String, String>> getDoCustomerSearchList(\r\n\t\t\tint start, int length, String search, int dId) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\t\tConnection con = Connect.getConnection();\r\n\t\ttry {\r\n\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_search(?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, search);\r\n\t\t\tcall.setInt(4, dId);\r\n\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmap = new HashMap<>();\r\n\t\t\t\tSystem.out.println(\"called\");\r\n\t\t\t\tmap.put(\"customerId\", rs.getInt(\"customer_id\") + \"\");\r\n\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\tmap.put(\"customerCnic\", rs.getString(\"customer_cnic\"));\r\n\t\t\t\tmap.put(\"customerPhone\", rs.getString(\"customer_phone\"));\r\n\t\t\t\tmap.put(\"city\", rs.getString(\"city_name\"));\r\n\t\t\t\tmap.put(\"applianceNumber\", rs.getString(\"appliance_GSMno\"));\r\n\t\t\t\tmap.put(\"applianceStatus\", rs.getInt(\"appliance_status\") + \"\");\r\n\t\t\t\tmap.put(\"salesmanName\", rs.getString(\"salesman_name\"));\r\n\t\t\t\tmap.put(\"applianceId\", rs.getInt(\"appliance_id\") + \"\");\r\n\t\t\t\tmap.put(\"salesmanId\", rs.getInt(\"salesman_id\") + \"\");\r\n\t\t\t\tmap.put(\"applianceName\", rs.getString(\"appliance_name\"));\r\n\t\t\t\tmap.put(\"status\", rs.getInt(\"status\") + \"\");\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}", "public static ArrayList<CustomerInfoBean> getDoCutomers_accepted(\r\n\t\t\tint districtId) {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status, familySize;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status, cs.customer_family_size FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE cd.district_id =\"\r\n\t\t\t\t\t+ districtId + \" AND e.status=1 or e.status=6; \";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tfamilySize = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tbean.setFamilySize(familySize);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tst.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public Collection<CarrierMasterDTO> getCarriers(CarrierParams cparams) throws Exception;", "public Iterator<R> reservationsByName(String name){\n // Return an iterator of active reservations for a name.\n //loop through the arrayList\n for(Reservation r: listR){\n //if we find the name that equals our given name, add that reservation to our temp list\n if(r.getName().equals(name)){\n newList.add(r);\n }\n }\n //return iterator for temp list\n IterName iter = new IterName();\n return iter;\n }", "@Override\n\tpublic void readAllCanceledOrdersByCustomer(int customerID) {\n\t\t\n\t}", "GICLClaimReserve getClaimReserve(Integer claimId, Integer itemNo, Integer perilCd) throws SQLException;", "public static ArrayList<CustomerInfoBean> getCutomers_onCash() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,sld.payement_option, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" WHERE sld.payement_option=0\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List getScopeResourcesCustomer(Map mp) {\n\t\treturn getSqlMapClientTemplate().queryForList(\"getScopeResourcesCustomer\", mp);\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_suggested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=3\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@Override\n public List<Account> findAllByCustomerId(String customerId) {\n Query findByCustomer = new Query();\n findByCustomer.addCriteria(Criteria.where(\"customerId\").is(customerId));\n return operations.find(findByCustomer, Account.class);\n }", "@Override\n\tpublic Uni<Customer> findCustomerById(Long cid) {\n\t\treturn repo.findById(cid);\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }" ]
[ "0.6236486", "0.6092528", "0.5866827", "0.58153516", "0.57461536", "0.568402", "0.56518066", "0.56143075", "0.55886203", "0.5575736", "0.5545255", "0.550456", "0.5475739", "0.5461757", "0.5430352", "0.54205745", "0.5402011", "0.53981876", "0.53979903", "0.538305", "0.5370105", "0.5352267", "0.53476006", "0.5332934", "0.53322965", "0.53304046", "0.5327822", "0.53158426", "0.53131986", "0.5305649", "0.5291967", "0.5267597", "0.5255448", "0.52499163", "0.52325124", "0.5202082", "0.51823276", "0.51715577", "0.51680106", "0.5163402", "0.5142832", "0.513333", "0.5130502", "0.51267844", "0.511874", "0.51180047", "0.5104117", "0.51040155", "0.5087357", "0.507204", "0.50633836", "0.5063294", "0.50479543", "0.5035628", "0.5022891", "0.5017601", "0.50174624", "0.5015017", "0.5014756", "0.50079304", "0.50045985", "0.50002855", "0.49945238", "0.4992317", "0.49904305", "0.4985281", "0.49851337", "0.49843937", "0.49838996", "0.49803483", "0.49745682", "0.4974471", "0.4969808", "0.49696484", "0.4968522", "0.49636054", "0.49610916", "0.49601436", "0.4958209", "0.4943978", "0.4942424", "0.49338448", "0.49299553", "0.49223238", "0.4914537", "0.49132892", "0.49069464", "0.49067426", "0.4897419", "0.48865306", "0.48788553", "0.4858562", "0.4856712", "0.48537764", "0.48523006", "0.48513636", "0.48494664", "0.4842569", "0.48252276", "0.482202" ]
0.7455309
0
Finds all available reservation(s) for a hotel given its name and branch ID with a date filter:
public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException { ResultSet rs = null; String sql = "SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setHotelName(hotel_name); pStmt.setString(1, getHotelName()); setBranchID(branchID); pStmt.setInt(2, getBranchID()); if (checkIn == null && checkOut == null){ pStmt.setString(3, LocalDate.parse("2000-01-01").toString()); pStmt.setString(4, LocalDate.parse("3000-01-01").toString()); } else if (checkIn == null){ pStmt.setString(3, checkIn.toString()); pStmt.setString(4, LocalDate.parse("3000-01-01").toString()); } else if (checkOut == null){ pStmt.setString(3, LocalDate.parse("2000-01-01").toString()); pStmt.setString(4, checkOut.toString()); } else { pStmt.setString(3, checkIn.toString()); pStmt.setString(4, checkOut.toString()); } try { System.out.printf(" Reservations for %S, branch ID (%d): \n", getHotelName(), getBranchID()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(" " + rs.getString(1) + " " + rs.getInt(2)); System.out.println(" Reservation DATES: " + rs.getDate(3) + " TO " + rs.getDate(4)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "public List<Worker> getAvailableWorkers(Date date, boolean partOfDay, int branch_id)\n {\n return employees_dao.getAvailableWorkers(date,partOfDay,branch_id);\n }", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "List<Bill> findBillsForReservation(long reservationId);", "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(2, getBranchID());\n\n try {\n\n System.out.printf(\" Room types available at %S, branch ID (%d)\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public Collection<ReservationHistoryDTO> getReservationsHistory() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightReservationId(flightReservation.getId());\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\treservationDTO.setRoomReservationId(roomReservation.getId());\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t\t//Long hotelId videcemo kako\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\treservationDTO.setVehicleReservationId(vehicleReservation.getId());\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}", "@GetMapping\r\n public String getReservations(@RequestParam(value = \"date\", required = false) String dateString,\r\n Model model,\r\n HttpServletRequest request) {\n LocalDate date = DateUtils.createDateFromDateString(dateString);\r\n List<RoomReservation> roomReservations = reservationService.getRoomReservationForDate(date);\r\n model.addAttribute(\"roomReservations\", roomReservations);\r\n return \"reservations\";\r\n// return new ResponseEntity<>(roomReservations, HttpStatus.OK);\r\n }", "@Transactional\r\n\tpublic List<Room> getReservable(Integer posti, LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.getPosti(posti);\r\n\t\tl.removeAll(this.getReservedFromTo(from, to));\r\n\t\treturn l;\r\n\t}", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "List<Reservierung> selectAll() throws ReservierungException;", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(!reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}", "public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}", "public List<Campsite> findCampsitesByReservationDate(long campground_id, LocalDate from_date,LocalDate to_date);", "public List<Boardreservation> getBoardReservations(int boardID);", "List<Reservation> findReservationsByUserBookId (Long userId);", "@Override\n\tpublic List<BranchInfoVo> creserveList(String id) throws SQLException {\n\t\treturn sqlSession.selectList(\"yes.areserveselectAll\", id);\n\t}", "private ArrayList<Room> roomAvailability(LocalDate start, LocalDate end, int small, int medium, int large) {\n ArrayList<Room> availableRooms = new ArrayList<Room>();\n // Iterate for all rooms in the venue\n for (Room room : rooms) {\n // Search the venue's reservations that contain the specified room.\n ArrayList<Reservation> reservationsWithRoom = Reservation.searchReservation(reservations, room);\n // Try to find rooms that fulfil the request.\n switch(room.getSize()) {\n case \"small\":\n // Ignore if no small rooms are needed.\n if (small > 0) {\n // If there no reservations with the room or the reserved dates do not\n // overlap, then add the room sinced it is available.\n if(reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n\n availableRooms.add(room);\n small--;\n } \n }\n break;\n\n case \"medium\":\n // Ignore if no medium rooms are needed.\n if (medium > 0) {\n \n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n medium--;\n }\n }\n break;\n\n case \"large\":\n // Ignore if no large rooms ar eneeded.\n if (large > 0) {\n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n large--;\n }\n break;\n }\n }\n }\n // A request cannot be fulfilled if there are no rooms available in the venue\n if (small > 0 || medium > 0 || large > 0) {\n \n return null;\n } else {\n return availableRooms;\n }\n }", "public static void main(String[] args) {\n\n // Initialize Database instance:\n HotelDatabase hotelDB = new HotelDatabase();\n Scanner scan = new Scanner(System.in);\n\n // Get the connection:\n hotelDB.username = \"anowilat\";\n hotelDB.password = \"doopee\";\n Connection connection = hotelDB.getConnection(hotelDB.username, hotelDB.password);\n try {\n // Populate DateList and assign generic values to price:\n hotelDB.populateDemo(connection, LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-31\"));\n //hotelDB.searchArea(connection, \"Long Beach\", \"CA\", 94103);\n //hotelDB.createHotel(connection);\n //hotelDB.showTable(connection);\n //hotelDB.searchCustomerReservations(connection, 2);\n //hotelDB.searchHotelReservations(connection, , int branchID, LocalDate checkIn, LocalDate checkOut)\n //hotelDB.searchAvailabilityType(connection, \"Four Seasons Hotel\", 1, \"Single Suite\", LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-01\"));\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public List<Reservation> findByReservationUser_Id(@Param(\"id\") int id);", "@Transactional\r\n\tpublic List<Room> getFreeFromTo(LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.roomRepository.findByReservationsNotIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t\tl.addAll(this.roomRepository.findByReservationsIsNull());\r\n\t\treturn l;\r\n\t}", "public void CheckAvail(LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n {\r\n System.out.println(\"more than 30\");\r\n return;\r\n }//Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n {\r\n System.out.println(\"Less than 0\");\r\n return;\r\n }\r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n {\r\n ispossible = false;\r\n }\r\n } \r\n \r\n if (ispossible)\r\n System.out.println(roomtypes.get(i).roomname);\r\n }\r\n }", "public List<Integer> getBookedRooms(Date fromDate, Date toDate)\r\n {\r\n String fDate = DateFormat.getDateInstance(DateFormat.SHORT).format(fromDate);\r\n String tDate = DateFormat.getDateInstance(DateFormat.SHORT).format(toDate);\r\n \r\n List<Integer> bookedRooms = new LinkedList<>();\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n String bookingFromDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getFromDate());\r\n \r\n String bookingToDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getToDate());\r\n \r\n if(!booking.getCancelled() && !(fDate.compareTo(bookingToDate) == 0) \r\n && fDate.compareTo(bookingToDate) <= 0 &&\r\n bookingFromDate.compareTo(fDate) <= 0 && bookingFromDate.compareTo(tDate) <= 0)\r\n { \r\n List<Integer> b = booking.getRoomNr();\r\n bookedRooms.addAll(b);\r\n }\r\n }// End of while\r\n \r\n return bookedRooms;\r\n }", "public List<Room> findAppropriate(String applicationId) throws DAOException {\n List<Room> rooms = new ArrayList<Room>();\n Map<Integer, Integer> dayCompletionList;\n boolean isAvailable = true;\n int minPlacesAvailable;\n int neededPlacesAmount = 0;\n Date mainArrival = null;\n Date mainDeparture = null;\n PreparedStatement statement = null;\n PreparedStatement getApplicationData = null;\n PreparedStatement getRoomType = null;\n PreparedStatement getApplicationsForRoom = null;\n ResultSet applicationDataResultSet;\n ResultSet resultSet;\n ResultSet roomTypeResultSet;\n ResultSet applicationsForRoom;\n try {\n getApplicationData = proxyConnection.prepareStatement(SQL_SELECT_APPLICATION_DATA);\n getApplicationData.setLong(1, Long.parseLong(applicationId));\n\n applicationDataResultSet = getApplicationData.executeQuery();\n if (applicationDataResultSet.next()) {\n neededPlacesAmount = applicationDataResultSet.getInt(1);\n mainArrival = applicationDataResultSet.getDate(2);\n mainDeparture = applicationDataResultSet.getDate(3);\n }\n getRoomType = proxyConnection.prepareStatement(SQL_SELECT_ROOM_TYPE);\n getApplicationsForRoom = proxyConnection.prepareStatement(SQL_SELECT_APPLICATIONS_FOR_ROOM);\n getApplicationsForRoom.setInt(1, CONFIRMED);\n\n statement = proxyConnection.prepareStatement(SQL_SELECT_ROOMS_FOR_APPLICATION);\n statement.setLong(1, Long.parseLong(applicationId));\n\n resultSet = statement.executeQuery();\n while (resultSet.next()) {//all rooms of type\n dayCompletionList = new HashMap<>();\n Room room = new Room();\n room.setId(resultSet.getLong(1));\n room.setMaxPlaces(resultSet.getInt(2));\n room.setPrice(resultSet.getInt(3));\n getRoomType.setLong(1, Long.parseLong(resultSet.getString(4)));\n\n roomTypeResultSet = getRoomType.executeQuery();\n if (roomTypeResultSet.next()) {\n room.setType(roomTypeResultSet.getString(1));\n }\n getApplicationsForRoom.setLong(2, room.getId());\n getApplicationsForRoom.setDate(3, mainDeparture);\n getApplicationsForRoom.setDate(4, mainArrival);\n\n applicationsForRoom = getApplicationsForRoom.executeQuery();\n //number of day from 0 year\n int firstDay;\n int lastDay;\n int placesAmount = 0;\n minPlacesAvailable = room.getMaxPlaces();\n //through all confirmed applications for current room (only in case smn has already booked it)\n while (applicationsForRoom.next()) {\n placesAmount = applicationsForRoom.getInt(1);\n firstDay = applicationsForRoom.getInt(2);\n lastDay = applicationsForRoom.getInt(3);\n Integer i = firstDay;\n while (i <= lastDay) {\n if (dayCompletionList.containsKey(i)) {\n dayCompletionList.put(i, dayCompletionList.get(i) + placesAmount);\n } else {\n dayCompletionList.put(i, placesAmount);\n }\n i++;\n }\n }\n //заполненность дней по подтвержденным заявкам (сколько уже занято)\n for (int amount : dayCompletionList.values()) {\n if (room.getMaxPlaces() - amount < minPlacesAvailable) {\n //сколько осталось мест на такой период\n minPlacesAvailable = room.getMaxPlaces() - amount;\n }\n if (amount + neededPlacesAmount > room.getMaxPlaces()) {\n isAvailable = false;\n }\n }\n if (isAvailable) {\n room.setFreePlaces(minPlacesAvailable);\n rooms.add(room);\n }\n }\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n close(statement);\n close(getApplicationData);\n close(getApplicationsForRoom);\n close(getRoomType);\n }\n return rooms;\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public interface ReservationDao extends JpaRepository<Reservation, Long> {\n\n /**\n * Find reservations by user book id list.\n *\n * @param userId the user id\n * @return the list\n */\n List<Reservation> findReservationsByUserBookId (Long userId);\n\n /**\n *\n * @param id\n * @return\n */\n Optional<Reservation> findById(Long id);\n\n /**\n *\n * @param reservation\n * @return\n */\n Reservation save(Reservation reservation);\n\n /**\n *\n * @param reservation\n */\n void delete(Reservation reservation);\n\n /**\n * Find by end borrowing after list.\n *\n * @param endBorrowing the end borrowing\n * @return the list\n */\n @Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);\n\n /**\n *\n * @param bookId\n * @return\n */\n List<Reservation> findAllByBookIdOrderByEndBorrowingAsc(Long bookId);\n}", "public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}", "public ArrayList<Object> getGuestsReservations(int guestId){\n \n return dbf.getGuestsReservations(guestId); \n }", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "@Override\r\n\tpublic List<ContractDetailTO> findRangedContractDetailList(HashMap<String, Object> searchDate) {\r\n\t\treturn contractApplicationService.findRangedContractDetailList(searchDate);\r\n\t}", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "private List<Flight> searchFlightsFromDB(String airlineCode, Integer routeNumber, LocalDate flightDate) {\n // the reason to create these variables is that we want to search the DB for a specific day.\n // and the best way to do this is checking dateTime column between 00:00 and 23:59\n LocalDateTime startDate = null;\n LocalDateTime endDate = null;\n\n if (flightDate != null) {\n startDate = flightDate.atStartOfDay();\n endDate = flightDate.atTime(LocalTime.MAX);\n }\n return flightRepository.findByRouteNumberAndAirlineCodeAndFlightDateBetween(routeNumber, airlineCode, startDate, endDate);\n }", "@Override\n\tpublic List<AvailableHotelsResponse> getAvailableHotels(AvailableHotelRequest request)\n\t\t\tthrows CommunationFailedException, BusinessException {\n\n\t\tList<AvailableHotelsResponse> hotelResponses = new ArrayList<AvailableHotelsResponse>();\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid request data\");\n\t\t}\n\t\ttry {\n\n\t\t\tGson gson = new Gson();\n\t\t\tString jsonRequestString = gson.toJson(request);\n\n\t\t\tlogger.info(\"AvailableHotelRequest Json String \" + jsonRequestString);\n\n\t\t\tApplicationUrlsHolder applicationUrlsHolder = new ApplicationUrlsHolder();\n\t\t\tMap<HotelProviders, String> providersUrls = applicationUrlsHolder.getHotelProvidersUrls();\n\n\t\t\tfor (Entry<HotelProviders, String> entry : providersUrls.entrySet()) {\n\t\t\t\tHotelProviders hotelProvider = entry.getKey();\n\t\t\t\tString providerUrl = entry.getValue();\n\n\t\t\t\tString jsonResponse = httpCaller.performHttpRequest(jsonRequestString, providerUrl);\n\n\t\t\t\thotelResponses.addAll(ProvidersHotelResponseMapper.mappingHotelResponse(hotelProvider, jsonResponse));\n\t\t\t}\n\n\t\t\tCollections.sort(hotelResponses);\n\n\t\t} catch (BusinessException e) {\n\n\t\t} catch (CommunationFailedException e) {\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\n\t\t\tErrorObj errorObj = new ErrorObj();\n\t\t\terrorObj.setErrorCode(ApplicationConstants.UNKNOWN_EXCEPTION);\n\t\t\terrorObj.setErrorMessage(\"Sorry, Service currently unavailable\");\n\n\t\t\tthrow new BusinessException(errorObj);\n\t\t}\n\n\t\treturn hotelResponses;\n\t}", "@Override\n public List<Doctor> searchByAvailability(Availability availability) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getAvailability, availability);\n return searchList;\n }", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}", "public List<Employee> findEmployeesForServiceByDate(LocalDate date) {\n DayOfWeek dayOfWeek = date.getDayOfWeek();\n\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employeeRepository.findAll();\n for (Employee employee: allEmployees) {\n // Check if employee is available on given days and posses certain skills\n if(employee.getDaysAvailable().contains(dayOfWeek)) {\n employeeAvailable.add(employee);\n }\n }\n\n return employeeAvailable;\n }", "@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "@Repository\npublic interface ReservationRepository extends CrudRepository<ReservationModel, Integer> {\n\n ReservationModel findByLastname(String name);\n\n ReservationModel findById(int Id);\n\n List<ReservationModel> findByIdGreaterThan(int ID);\n List<ReservationModel> findByDateBetween(LocalDate date, LocalDate date2);\n List<ReservationModel> findByLastnameContaining(String letter);\n List<ReservationModel> deleteByLastname(String lastname);\n List<ReservationModel> findAll();\n\n\n}", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByDate(Date date);", "Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);", "public ArrayList<VacancyQueryDTO> findVacantRooms (VacancyQueryDTO query);", "public List<Prenotazione> getAllReservations(QueryParamsMap queryParamsMap) {\n final String sql = \"SELECT id, data_p , ora_inizio, ora_fine, clienti, ufficio_id, utente_id FROM prenotazioni\";\n\n List<Prenotazione> reservations = new LinkedList<>();\n\n try {\n Connection conn = DBConnect.getInstance().getConnection();\n PreparedStatement st = conn.prepareStatement(sql);\n\n ResultSet rs = st.executeQuery();\n\n Prenotazione old = null;\n while(rs.next()) {\n if(old == null){\n old = new Prenotazione(rs.getInt(\"id\"), rs.getString(\"data_p\"), rs.getInt(\"ora_inizio\"), rs.getInt(\"ora_fine\"), rs.getInt(\"clienti\"), rs.getInt(\"ufficio_id\"), rs.getString(\"utente_id\"));\n }\n else if(old.getFinalHour() == rs.getInt(\"ora_fine\") && old.getDate().equals(rs.getString(\"data_p\")) && old.getOfficeId() == rs.getInt(\"ufficio_id\") && old.getUserId() == rs.getString(\"utente_id\"))\n old = new Prenotazione(old.getId(), old.getDate(), old.getStartHour(), rs.getInt(\"ora_fine\"), old.getClients() + rs.getInt(\"clienti\"), old.getOfficeId(), old.getUserId());\n else {\n reservations.add(old);\n Prenotazione t = new Prenotazione(rs.getInt(\"id\"), rs.getString(\"data_p\"), rs.getInt(\"ora_inizio\"), rs.getInt(\"ora_fine\"), rs.getInt(\"clienti\"), rs.getInt(\"ufficio_id\"), rs.getString(\"utente_id\"));\n reservations.add(t);\n }\n }\n\n conn.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return reservations;\n }", "public List<ReservationDTO> seachReservationBypid(int pid) {\n\t\treturn dao.seachReservationBypid(pid);\r\n\t}", "@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfRoomsRequired());\n boolean filterByTravellers = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfTravellers());\n boolean filterByRating = !ObjectUtils.isEmpty(hotelFilterRequest.getRating());\n boolean filterByFacilities = hotelFilterRequest.getFacilities() != null && hotelFilterRequest.getFacilities().size() > 0;\n List<HotelMinimalResponseDTO> hotelMinimalResponses = hotels.stream()\n .filter(hotel -> {\n boolean roomFilter = !filterByRooms || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalNumberOfRooms(hotel) >= hotelFilterRequest.getNumberOfRoomsRequired()\n );\n boolean travelFilter = !filterByTravellers || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalRoomsCapacity(hotel) >= hotelFilterRequest.getNumberOfTravellers()\n );\n boolean ratingFilter = !filterByRating || (\n hotel.getReviews() != null && hotel.getReviews().size() > 0 &&\n getAverageRating(hotel) >= hotelFilterRequest.getRating()\n );\n List<String> facilities = new ArrayList<>();\n if (filterByFacilities) {\n facilities = getCombinedFacilities(hotel);\n }\n List<String> distinctHotelFacilities = facilities.stream().distinct().collect(Collectors.toList());\n boolean facilitiesFilter = !filterByFacilities || (distinctHotelFacilities.containsAll(hotelFilterRequest.getFacilities()));\n return roomFilter && travelFilter && ratingFilter && facilitiesFilter;\n })\n .map(this::makeHotelMinimalResponseDTO)\n .collect(Collectors.toList());\n logger.info(\"Fetched hotels information by filters successfully\");\n String sortOrder = hotelFilterRequest.getSortOrder() != null ? hotelFilterRequest.getSortOrder().equalsIgnoreCase(\"DESC\") ? \"DESC\" : \"ASC\" : \"ASC\";\n if (\"COST\".equalsIgnoreCase(hotelFilterRequest.getSortBy())) {\n hotelMinimalResponses.sort((o1, o2) -> {\n if (o1.getAverageRating().equals(o2.getAverageRating())) {\n return 0;\n } else if (o1.getAverageRating() > o2.getAverageRating()) {\n return sortOrder.equals(\"DESC\") ? -1 : 1;\n } else {\n return sortOrder.equals(\"DESC\") ? 1 : -1;\n }\n });\n }\n return hotelMinimalResponses;\n }", "@SuppressWarnings(\"unchecked\")\n @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)\n public List<Reservations> getAll() {\n Session s = sessionFactory.getCurrentSession();\n Query hql = s.createQuery(\"From Reservations\");\n return hql.list();\n }", "public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }", "@Override\n public List<BusyFlightsResponse> search(BusyFlightsRequest busyFlightRequest) {\n ToughJetRequest toughJetRequest = BusyFlightUtil.mapToToughJet(busyFlightRequest);\n\n // now call ToughJet provider API to find flights base on request parameters.\n return Arrays.asList(ToughJetResponse.builder()\n .carrier(\"ToughJet\")\n .basePrice(890d)\n .tax(7)\n .discount(5d)\n .departureAirportName(\"LHR\")\n .arrivalAirportName(\"LHR\")\n .outboundDateTime(\"2019-16-5T09:20:27.14Z\")\n .inboundDateTime(\"2019-16-9T10:00:00.142Z\")\n .build(),\n ToughJetResponse.builder()\n .carrier(\"ToughJet\")\n .basePrice(1580d)\n .tax(8)\n .discount(10d)\n .departureAirportName(\"LHR\")\n .arrivalAirportName(\"LHR\")\n .outboundDateTime(\"2019-16-5T09:20:27.14Z\")\n .inboundDateTime(\"2019-16-9T10:00:00.142Z\")\n .build()\n ).stream().map(BusyFlightUtil::map).collect(Collectors.toList());\n }", "public List<ConsultationReservation> getConsultationReservationsByUserToday(InternalUser user) throws SQLException{\n\t\t\n\t\treturn super.manager.getConsultationReservationByUser(user, LocalDate.now(), true, false);\n\t}", "public Iterator<R> reservationsByName(String name){\n // Return an iterator of active reservations for a name.\n //loop through the arrayList\n for(Reservation r: listR){\n //if we find the name that equals our given name, add that reservation to our temp list\n if(r.getName().equals(name)){\n newList.add(r);\n }\n }\n //return iterator for temp list\n IterName iter = new IterName();\n return iter;\n }", "@DOpt(type=DOpt.Type.DerivedAttributeUpdater)\n @AttrRef(value=\"reservations\")\n public void doReportQuery() throws NotPossibleException, DataSourceException {\n\n QRM qrm = QRM.getInstance();\n\n // create a query to look up Reservation from the data source\n // and then populate the output attribute (reservations) with the result\n DSMBasic dsm = qrm.getDsm();\n\n //TODO: to conserve memory cache the query and only change the query parameter value(s)\n Query q = QueryToolKit.createSearchQuery(dsm, Reservation.class,\n new String[]{Reservation.AttributeName_Status},\n new Expression.Op[]{Expression.Op.MATCH},\n new Object[]{status});\n\n Map<Oid, Reservation> result = qrm.getDom().retrieveObjects(Reservation.class, q);\n\n if (result != null) {\n // update the main output data\n reservations = result.values();\n\n // update other output (if any)\n numReservations = reservations.size();\n } else {\n // no data found: reset output\n resetOutput();\n }\n }", "@Test\n\tpublic void testFindFreeFacilityWorkplacesNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(workplace1.getId(), workplace2.getId()),\n\t\t\t\tstartDate, reservationEndDate);\n\n\t\t// search for 1 workplace\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because workplace1 and workplace 2 are not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "ObservableList<Booking> getFilteredBookingList();", "@Override\n\tpublic List<Bill> viewBillsByDateRange(LocalDate startDate, LocalDate endDate) {\n\t\tList<Bill>bills = billDao.findByBillDateBetween(startDate, endDate);\n\t\tif(bills.size()==0) {\n\t\t\tthrow new BillNotFoundException(\"No bills in given date range\");\n\t\t}\n\t\treturn bills;\n\t}", "private void initHotelsAndReservations() \n\t{\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(\"Hotels.txt\");\n\t\t\tScanner fs = new Scanner(fis);\n\t\t\twhile(fs.hasNextLine())\n\t\t\t{\n\t\t\t\tScanner is = new Scanner(fs.nextLine());\n\t\t\t\tis.useDelimiter(\",\");\n\t\t\t\tint id = Integer.parseInt(is.next().trim());\n\t\t\t\tString name = is.next().trim();\n\t\t\t\tString address = is.next().trim();\n\t\t\t\tString city = is.next().trim();\n\t\t\t\tString state = is.next().trim();\n\t\t\t\tint pricePerNight = Integer.parseInt(is.next().trim());\n\t\t\t\th = new Hotel (id, name, address, city, state, pricePerNight);\n\t\t\t\thotels.add(h);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * The catch block checks to make sure that the file is found\n\t\t */\n\t\tcatch( FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.err.println(\"File not found!\");\n\t\t}\n\n\t\t/**\n\t\t * Binding hotel reservations to model/JComboBox\n\t\t */\n\t\tfor(Hotel h1: hotels)\n\t\t\thotelsModel.addElement(h1);\n\t\t/**\n\t\t * Binding hotel reservations to model/JList\n\t\t */\n\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\tfor(Reservation r1 : selectedHotel.getReservations())\n\t\t\treservationsModel.addElement(r1);\n\t}", "private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }", "@GetMapping(value=\"/ticket/alltickets/bookingdate?date={bookingDate}\")\n\tpublic List<Ticket> getTicketByBookingDate(@RequestParam(value=\"date\",required=true) @PathVariable(\"bookingDate\") Date bookingDate){\n\t\tSystem.out.println(\".inside getTicketByBookingDate controller.........\");\n\t\treturn ticketBookingService.getTicketByBookingDate(bookingDate);\n\t}", "public static ArrayList<BHP> getBHPsOnDemand(Resident resident, Date date) {\n\n List<Prescription> listPrescriptions = PrescriptionTools.getOnDemandPrescriptions(resident, date);\n LocalDate lDate = new LocalDate(date);\n long begin = System.currentTimeMillis();\n EntityManager em = OPDE.createEM();\n ArrayList<BHP> listBHP = new ArrayList<BHP>();\n\n try {\n Date now = new Date();\n\n String jpql = \" SELECT bhp \" +\n \" FROM BHP bhp \" +\n \" WHERE bhp.prescription = :prescription \" +\n \" AND bhp.soll >= :from AND bhp.soll <= :to AND bhp.dosis > 0 \";\n Query queryOnDemand = em.createQuery(jpql);\n\n for (Prescription prescription : listPrescriptions) {\n queryOnDemand.setParameter(\"prescription\", prescription);\n queryOnDemand.setParameter(\"from\", lDate.toDateTimeAtStartOfDay().toDate());\n queryOnDemand.setParameter(\"to\", SYSCalendar.eod(lDate).toDate());\n\n ArrayList<BHP> listBHP4ThisPrescription = new ArrayList<BHP>(queryOnDemand.getResultList());\n\n PrescriptionSchedule schedule = prescription.getPrescriptionSchedule().get(0);\n // On Demand prescriptions have exactly one schedule, hence the .get(0).\n // There may not be more than MaxAnzahl BHPs resulting from this prescription.\n if (listBHP4ThisPrescription.size() < schedule.getMaxAnzahl()) {\n // Still some BHPs to go ?\n for (int i = listBHP4ThisPrescription.size(); i < schedule.getMaxAnzahl(); i++) {\n BHP bhp = new BHP(schedule);\n bhp.setIst(now);\n bhp.setSoll(date);\n bhp.setSollZeit(SYSCalendar.BYTE_TIMEOFDAY);\n bhp.setDosis(schedule.getMaxEDosis());\n bhp.setState(BHPTools.STATE_OPEN);\n listBHP4ThisPrescription.add(bhp);\n }\n }\n listBHP.addAll(listBHP4ThisPrescription);\n // outcome BHPs\n// listBHP.addAll(new ArrayList<BHP>(queryOutcome.getResultList()));\n }\n\n Collections.sort(listBHP, getOnDemandComparator());\n } catch (Exception se) {\n OPDE.fatal(se);\n } finally {\n em.close();\n }\n SYSTools.showTimeDifference(begin);\n return listBHP;\n }", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic ArrayList<Reservation> getReservationsByDate(Date date, int duration) {\n\t\treturn null;\n\t}", "@Override\n\tpublic ArrayList<String> searchStockAlarmBillByInfo(Date start, Date end, \n\t\t\tString OperatorId, String WareId) throws RemoteException {\n\t\tjava.sql.Date ds = new java.sql.Date(start.getTime());\n\t\tjava.sql.Date es = new java.sql.Date(end.getTime());\n\t\t\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\ttry {\t\n\t\t\tStatement statement_1 = con.createStatement();\t\n\t\t\tString sql_1 =\"SELECT *\" + \n\t\t\t\t\t\"FROM stockalarmbill \" + \n\t\t\t\t\t\"WHERE Date BETWEEN ' \"+ds + \"' AND ' \" + es + \"'\" + \n\t\t\t\t\t\" and OperatorID = '\" + OperatorId + \"'\" +\n\t\t\t\t\t\"and WareId = '\" + WareId + \"';\";\n\t\t\tResultSet rs = statement_1.executeQuery(sql_1);\n\t\t String id = null;\t\t \n\n\t\t while(rs.next()){\t \n\t\t \tid = rs.getString(\"ID\"); \t\n\t\t \tlist.add(id);\t \n\t\t }\t \n\t\t rs.close();\n\t\t} catch(SQLException e) { \n\t\t\te.printStackTrace(); \t \n\t\t}catch (Exception e) { \n\t\t\te.printStackTrace();\t \n\t\t}\n\t\treturn list;\n\t}", "public HotelDatabase() {\n\n this.HOTEL = new ArrayList<String>(Arrays.asList(\"HOTEL\", \"HOTEL_NAME\", \"BRANCH_ID\", \"PHONE\"));\n this.ROOM = new ArrayList<String>(Arrays.asList(\"ROOM\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"CAPACITY\"));\n this.CUSTOMER = new ArrayList<String>(Arrays.asList(\"CUSTOMER\", \"C_ID\", \"FIRST_NAME\", \"LAST_NAME\", \"AGE\", \"GENDER\"));\n this.RESERVATION = new ArrayList<String>(Arrays.asList(\"RESERVATION\", \"C_ID\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\"));\n this.HOTEL_ADDRESS = new ArrayList<String>(Arrays.asList(\"HOTEL_ADDRESS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"CITY\", \"STATE\", \"ZIP\"));\n this.HOTEL_ROOMS = new ArrayList<String>(Arrays.asList(\"HOTEL_ROOMS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"QUANTITY\"));\n this.BOOKING = new ArrayList<String>(Arrays.asList(\"BOOKING\", \"C_ID\", \"RES_NUM\", \"CHECK_IN\", \"CHECK_OUT\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\"));\n this.INFORMATION = new ArrayList<String>(Arrays.asList(\"INFORMATION\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"DATE_FROM\", \"DATE_TO\", \"NUM_AVAIL\", \"PRICE\"));\n this.NUMBERS = new ArrayList<String>(Arrays.asList(\"BRANCH_ID\", \"CAPACITY\", \"C_ID\", \"AGE\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\", \"ZIP\", \"QUANTITY\", \"NUM_AVAILABLE\", \"PRICE\"));\n this.DATES = new ArrayList<String>(Arrays.asList(\"CHECK_IN\", \"CHECK_OUT\", \"DATE_FROM\", \"DATE_TO\"));\n\n // INDEXING: 0 1 2 3 4 5 6 7\n this.ALL = new ArrayList<ArrayList<String>>(Arrays.asList(HOTEL, ROOM, CUSTOMER, RESERVATION, HOTEL_ADDRESS, HOTEL_ROOMS, BOOKING, INFORMATION));\n }", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "@Test\n public void findReservationBetweenTest() {\n Collection<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findReservationBetween(Mockito.any(LocalDate.class), Mockito.any(LocalDate.class)))\n .thenReturn(expected);\n Collection<Reservation> result = reservationService.findReservationsBetween(LocalDate.now().minusDays(4),\n LocalDate.now().plusDays(15));\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation3));\n Assert.assertTrue(result.contains(reservation4));\n }", "@Test\n\tpublic void testListReservationsOfFacilityInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID,\n\t\t\t\tArrays.asList(room1.getId(), infoBuilding.getId()), reservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(2, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t\tassertTrue(reservationsOfFacility.contains(reservation2));\n\t}", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void pruneAvailableCars(List<Car> availableCars, List<Reservation> transactionReservations, Date start, Date end) {\n\n\t\tList<Reservation> reservationsClone = new ArrayList<Reservation>(transactionReservations);\n\t\t\n\t\tfor(Reservation res : reservationsClone) {\n\t\t\tif(!res.getRentalCompany().equals(this.getName()) ||\n\t\t\t\t\t(!start.equals(res.getStartDate()) && !dateBetween(start, res.getStartDate(), res.getEndDate())) &&\n\t\t\t\t\t!end.equals(res.getEndDate()) && !dateBetween(end, res.getStartDate(), res.getEndDate())\n\t\t\t\t)\t\n\t\t\t{\n\t\t\t\ttransactionReservations.remove(res);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Reservation res : transactionReservations) {\n\t\t\t// Since the equals() method of class Car only checks on the carId, we make a virtual Car object to pass to the\n\t\t\t// remove() method of the availableCars list (this method uses the equals method to find the object to remove).\n\t\t\tCar virtualCar = new Car(res.getCarId(), null);\n\t\t\tavailableCars.remove(virtualCar);\n\t\t}\n\t}", "@GET // Fetches available flights from a specific location, given a date\r\n @Path(\"/{from}/{date}/{tickets}\")\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String fromDate(@PathParam(\"from\") String from, @PathParam(\"date\") String date, @PathParam(\"tickets\") int tickets) {\r\n Airline airline = new Airline(\"Kaffemænd Tours\");\r\n for(Flight x : flightList) {\r\n if(x.getDate().equals(date) && x.getOrigin().equals(from)) {\r\n airline.addFlight(x);\r\n }\r\n }\r\n String res = gson.toJson(airline);\r\n return res;\r\n }", "public static ResultSet findAvailableBed() throws SQLException {\n\n try (Connection conn = ConnectionFactory.getConnection()) {\n\n Statement st = conn.createStatement();\n return st.executeQuery(FIND_AVAILABLE_BED);\n\n }\n\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public Collection<ReservationDetails> getBookCopies(int bookId) throws RemoteException;", "@Override\r\n\tpublic List<HomePack> queryList(Date start,Date end,List<String> station) {\n\t\tList<HomePack> list = homePageDao.queryList(start,end,station);\r\n\t\treturn list;\r\n\t}", "List<RiceCooker> getByFilter(String keySearch, String brands, Double priceFrom, Double priceTo,\n\t\t\tlong startRow, long maxRows);", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByIDReservation(long id);", "public ArrayList<Booking> getBookings(int time,String date){\n ArrayList<Booking>Hours=new ArrayList<>();\n for(int i=0;i<Schedule.size();++i){\n Booking temp=Schedule.get(i); \n String Day=temp.getDate();\n int Datevalue=Integer.parseInt(Day.substring(8,10));\n int Value=Integer.parseInt(date);\n if(time<10) {\n if (temp.getTime().substring(0, 2).equals(\"0\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n else{\n if (temp.getTime().substring(0, 2).equals(\"\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n }\n return Hours;\n }", "public List<Booking> fetchHistory(Integer id)\n\t{\n\t\treturn booking_repo.fetchAllBookings(id);\n\t}", "public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }", "private void getRecords(LocalDate startDate, LocalDate endDate) {\n foods = new ArrayList<>();\n FoodRecordDao dao = new FoodRecordDao();\n try {\n foods = dao.getFoodRecords(LocalDate.now(), LocalDate.now(), \"\");\n } catch (DaoException ex) {\n Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@CrossOrigin(origins = \"http//localhost:4200\")\n\t@RequestMapping(value = \"/api/availableRooms\", method = RequestMethod.POST)\n\tpublic List<HospitalRoom> availableRooms(@RequestBody SurgeryDTO surgeryDTO) throws ParseException {\n\t\tList<HospitalRoom> ret = new ArrayList<>();\n\t\tSurgery surgery = null;\n\t\ttry {\n\t\t\tsurgery = ss.findById(surgeryDTO.getId());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t\tClinic clinic = surgery.getClinic();\n\t\t// Uzimamo milisekunde kad je zakazano\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm\");\n\t\tDate date = dateFormat.parse(surgeryDTO.getDate());\n\t\t// Prolazimo kroz sve sale i gledamo koja je slobodna u tom trenutku\n\t\tList<HospitalRoom> allRooms = hrs.findByClinicId(surgery.getClinic().getId());\n\t\tfor (HospitalRoom hospitalRoom : allRooms) {\n\t\t\tboolean nadjenaOperacijaKojaJeUTomTerminu = false;\n\t\t\t// Proveravamo da li je zakazana neka operacija tada\n\t\t\tList<Surgery> roomSurgeries = ss.findByHospitalId(hospitalRoom.getId());\n\t\t\tfor (Surgery s : roomSurgeries) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// poredim datum moje operacije i datum operacije u ovom for-u\n\t\t\t\t\tif (surgery.getDate().equals(s.getDate())) {\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<Appointment> appsRoom = this.as.findByHospitalRoomId(hospitalRoom.getId());\n\t\t\tfor (Appointment appointment : appsRoom) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// Provaravamo datum moje operacije i datum operacije, ako je 0 onda su jednaki\n\t\t\t\t\tif (surgery.getDate().equals(appointment.getDate())) {\n\t\t\t\t\t\t// Da li se poklapaju satnice\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!nadjenaOperacijaKojaJeUTomTerminu)\n\t\t\t\tret.add(hospitalRoom);\n\t\t\tSet<Appointment> roomAppointments = hospitalRoom.getAppointments();\n\t\t}\n\t\treturn ret;\n\t}", "public List<Worker> getWorkersByDepartmentIdAndAvailabilityUsingCriteria(int departmentId, WorkerAvailability availability) {\n CriteriaBuilder builder = currentSession.getCriteriaBuilder();\n\n CriteriaQuery<Worker> criteria = builder.createQuery(Worker.class);\n Root<Worker> root = criteria.from(Worker.class);\n\n criteria.select(root).where(builder.and(builder.equal(root.get(\"department\").get(\"id\"), departmentId)),\n (builder.equal(root.get(\"availability\"), availability)));\n\n Query<Worker> q = currentSession.createQuery(criteria);\n\n return q.getResultList();\n\n }", "@Override\n public List<LocalTime> getAvailableTimesForServiceAndDate(final com.wellybean.gersgarage.model.Service service, LocalDate date) {\n\n LocalTime garageOpening = LocalTime.of(9,0);\n LocalTime garageClosing = LocalTime.of(17, 0);\n\n // List of all slots set as available\n List<LocalTime> listAvailableTimes = new ArrayList<>();\n for(LocalTime slot = garageOpening; slot.isBefore(garageClosing); slot = slot.plusHours(1)) {\n listAvailableTimes.add(slot);\n }\n\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n\n // This removes slots that are occupied by bookings on the same day\n if(optionalBookingList.isPresent()) {\n List<Booking> bookingsList = optionalBookingList.get();\n for(Booking booking : bookingsList) {\n int bookingDurationInHours = booking.getService().getDurationInMinutes() / 60;\n // Loops through all slots used by the booking and removes them from list of available slots\n for(LocalTime bookingTime = booking.getTime();\n bookingTime.isBefore(booking.getTime().plusHours(bookingDurationInHours));\n bookingTime = bookingTime.plusHours(1)) {\n\n listAvailableTimes.remove(bookingTime);\n }\n }\n }\n\n int serviceDurationInHours = service.getDurationInMinutes() / 60;\n\n // To avoid concurrent modification of list\n List<LocalTime> listAvailableTimesCopy = new ArrayList<>(listAvailableTimes);\n\n // This removes slots that are available but that are not enough to finish the service. Example: 09:00 is\n // available but 10:00 is not. For a service that takes two hours, the 09:00 slot should be removed.\n for(LocalTime slot : listAvailableTimesCopy) {\n boolean isSlotAvailable = true;\n // Loops through the next slots within the duration of the service\n for(LocalTime nextSlot = slot.plusHours(1); nextSlot.isBefore(slot.plusHours(serviceDurationInHours)); nextSlot = nextSlot.plusHours(1)) {\n if(!listAvailableTimes.contains(nextSlot)) {\n isSlotAvailable = false;\n break;\n }\n }\n if(!isSlotAvailable) {\n listAvailableTimes.remove(slot);\n }\n }\n\n return listAvailableTimes;\n }", "public Reservation getReservation(final String routeName, final LocalDate date, final UUID reservationId) {\n ReservationModel reservationModel = reservationRepository\n .findByRouteNameAndDateAndReservationId(routeName, date, reservationId).orElseThrow(() ->\n new NotFoundException(\"Reservation Not Found\"));\n\n return routeMapper.toReservation(reservationModel);\n }", "List<Menu> findByHotelHotelName(String hotelName);" ]
[ "0.639893", "0.6398586", "0.6333036", "0.6301488", "0.6164427", "0.61448824", "0.60802925", "0.6026226", "0.60179627", "0.60081404", "0.5912509", "0.5891224", "0.5889949", "0.5861576", "0.5840405", "0.5806791", "0.5745194", "0.5730598", "0.5706393", "0.56825405", "0.56191087", "0.5607231", "0.56059426", "0.5597722", "0.5585451", "0.5531245", "0.5506135", "0.549265", "0.5482683", "0.5463497", "0.5461675", "0.5431936", "0.54212415", "0.54132", "0.5400399", "0.53737444", "0.53194076", "0.5317066", "0.5297005", "0.52895993", "0.5276176", "0.52742165", "0.52726686", "0.5261362", "0.52449846", "0.5244882", "0.5240366", "0.5236307", "0.52303153", "0.52141565", "0.52109885", "0.52091545", "0.5208825", "0.5207453", "0.52065825", "0.51989335", "0.5192084", "0.5190512", "0.5174743", "0.5160476", "0.5146248", "0.5145244", "0.51266146", "0.51216966", "0.5102845", "0.5087578", "0.50679296", "0.50670195", "0.50573707", "0.50549215", "0.50450116", "0.50371057", "0.5025944", "0.501076", "0.50080997", "0.5007372", "0.5006807", "0.5002672", "0.4972226", "0.497133", "0.49665406", "0.49625695", "0.4961908", "0.4960804", "0.49570936", "0.49265426", "0.49262172", "0.49251485", "0.4924819", "0.4919991", "0.49101698", "0.4909038", "0.49089807", "0.49058118", "0.4904235", "0.49038523", "0.49019828", "0.48946142", "0.489252", "0.4885947" ]
0.664528
0
Finds all availabilities and pricelistings for a particular type of room at a specified hotel within a date range:
public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException { ResultSet rs = null; String sql = "SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setHotelName(hotel_name); pStmt.setString(1, getHotelName()); setBranchID(branchID); pStmt.setInt(2, getBranchID()); setType(type); pStmt.setString(3, getType()); pStmt.setString(4, from.toString()); pStmt.setString(5, to.toString()); try { System.out.printf(" Availabilities for %S type at %S, branch ID (%d): \n", getType(), getHotelName(), getBranchID()); System.out.printf(" Date Listing: " + String.valueOf(from) + " TO " + String.valueOf(to) + "\n"); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while(rs.next()) { System.out.println(rs.getInt(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }", "private ArrayList<Room> roomAvailability(LocalDate start, LocalDate end, int small, int medium, int large) {\n ArrayList<Room> availableRooms = new ArrayList<Room>();\n // Iterate for all rooms in the venue\n for (Room room : rooms) {\n // Search the venue's reservations that contain the specified room.\n ArrayList<Reservation> reservationsWithRoom = Reservation.searchReservation(reservations, room);\n // Try to find rooms that fulfil the request.\n switch(room.getSize()) {\n case \"small\":\n // Ignore if no small rooms are needed.\n if (small > 0) {\n // If there no reservations with the room or the reserved dates do not\n // overlap, then add the room sinced it is available.\n if(reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n\n availableRooms.add(room);\n small--;\n } \n }\n break;\n\n case \"medium\":\n // Ignore if no medium rooms are needed.\n if (medium > 0) {\n \n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n medium--;\n }\n }\n break;\n\n case \"large\":\n // Ignore if no large rooms ar eneeded.\n if (large > 0) {\n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n large--;\n }\n break;\n }\n }\n }\n // A request cannot be fulfilled if there are no rooms available in the venue\n if (small > 0 || medium > 0 || large > 0) {\n \n return null;\n } else {\n return availableRooms;\n }\n }", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(2, getBranchID());\n\n try {\n\n System.out.printf(\" Room types available at %S, branch ID (%d)\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Override\n\tpublic List<HotelroomPo> getHotelroomByroomType(String roomType) {\n\t\t\n\t\tList<HotelroomPo> hotelrooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getRoomType().equals(roomType))\n\t\t\t\thotelrooms.add(hotelroomPo);\n\t\t}\n\t\treturn hotelrooms;\n\t}", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }", "public void CheckAvail(LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n {\r\n System.out.println(\"more than 30\");\r\n return;\r\n }//Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n {\r\n System.out.println(\"Less than 0\");\r\n return;\r\n }\r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n {\r\n ispossible = false;\r\n }\r\n } \r\n \r\n if (ispossible)\r\n System.out.println(roomtypes.get(i).roomname);\r\n }\r\n }", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByDate(Date date);", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);", "public ArrayList<Room> getAvailableRooms(LocalDate start, LocalDate end,\n int small, int medium, int large) {\n // Prepare temporary variables since the function using them will change. We do not want to change the original small, medium and large parameters.\n int tmpSmall = small;\n int tmpMedium = medium;\n int tmpLarge = large;\n return roomAvailability(start, end, tmpSmall, tmpMedium, tmpLarge);\n \n }", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\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\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}", "public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}", "public ArrayList<VacancyQueryDTO> findVacantRooms (VacancyQueryDTO query);", "@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}", "public void updateAvailability(String type) {\n\t\tString title = \"\";\n\t\tif (startDate != null & endDate != null) {\n\t\t\ttitle = \"Available Rooms \" + formatDate(startDate) + \" - \" + formatDate(endDate);\n\t\t}\n\t\tavailabilityDisplay.setText(guestModel.getRooms(type));\n\n\t\tavailabilityLabel.setText(title);\n\t\tadd(availabilityLabel);\n\t}", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public List<Hotel> findByPriceBetween(double low, double high);", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "public List<Room> findAllRooms();", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public List<Room> findAppropriate(String applicationId) throws DAOException {\n List<Room> rooms = new ArrayList<Room>();\n Map<Integer, Integer> dayCompletionList;\n boolean isAvailable = true;\n int minPlacesAvailable;\n int neededPlacesAmount = 0;\n Date mainArrival = null;\n Date mainDeparture = null;\n PreparedStatement statement = null;\n PreparedStatement getApplicationData = null;\n PreparedStatement getRoomType = null;\n PreparedStatement getApplicationsForRoom = null;\n ResultSet applicationDataResultSet;\n ResultSet resultSet;\n ResultSet roomTypeResultSet;\n ResultSet applicationsForRoom;\n try {\n getApplicationData = proxyConnection.prepareStatement(SQL_SELECT_APPLICATION_DATA);\n getApplicationData.setLong(1, Long.parseLong(applicationId));\n\n applicationDataResultSet = getApplicationData.executeQuery();\n if (applicationDataResultSet.next()) {\n neededPlacesAmount = applicationDataResultSet.getInt(1);\n mainArrival = applicationDataResultSet.getDate(2);\n mainDeparture = applicationDataResultSet.getDate(3);\n }\n getRoomType = proxyConnection.prepareStatement(SQL_SELECT_ROOM_TYPE);\n getApplicationsForRoom = proxyConnection.prepareStatement(SQL_SELECT_APPLICATIONS_FOR_ROOM);\n getApplicationsForRoom.setInt(1, CONFIRMED);\n\n statement = proxyConnection.prepareStatement(SQL_SELECT_ROOMS_FOR_APPLICATION);\n statement.setLong(1, Long.parseLong(applicationId));\n\n resultSet = statement.executeQuery();\n while (resultSet.next()) {//all rooms of type\n dayCompletionList = new HashMap<>();\n Room room = new Room();\n room.setId(resultSet.getLong(1));\n room.setMaxPlaces(resultSet.getInt(2));\n room.setPrice(resultSet.getInt(3));\n getRoomType.setLong(1, Long.parseLong(resultSet.getString(4)));\n\n roomTypeResultSet = getRoomType.executeQuery();\n if (roomTypeResultSet.next()) {\n room.setType(roomTypeResultSet.getString(1));\n }\n getApplicationsForRoom.setLong(2, room.getId());\n getApplicationsForRoom.setDate(3, mainDeparture);\n getApplicationsForRoom.setDate(4, mainArrival);\n\n applicationsForRoom = getApplicationsForRoom.executeQuery();\n //number of day from 0 year\n int firstDay;\n int lastDay;\n int placesAmount = 0;\n minPlacesAvailable = room.getMaxPlaces();\n //through all confirmed applications for current room (only in case smn has already booked it)\n while (applicationsForRoom.next()) {\n placesAmount = applicationsForRoom.getInt(1);\n firstDay = applicationsForRoom.getInt(2);\n lastDay = applicationsForRoom.getInt(3);\n Integer i = firstDay;\n while (i <= lastDay) {\n if (dayCompletionList.containsKey(i)) {\n dayCompletionList.put(i, dayCompletionList.get(i) + placesAmount);\n } else {\n dayCompletionList.put(i, placesAmount);\n }\n i++;\n }\n }\n //заполненность дней по подтвержденным заявкам (сколько уже занято)\n for (int amount : dayCompletionList.values()) {\n if (room.getMaxPlaces() - amount < minPlacesAvailable) {\n //сколько осталось мест на такой период\n minPlacesAvailable = room.getMaxPlaces() - amount;\n }\n if (amount + neededPlacesAmount > room.getMaxPlaces()) {\n isAvailable = false;\n }\n }\n if (isAvailable) {\n room.setFreePlaces(minPlacesAvailable);\n rooms.add(room);\n }\n }\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n close(statement);\n close(getApplicationData);\n close(getApplicationsForRoom);\n close(getRoomType);\n }\n return rooms;\n }", "@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfRoomsRequired());\n boolean filterByTravellers = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfTravellers());\n boolean filterByRating = !ObjectUtils.isEmpty(hotelFilterRequest.getRating());\n boolean filterByFacilities = hotelFilterRequest.getFacilities() != null && hotelFilterRequest.getFacilities().size() > 0;\n List<HotelMinimalResponseDTO> hotelMinimalResponses = hotels.stream()\n .filter(hotel -> {\n boolean roomFilter = !filterByRooms || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalNumberOfRooms(hotel) >= hotelFilterRequest.getNumberOfRoomsRequired()\n );\n boolean travelFilter = !filterByTravellers || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalRoomsCapacity(hotel) >= hotelFilterRequest.getNumberOfTravellers()\n );\n boolean ratingFilter = !filterByRating || (\n hotel.getReviews() != null && hotel.getReviews().size() > 0 &&\n getAverageRating(hotel) >= hotelFilterRequest.getRating()\n );\n List<String> facilities = new ArrayList<>();\n if (filterByFacilities) {\n facilities = getCombinedFacilities(hotel);\n }\n List<String> distinctHotelFacilities = facilities.stream().distinct().collect(Collectors.toList());\n boolean facilitiesFilter = !filterByFacilities || (distinctHotelFacilities.containsAll(hotelFilterRequest.getFacilities()));\n return roomFilter && travelFilter && ratingFilter && facilitiesFilter;\n })\n .map(this::makeHotelMinimalResponseDTO)\n .collect(Collectors.toList());\n logger.info(\"Fetched hotels information by filters successfully\");\n String sortOrder = hotelFilterRequest.getSortOrder() != null ? hotelFilterRequest.getSortOrder().equalsIgnoreCase(\"DESC\") ? \"DESC\" : \"ASC\" : \"ASC\";\n if (\"COST\".equalsIgnoreCase(hotelFilterRequest.getSortBy())) {\n hotelMinimalResponses.sort((o1, o2) -> {\n if (o1.getAverageRating().equals(o2.getAverageRating())) {\n return 0;\n } else if (o1.getAverageRating() > o2.getAverageRating()) {\n return sortOrder.equals(\"DESC\") ? -1 : 1;\n } else {\n return sortOrder.equals(\"DESC\") ? 1 : -1;\n }\n });\n }\n return hotelMinimalResponses;\n }", "public List<Integer> getBookedRooms(Date fromDate, Date toDate)\r\n {\r\n String fDate = DateFormat.getDateInstance(DateFormat.SHORT).format(fromDate);\r\n String tDate = DateFormat.getDateInstance(DateFormat.SHORT).format(toDate);\r\n \r\n List<Integer> bookedRooms = new LinkedList<>();\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n String bookingFromDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getFromDate());\r\n \r\n String bookingToDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getToDate());\r\n \r\n if(!booking.getCancelled() && !(fDate.compareTo(bookingToDate) == 0) \r\n && fDate.compareTo(bookingToDate) <= 0 &&\r\n bookingFromDate.compareTo(fDate) <= 0 && bookingFromDate.compareTo(tDate) <= 0)\r\n { \r\n List<Integer> b = booking.getRoomNr();\r\n bookedRooms.addAll(b);\r\n }\r\n }// End of while\r\n \r\n return bookedRooms;\r\n }", "@Override\n\tpublic List<AvailableHotelsResponse> getAvailableHotels(AvailableHotelRequest request)\n\t\t\tthrows CommunationFailedException, BusinessException {\n\n\t\tList<AvailableHotelsResponse> hotelResponses = new ArrayList<AvailableHotelsResponse>();\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid request data\");\n\t\t}\n\t\ttry {\n\n\t\t\tGson gson = new Gson();\n\t\t\tString jsonRequestString = gson.toJson(request);\n\n\t\t\tlogger.info(\"AvailableHotelRequest Json String \" + jsonRequestString);\n\n\t\t\tApplicationUrlsHolder applicationUrlsHolder = new ApplicationUrlsHolder();\n\t\t\tMap<HotelProviders, String> providersUrls = applicationUrlsHolder.getHotelProvidersUrls();\n\n\t\t\tfor (Entry<HotelProviders, String> entry : providersUrls.entrySet()) {\n\t\t\t\tHotelProviders hotelProvider = entry.getKey();\n\t\t\t\tString providerUrl = entry.getValue();\n\n\t\t\t\tString jsonResponse = httpCaller.performHttpRequest(jsonRequestString, providerUrl);\n\n\t\t\t\thotelResponses.addAll(ProvidersHotelResponseMapper.mappingHotelResponse(hotelProvider, jsonResponse));\n\t\t\t}\n\n\t\t\tCollections.sort(hotelResponses);\n\n\t\t} catch (BusinessException e) {\n\n\t\t} catch (CommunationFailedException e) {\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\n\t\t\tErrorObj errorObj = new ErrorObj();\n\t\t\terrorObj.setErrorCode(ApplicationConstants.UNKNOWN_EXCEPTION);\n\t\t\terrorObj.setErrorMessage(\"Sorry, Service currently unavailable\");\n\n\t\t\tthrow new BusinessException(errorObj);\n\t\t}\n\n\t\treturn hotelResponses;\n\t}", "@GetMapping(\"/{hotelId}/rooms\")\n public ResponseEntity<Resources<RoomResource>> getRoomsForHotelId(@PathVariable Long hotelId){\n\n return new ResponseEntity<>(\n hotelService.findRoomsByHotelId(hotelId),HttpStatus.OK\n );\n }", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public List<Employee> findEmployeesForServiceByDate(LocalDate date) {\n DayOfWeek dayOfWeek = date.getDayOfWeek();\n\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employeeRepository.findAll();\n for (Employee employee: allEmployees) {\n // Check if employee is available on given days and posses certain skills\n if(employee.getDaysAvailable().contains(dayOfWeek)) {\n employeeAvailable.add(employee);\n }\n }\n\n return employeeAvailable;\n }", "List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );", "public static void main(String[] args) {\n\r\n\t\tint input;\r\n\t\tSystem.out.println(\"Welcome to hotel Booking\");\r\n\t\tSystem.out.println(\"please enter size of hotel\");\r\n\t\tScanner sObj = new Scanner(System.in);\r\n\t\tint size = sObj.nextInt();\r\n\t\tif(size> 1000 ||size<0) {\r\n\t\t\tSystem.out.println(\"please enter correct size of hotel\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetHotelSize(size);\r\n\t\t\tdo{\r\n\t\t\t\tSystem.out.println(\"please enter start and end day\");\r\n\t\t\t\tint start = sObj.nextInt();\r\n\t\t\t\tint end = sObj.nextInt();\r\n\r\n\t\t\t\tif(start<0 || start>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid Start Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(end<start || end>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid end Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint room_number = room_booking(start,end);\r\n\r\n\t\t\t\tif(room_number >0 && room_number <= size) {\r\n\t\t\t\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\t\t\t\tMap<Integer,List<Integer>> booking_details = new HashMap<Integer,List<Integer>>();\r\n\t\t\t\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\t\t\t\tbooking_days.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbooking_details.put(bookingId++,booking_days);\r\n\t\t\t\t\troom_bookings.put(room_number,booking_details);\r\n\t\t\t\t\tSystem.out.println(\"Accept\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Decline\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Press 1 to continue to check room availablity or 0 to exit\");\r\n\t\t\t\tinput = sObj.nextInt();\r\n\t\t\t}while(input==1); \r\n\t\t}\r\n\t}", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByIDReservation(long id);", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "@RequestMapping(value=\"/affordable/{price}\", method=RequestMethod.GET)\r\n @ApiMethod(description = \"Get all hotel bookings there is a price per night less than provided value\")\r\n public List<HotelBooking> getAffordable(@ApiPathParam(name=\"price\") @PathVariable double price) {\r\n return this.bookingRepository.findByPricePerNightLessThan(price);\r\n }", "private void getHotelRoomRateCall(long cityId) {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-DD\", Locale.ENGLISH);\n engCheckInDate = dateFormat.format(checkInDate);\n engCheckOutDate = dateFormat.format(checkOutDate);\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n HotelRoomRateRequest hotelRoomRateRequest = new HotelRoomRateRequest();\n hotelRoomRateRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelRoomRateRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelRoomRateRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelRoomRateRequest.setCityId(cityId);\n hotelRoomRateRequest.setHotelId(Long.parseLong(destination.getKey()));\n hotelRoomRateRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n\n if (kidsAgeArrayList == null)\n kidsAgeArrayList = new ArrayList<>();\n kidsAgeArrayList.clear();\n\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelRoomRateRequest.setOccupancy(occupancyDtoArrayList);\n }\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelListingRequest.setCityId(cityId);\n hotelListingRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n hotelListingRequest.setOccupancy(hotelRoomRateRequest.getOccupancy());\n\n String request = new Gson().toJson(hotelRoomRateRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n hotelSearchPresenter.getHotelRoomRate(Constant.API_URL + Constant.HOTELSRATES, request, getActivity());\n\n } else\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }", "public static void main(String[] args) {\n\n // Initialize Database instance:\n HotelDatabase hotelDB = new HotelDatabase();\n Scanner scan = new Scanner(System.in);\n\n // Get the connection:\n hotelDB.username = \"anowilat\";\n hotelDB.password = \"doopee\";\n Connection connection = hotelDB.getConnection(hotelDB.username, hotelDB.password);\n try {\n // Populate DateList and assign generic values to price:\n hotelDB.populateDemo(connection, LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-31\"));\n //hotelDB.searchArea(connection, \"Long Beach\", \"CA\", 94103);\n //hotelDB.createHotel(connection);\n //hotelDB.showTable(connection);\n //hotelDB.searchCustomerReservations(connection, 2);\n //hotelDB.searchHotelReservations(connection, , int branchID, LocalDate checkIn, LocalDate checkOut)\n //hotelDB.searchAvailabilityType(connection, \"Four Seasons Hotel\", 1, \"Single Suite\", LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-01\"));\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public void setAvailabilitiesFiltered(List<Availability> parsedAvailabilities){\n for(int i=0; i<flights.size(); i++){\n for(int j=0; j<parsedAvailabilities.size();j++) {\n if(flights.get(i).getFlightNumber().equals(parsedAvailabilities.get(j).getFlightNumber()) && flights.get(i).getDepartureDate().equals(parsedAvailabilities.get(j).getDepartureDate()) && flights.get(i).getAirlineCode().equals(parsedAvailabilities.get(j).getAirlineCode()) ){\n availabilities.add(parsedAvailabilities.get(j));\n }\n }\n }\n }", "public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "@CrossOrigin(origins = \"http//localhost:4200\")\n\t@RequestMapping(value = \"/api/availableRooms\", method = RequestMethod.POST)\n\tpublic List<HospitalRoom> availableRooms(@RequestBody SurgeryDTO surgeryDTO) throws ParseException {\n\t\tList<HospitalRoom> ret = new ArrayList<>();\n\t\tSurgery surgery = null;\n\t\ttry {\n\t\t\tsurgery = ss.findById(surgeryDTO.getId());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t\tClinic clinic = surgery.getClinic();\n\t\t// Uzimamo milisekunde kad je zakazano\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm\");\n\t\tDate date = dateFormat.parse(surgeryDTO.getDate());\n\t\t// Prolazimo kroz sve sale i gledamo koja je slobodna u tom trenutku\n\t\tList<HospitalRoom> allRooms = hrs.findByClinicId(surgery.getClinic().getId());\n\t\tfor (HospitalRoom hospitalRoom : allRooms) {\n\t\t\tboolean nadjenaOperacijaKojaJeUTomTerminu = false;\n\t\t\t// Proveravamo da li je zakazana neka operacija tada\n\t\t\tList<Surgery> roomSurgeries = ss.findByHospitalId(hospitalRoom.getId());\n\t\t\tfor (Surgery s : roomSurgeries) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// poredim datum moje operacije i datum operacije u ovom for-u\n\t\t\t\t\tif (surgery.getDate().equals(s.getDate())) {\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<Appointment> appsRoom = this.as.findByHospitalRoomId(hospitalRoom.getId());\n\t\t\tfor (Appointment appointment : appsRoom) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// Provaravamo datum moje operacije i datum operacije, ako je 0 onda su jednaki\n\t\t\t\t\tif (surgery.getDate().equals(appointment.getDate())) {\n\t\t\t\t\t\t// Da li se poklapaju satnice\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!nadjenaOperacijaKojaJeUTomTerminu)\n\t\t\t\tret.add(hospitalRoom);\n\t\t\tSet<Appointment> roomAppointments = hospitalRoom.getAppointments();\n\t\t}\n\t\treturn ret;\n\t}", "@Override\n public RoomRatesEntity findOnlineRateForRoomType(Long roomTypeId, Date currentDate) throws NoAvailableOnlineRoomRateException {\n Query query = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId\");\n query.setParameter(\"roomTypeId\", roomTypeId);\n List<RoomRatesEntity> roomRates = query.getResultList();\n\n //Check what rate type are present\n boolean normal = false;\n boolean promo = false;\n boolean peak = false;\n\n for (RoomRatesEntity roomRate : roomRates) {\n// if (!checkValidityOfRoomRate(roomRate)) { //skips expired/not started rates, price is determined by check in and check out date, it becomes not considered in our final prediction\n// continue;\n// }\n// if null do smt else\n if (roomRate.getIsDisabled() == false) {\n if (null != roomRate.getRateType()) {\n System.out.println(roomRate.getRateType());\n switch (roomRate.getRateType()) {\n case NORMAL:\n normal = true;\n \n break;\n case PROMOTIONAL:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n promo = true;\n }\n break;\n\n case PEAK:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n peak = true;\n }\n break;\n default:\n break;\n }\n }\n\n System.out.println(normal + \" \" + promo + \" \" + peak);\n //5 rules here\n if (normal && promo && peak) {\n //find promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (promo && peak && !normal || normal && peak && !promo) {\n //apply peak, assume only 1\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.PEAK);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n } else if (normal && promo && !peak) {\n //apply promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (normal && !promo && !peak) {\n //apply normal\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.NORMAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n }\n }\n\n }\n throw new NoAvailableOnlineRoomRateException(\"There is no available room rate to be used!\");\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetailsIncludingVacantRooms(\n\t\t\tTenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms1=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=? \",occupiedBy);\n\t\tList<PropertyRooms> rooms2=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",'N');\n\t\t\n\t\trooms1.addAll(rooms2);\n\t\t\n\t\treturn rooms1;\n\t}", "public void getHotelRoomData_DB() throws SQLException{\n \n myHotel = new Room[50]; // initialize size of array of hotel rooms\n roomCounter = 0;\n \n stmt = con.createStatement();\n\n rs = stmt.executeQuery(\"SELECT * FROM APP.HOTELROOMS\");\n \n while (rs.next()){\n int roomNum = rs.getInt(\"ROOMNUMBER\");\n String roomType = rs.getString(\"ROOMTYPE\");\n int bedsNum = rs.getInt(\"BEDS\");\n int roomPrice = rs.getInt(\"PRICE\");\n boolean roomAvailability = rs.getBoolean(\"ISAVAILABLE\");\n String currentGuest = rs.getString(\"OCCUPANT\");\n int currentGuestID = rs.getInt(\"GUESTID\");\n String roomStartDate = rs.getString(\"STARTDATE\");\n String roomEndDate = rs.getString(\"ENDDATE\");\n \n myHotel[roomCounter] = new Room();\n \n //this will set the values above to the array guest.\n myHotel[roomCounter].setHotelRoom(roomNum, roomType, bedsNum, \n roomPrice, roomAvailability, currentGuest, \n currentGuestID,roomStartDate,roomEndDate);\n \n roomCounter++;\n \n System.out.println(roomNum + \" \" + roomType + \" \" + bedsNum + \" \"\n + roomPrice + \" \" + roomAvailability + \" \" + currentGuest+ \" \" \n + currentGuestID + \" \" + roomStartDate + \" \" + roomEndDate );\n }\n stmt.close();\n }", "public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }", "public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n\n if (checkIn == null && checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkIn == null){\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, checkOut.toString());\n }\n else {\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, checkOut.toString());\n }\n\n try {\n\n System.out.printf(\" Reservations for %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\" \" + rs.getString(1) + \" \" + rs.getInt(2));\n System.out.println(\" Reservation DATES: \" + rs.getDate(3) + \" TO \" + rs.getDate(4));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo, String sType)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&type=\"+sType+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\n public List<LocalTime> getAvailableTimesForServiceAndDate(final com.wellybean.gersgarage.model.Service service, LocalDate date) {\n\n LocalTime garageOpening = LocalTime.of(9,0);\n LocalTime garageClosing = LocalTime.of(17, 0);\n\n // List of all slots set as available\n List<LocalTime> listAvailableTimes = new ArrayList<>();\n for(LocalTime slot = garageOpening; slot.isBefore(garageClosing); slot = slot.plusHours(1)) {\n listAvailableTimes.add(slot);\n }\n\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n\n // This removes slots that are occupied by bookings on the same day\n if(optionalBookingList.isPresent()) {\n List<Booking> bookingsList = optionalBookingList.get();\n for(Booking booking : bookingsList) {\n int bookingDurationInHours = booking.getService().getDurationInMinutes() / 60;\n // Loops through all slots used by the booking and removes them from list of available slots\n for(LocalTime bookingTime = booking.getTime();\n bookingTime.isBefore(booking.getTime().plusHours(bookingDurationInHours));\n bookingTime = bookingTime.plusHours(1)) {\n\n listAvailableTimes.remove(bookingTime);\n }\n }\n }\n\n int serviceDurationInHours = service.getDurationInMinutes() / 60;\n\n // To avoid concurrent modification of list\n List<LocalTime> listAvailableTimesCopy = new ArrayList<>(listAvailableTimes);\n\n // This removes slots that are available but that are not enough to finish the service. Example: 09:00 is\n // available but 10:00 is not. For a service that takes two hours, the 09:00 slot should be removed.\n for(LocalTime slot : listAvailableTimesCopy) {\n boolean isSlotAvailable = true;\n // Loops through the next slots within the duration of the service\n for(LocalTime nextSlot = slot.plusHours(1); nextSlot.isBefore(slot.plusHours(serviceDurationInHours)); nextSlot = nextSlot.plusHours(1)) {\n if(!listAvailableTimes.contains(nextSlot)) {\n isSlotAvailable = false;\n break;\n }\n }\n if(!isSlotAvailable) {\n listAvailableTimes.remove(slot);\n }\n }\n\n return listAvailableTimes;\n }", "public PoliceObject[] getPolice(String type, String startDate, String endDate) {\n LinkedList<PoliceObject> list = new LinkedList<>();\n\n boolean hasType = (!type.equals(\"*\"));\n boolean hasStart = (!startDate.equals(\"*\"));\n boolean hasEnd = (!endDate.equals(\"*\"));\n boolean hasDate = (hasStart && hasEnd);\n\n if (hasType && hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n }\n });\n } else if (hasType) {\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n list.add(e);\n }\n });\n } else if (hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n });\n } else {\n list.addAll(this.policeDB.values());\n }\n\n PoliceObject[] array = new PoliceObject[list.size()];\n for (int i=0; i<list.size(); i++) {\n array[i] = list.get(i);\n }\n\n return array;\n }", "List<AccommodationModel> findAccommodationForAccommodationOffering(String accommodationOfferingCode);", "@Test\n\tpublic void testListReservationsOfFacilityInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID,\n\t\t\t\tArrays.asList(room1.getId(), infoBuilding.getId()), reservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(2, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t\tassertTrue(reservationsOfFacility.contains(reservation2));\n\t}", "private void loadAvailableRooms() {\n\n\t\texecutor.submit(() -> {\n\t\t\troomResultsTable.setVisible(false);\n\t\t\tprogress.setVisible(true);\n\t\t\troom.clear();\n\t\t\thotel.clear();\n\t\t\tquality.clear();\n\t\t\trooms = FXCollections.observableArrayList(dbParser.checkAvailableRoomsBetweenDates(arrivalDate.toEpochDay(),\n\t\t\t\t\tdepartureDate.toEpochDay(), hotelChoice.getName(), roomQualityChoice.getQuality()));\n\t\t\troomResultsTable.setItems(rooms);\n\t\t\tprogress.setVisible(false);\n\t\t\troomResultsTable.setVisible(true);\n\t\t});\n\n\t}", "public void ReuseMethodsforDPRcheckavailabitlity(String Enterrooms, String roomtype) throws IOException, InterruptedException, ParseException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSeleniumRepo.driver.navigate().refresh();\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public List<Worker> getWorkersByDepartmentIdAndAvailabilityUsingCriteria(int departmentId, WorkerAvailability availability) {\n CriteriaBuilder builder = currentSession.getCriteriaBuilder();\n\n CriteriaQuery<Worker> criteria = builder.createQuery(Worker.class);\n Root<Worker> root = criteria.from(Worker.class);\n\n criteria.select(root).where(builder.and(builder.equal(root.get(\"department\").get(\"id\"), departmentId)),\n (builder.equal(root.get(\"availability\"), availability)));\n\n Query<Worker> q = currentSession.createQuery(criteria);\n\n return q.getResultList();\n\n }", "public List<Room> getByType(int idRoomType) {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room_type=\" + idRoomType);\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "@Override\n public List<Doctor> searchByAvailability(Availability availability) throws IOException, ClassNotFoundException {\n doctorList = FileSystem.readFile(file, Doctor.class);\n List<Doctor> searchList = search(doctorList, Doctor::getAvailability, availability);\n return searchList;\n }", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "public List<Equipment> findByPriceRange(int from, int to){\n List<Equipment> foundEquipment = new ArrayList<>();\n for(Equipment e: equipment){\n if (e.getPrice() <= to && e.getPrice() >= from){\n foundEquipment.add(e);\n }\n }\n return foundEquipment;\n }", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public interface API {\n Room[] findRooms(int price, int persons, String city, String hotel);\n\n Room[] getAllRooms();\n\n}", "@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "List<Room> selectRoomListWithSearchCondition(@Param(\"condition\") String condition);", "@Override\n\tpublic List<HotelroomPo> getHotelroomByHotelID(int hotelID) {\n\t\t\n\t\tList<HotelroomPo> rooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getHotelID()==hotelID)\n\t\t\t\trooms.add(hotelroomPo);\n\t\t}\n\t\treturn rooms;\n\t}", "public ArrayList<Booking> getBookings(int time,String date){\n ArrayList<Booking>Hours=new ArrayList<>();\n for(int i=0;i<Schedule.size();++i){\n Booking temp=Schedule.get(i); \n String Day=temp.getDate();\n int Datevalue=Integer.parseInt(Day.substring(8,10));\n int Value=Integer.parseInt(date);\n if(time<10) {\n if (temp.getTime().substring(0, 2).equals(\"0\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n else{\n if (temp.getTime().substring(0, 2).equals(\"\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n }\n return Hours;\n }", "public boolean book(Traveler traveler, int numRooms) {\n if (hotels == null) return false;\n\n boolean booked = false;\n for (Hotel hotel : hotels) {\n if (hotel.isAvailable(numRooms))\n booked = hotel.bookRooms(traveler, numRooms);\n if (booked) break;\n }\n\n return booked;\n }", "ArrayList<Restaurant> getRestaurantListByType(String type);", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "@GetMapping(\"/_search/offers\")\n @Timed\n public ResponseEntity<List<OfferDTO>> searchOffers(@RequestParam String query, Pageable pageable) {\n log.debug(\"REST request to search for a page of Offers for query {}\", query);\n Page<OfferDTO> page = offerService.search(query, pageable);\n HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, \"/api/_search/offers\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public interface HotelReservations {\n\n void lookupHotels();\n Hotel getSelectedHotel();\n \n void destroy();\n}", "@Override\r\n\tpublic List<HomePack> queryOilList(Date start, Date end,\r\n\t\t\tList<String> station) {\n\t\tList<HomePack> list = homePageDao.queryOilList(start, end, station);\r\n\t\treturn list;\r\n\t}", "public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}", "@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "public static void main(String[] args){\r\n //Student Name:Chuanxi ZHENG\r\n //Student Number:260760794\r\n //Your code goes here. \r\n System.out.println(\"Please enter the name of your hotel:\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.nextLine();\r\n Room[] roomArray = new Room[getRandomNumberOfRooms()];\r\n for(int i = 0; i<roomArray.length;i++){\r\n roomArray[i] = new Room(getRandomType());\r\n }\r\n Hotel h = new Hotel(name,roomArray);\r\n System.out.println(\"Welcome! Please choose one of the following options\");\r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n Scanner input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n int choice = input.nextInt();\r\n \r\n while(choice!=5){\r\n //make a reservation\r\n if(choice == 1){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you like to reserve?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.createReservation(username,usertype);\r\n }\r\n //cancel a reservation\r\n if(choice == 2){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you want to cancel?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.cancelReservation(username,usertype);\r\n }\r\n //see an invoice\r\n if(choice == 3){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n h.printInvoice(username);\r\n }\r\n //see hotel information\r\n if(choice == 4){\r\n System.out.println(h.toString());\r\n }\r\n \r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n choice = input.nextInt();\r\n }\r\n \r\n //Exit the booking system\r\n if(choice == 5){\r\n System.out.println(\"It was a pleasure doing business with you!\");\r\n }\r\n }", "public void setAvailability(String date) {\n\t\tavailableAt = date;\n\t}" ]
[ "0.63189995", "0.6288029", "0.61529064", "0.6129893", "0.61029464", "0.6081066", "0.60220855", "0.60041463", "0.5993861", "0.5992764", "0.5977878", "0.5833346", "0.5830821", "0.5827504", "0.58113027", "0.5802989", "0.5797115", "0.57730913", "0.57394665", "0.57234645", "0.5721072", "0.56873626", "0.56713027", "0.567082", "0.5653511", "0.56503737", "0.5633705", "0.55944896", "0.5586277", "0.5581807", "0.5568498", "0.5561786", "0.5500385", "0.5473295", "0.5453972", "0.5444313", "0.54439276", "0.5438925", "0.5437656", "0.5426901", "0.54259044", "0.5425522", "0.54046685", "0.53982437", "0.53868276", "0.5384495", "0.5372959", "0.5358625", "0.53443605", "0.5323158", "0.5316439", "0.5290234", "0.5277629", "0.52717453", "0.52710646", "0.5265882", "0.5256078", "0.5245194", "0.5243278", "0.52428967", "0.5237137", "0.52236646", "0.5192175", "0.5186766", "0.5173702", "0.51669496", "0.5165274", "0.5116434", "0.5086413", "0.50853884", "0.5078079", "0.5066903", "0.50654614", "0.5060288", "0.5058278", "0.5042744", "0.504166", "0.5037613", "0.5033626", "0.5032632", "0.5027754", "0.50168025", "0.5009303", "0.5008946", "0.5005065", "0.4989603", "0.4987682", "0.4981148", "0.49759296", "0.49696624", "0.49645963", "0.49564427", "0.4945482", "0.4944864", "0.4944648", "0.49417242", "0.49300092", "0.4925118", "0.49152336", "0.49078327" ]
0.6730847
0
Finds all availabilities and pricelistings for ALL types of rooms at a specified hotel within a date range:
public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException { ResultSet rs = null; String sql = "SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setHotelName(hotel_name); pStmt.setString(1, getHotelName()); setBranchID(branchID); pStmt.setInt(2, getBranchID()); pStmt.setDate(3, from); pStmt.setDate(4, to); try { System.out.printf(" Availiabilities at %S, branch ID (%d): \n", getHotelName(), getBranchID()); System.out.printf(" Date Listing: " + String.valueOf(from) + " TO " + String.valueOf(to) + "\n"); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2) + " " + rs.getInt(3)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }", "private ArrayList<Room> roomAvailability(LocalDate start, LocalDate end, int small, int medium, int large) {\n ArrayList<Room> availableRooms = new ArrayList<Room>();\n // Iterate for all rooms in the venue\n for (Room room : rooms) {\n // Search the venue's reservations that contain the specified room.\n ArrayList<Reservation> reservationsWithRoom = Reservation.searchReservation(reservations, room);\n // Try to find rooms that fulfil the request.\n switch(room.getSize()) {\n case \"small\":\n // Ignore if no small rooms are needed.\n if (small > 0) {\n // If there no reservations with the room or the reserved dates do not\n // overlap, then add the room sinced it is available.\n if(reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n\n availableRooms.add(room);\n small--;\n } \n }\n break;\n\n case \"medium\":\n // Ignore if no medium rooms are needed.\n if (medium > 0) {\n \n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n medium--;\n }\n }\n break;\n\n case \"large\":\n // Ignore if no large rooms ar eneeded.\n if (large > 0) {\n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n large--;\n }\n break;\n }\n }\n }\n // A request cannot be fulfilled if there are no rooms available in the venue\n if (small > 0 || medium > 0 || large > 0) {\n \n return null;\n } else {\n return availableRooms;\n }\n }", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(2, getBranchID());\n\n try {\n\n System.out.printf(\" Room types available at %S, branch ID (%d)\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "private static boolean availabilityQuery(String roomid, String date1, String date2)\n {\n String query = \"SELECT status\"\n + \" FROM (\"\n + \" SELECT DISTINCT ro.RoomId, 'occupied' AS status\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\" \n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\"\n + \" UNION\"\n + \" SELECT DISTINCT RoomId, 'empty' AS status\"\n + \" FROM myRooms\"\n + \" WHERE RoomId NOT IN (\"\n + \" SELECT DISTINCT re.Room\"\n + \" FROM myReservations re JOIN myRooms ro ON (re.Room = ro.RoomId)\"\n + \" WHERE (DATEDIFF(CheckIn, DATE(\" + date1 + \")) <= 0\"\n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) > 0)\"\n + \" OR (DATEDIFF(CheckIn, DATE(\" + date1 + \")) > 0\"\n + \" AND DATEDIFF(CheckIn, DATE(\" + date2 + \")) <= 0)\" \n + \" OR (DATEDIFF(CheckOut, DATE(\" + date1 + \")) > 0\" \n + \" AND DATEDIFF(CheckOut, DATE(\" + date2 + \")) < 0)\" \n + \" )) AS tb\"\n + \" WHERE RoomId = '\" + roomid + \"'\";\n\n PreparedStatement stmt = null;\n ResultSet rset = null;\n\n try\n {\n stmt = conn.prepareStatement(query);\n rset = stmt.executeQuery();\n rset.next();\n if(rset.getString(\"status\").equals(\"empty\"))\n return true;\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try {\n stmt.close();\n }\n catch (Exception ex) {\n ex.printStackTrace( ); \n } \t\n }\n \n return false;\n\n }", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByDate(Date date);", "@Override\n\tpublic List<HotelroomPo> getHotelroomByroomType(String roomType) {\n\t\t\n\t\tList<HotelroomPo> hotelrooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getRoomType().equals(roomType))\n\t\t\t\thotelrooms.add(hotelroomPo);\n\t\t}\n\t\treturn hotelrooms;\n\t}", "public void CheckAvail(LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n {\r\n System.out.println(\"more than 30\");\r\n return;\r\n }//Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n {\r\n System.out.println(\"Less than 0\");\r\n return;\r\n }\r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n {\r\n ispossible = false;\r\n }\r\n } \r\n \r\n if (ispossible)\r\n System.out.println(roomtypes.get(i).roomname);\r\n }\r\n }", "public ArrayList<Room> getAvailableRooms(LocalDate start, LocalDate end,\n int small, int medium, int large) {\n // Prepare temporary variables since the function using them will change. We do not want to change the original small, medium and large parameters.\n int tmpSmall = small;\n int tmpMedium = medium;\n int tmpLarge = large;\n return roomAvailability(start, end, tmpSmall, tmpMedium, tmpLarge);\n \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}", "public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public ArrayList<VacancyQueryDTO> findVacantRooms (VacancyQueryDTO query);", "public List<Room> findAllRooms();", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\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\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public List<Integer> getBookedRooms(Date fromDate, Date toDate)\r\n {\r\n String fDate = DateFormat.getDateInstance(DateFormat.SHORT).format(fromDate);\r\n String tDate = DateFormat.getDateInstance(DateFormat.SHORT).format(toDate);\r\n \r\n List<Integer> bookedRooms = new LinkedList<>();\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n String bookingFromDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getFromDate());\r\n \r\n String bookingToDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getToDate());\r\n \r\n if(!booking.getCancelled() && !(fDate.compareTo(bookingToDate) == 0) \r\n && fDate.compareTo(bookingToDate) <= 0 &&\r\n bookingFromDate.compareTo(fDate) <= 0 && bookingFromDate.compareTo(tDate) <= 0)\r\n { \r\n List<Integer> b = booking.getRoomNr();\r\n bookedRooms.addAll(b);\r\n }\r\n }// End of while\r\n \r\n return bookedRooms;\r\n }", "@GetMapping(\"/{hotelId}/rooms\")\n public ResponseEntity<Resources<RoomResource>> getRoomsForHotelId(@PathVariable Long hotelId){\n\n return new ResponseEntity<>(\n hotelService.findRoomsByHotelId(hotelId),HttpStatus.OK\n );\n }", "@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfRoomsRequired());\n boolean filterByTravellers = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOfTravellers());\n boolean filterByRating = !ObjectUtils.isEmpty(hotelFilterRequest.getRating());\n boolean filterByFacilities = hotelFilterRequest.getFacilities() != null && hotelFilterRequest.getFacilities().size() > 0;\n List<HotelMinimalResponseDTO> hotelMinimalResponses = hotels.stream()\n .filter(hotel -> {\n boolean roomFilter = !filterByRooms || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalNumberOfRooms(hotel) >= hotelFilterRequest.getNumberOfRoomsRequired()\n );\n boolean travelFilter = !filterByTravellers || (\n hotel.getRooms() != null && hotel.getRooms().size() > 0 &&\n getTotalRoomsCapacity(hotel) >= hotelFilterRequest.getNumberOfTravellers()\n );\n boolean ratingFilter = !filterByRating || (\n hotel.getReviews() != null && hotel.getReviews().size() > 0 &&\n getAverageRating(hotel) >= hotelFilterRequest.getRating()\n );\n List<String> facilities = new ArrayList<>();\n if (filterByFacilities) {\n facilities = getCombinedFacilities(hotel);\n }\n List<String> distinctHotelFacilities = facilities.stream().distinct().collect(Collectors.toList());\n boolean facilitiesFilter = !filterByFacilities || (distinctHotelFacilities.containsAll(hotelFilterRequest.getFacilities()));\n return roomFilter && travelFilter && ratingFilter && facilitiesFilter;\n })\n .map(this::makeHotelMinimalResponseDTO)\n .collect(Collectors.toList());\n logger.info(\"Fetched hotels information by filters successfully\");\n String sortOrder = hotelFilterRequest.getSortOrder() != null ? hotelFilterRequest.getSortOrder().equalsIgnoreCase(\"DESC\") ? \"DESC\" : \"ASC\" : \"ASC\";\n if (\"COST\".equalsIgnoreCase(hotelFilterRequest.getSortBy())) {\n hotelMinimalResponses.sort((o1, o2) -> {\n if (o1.getAverageRating().equals(o2.getAverageRating())) {\n return 0;\n } else if (o1.getAverageRating() > o2.getAverageRating()) {\n return sortOrder.equals(\"DESC\") ? -1 : 1;\n } else {\n return sortOrder.equals(\"DESC\") ? 1 : -1;\n }\n });\n }\n return hotelMinimalResponses;\n }", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}", "public List<Room> findAppropriate(String applicationId) throws DAOException {\n List<Room> rooms = new ArrayList<Room>();\n Map<Integer, Integer> dayCompletionList;\n boolean isAvailable = true;\n int minPlacesAvailable;\n int neededPlacesAmount = 0;\n Date mainArrival = null;\n Date mainDeparture = null;\n PreparedStatement statement = null;\n PreparedStatement getApplicationData = null;\n PreparedStatement getRoomType = null;\n PreparedStatement getApplicationsForRoom = null;\n ResultSet applicationDataResultSet;\n ResultSet resultSet;\n ResultSet roomTypeResultSet;\n ResultSet applicationsForRoom;\n try {\n getApplicationData = proxyConnection.prepareStatement(SQL_SELECT_APPLICATION_DATA);\n getApplicationData.setLong(1, Long.parseLong(applicationId));\n\n applicationDataResultSet = getApplicationData.executeQuery();\n if (applicationDataResultSet.next()) {\n neededPlacesAmount = applicationDataResultSet.getInt(1);\n mainArrival = applicationDataResultSet.getDate(2);\n mainDeparture = applicationDataResultSet.getDate(3);\n }\n getRoomType = proxyConnection.prepareStatement(SQL_SELECT_ROOM_TYPE);\n getApplicationsForRoom = proxyConnection.prepareStatement(SQL_SELECT_APPLICATIONS_FOR_ROOM);\n getApplicationsForRoom.setInt(1, CONFIRMED);\n\n statement = proxyConnection.prepareStatement(SQL_SELECT_ROOMS_FOR_APPLICATION);\n statement.setLong(1, Long.parseLong(applicationId));\n\n resultSet = statement.executeQuery();\n while (resultSet.next()) {//all rooms of type\n dayCompletionList = new HashMap<>();\n Room room = new Room();\n room.setId(resultSet.getLong(1));\n room.setMaxPlaces(resultSet.getInt(2));\n room.setPrice(resultSet.getInt(3));\n getRoomType.setLong(1, Long.parseLong(resultSet.getString(4)));\n\n roomTypeResultSet = getRoomType.executeQuery();\n if (roomTypeResultSet.next()) {\n room.setType(roomTypeResultSet.getString(1));\n }\n getApplicationsForRoom.setLong(2, room.getId());\n getApplicationsForRoom.setDate(3, mainDeparture);\n getApplicationsForRoom.setDate(4, mainArrival);\n\n applicationsForRoom = getApplicationsForRoom.executeQuery();\n //number of day from 0 year\n int firstDay;\n int lastDay;\n int placesAmount = 0;\n minPlacesAvailable = room.getMaxPlaces();\n //through all confirmed applications for current room (only in case smn has already booked it)\n while (applicationsForRoom.next()) {\n placesAmount = applicationsForRoom.getInt(1);\n firstDay = applicationsForRoom.getInt(2);\n lastDay = applicationsForRoom.getInt(3);\n Integer i = firstDay;\n while (i <= lastDay) {\n if (dayCompletionList.containsKey(i)) {\n dayCompletionList.put(i, dayCompletionList.get(i) + placesAmount);\n } else {\n dayCompletionList.put(i, placesAmount);\n }\n i++;\n }\n }\n //заполненность дней по подтвержденным заявкам (сколько уже занято)\n for (int amount : dayCompletionList.values()) {\n if (room.getMaxPlaces() - amount < minPlacesAvailable) {\n //сколько осталось мест на такой период\n minPlacesAvailable = room.getMaxPlaces() - amount;\n }\n if (amount + neededPlacesAmount > room.getMaxPlaces()) {\n isAvailable = false;\n }\n }\n if (isAvailable) {\n room.setFreePlaces(minPlacesAvailable);\n rooms.add(room);\n }\n }\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n close(statement);\n close(getApplicationData);\n close(getApplicationsForRoom);\n close(getRoomType);\n }\n return rooms;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetailsIncludingVacantRooms(\n\t\t\tTenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms1=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=? \",occupiedBy);\n\t\tList<PropertyRooms> rooms2=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",'N');\n\t\t\n\t\trooms1.addAll(rooms2);\n\t\t\n\t\treturn rooms1;\n\t}", "public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo, String sType)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&type=\"+sType+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "public List<Hotel> findByPriceBetween(double low, double high);", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "@CrossOrigin(origins = \"http//localhost:4200\")\n\t@RequestMapping(value = \"/api/availableRooms\", method = RequestMethod.POST)\n\tpublic List<HospitalRoom> availableRooms(@RequestBody SurgeryDTO surgeryDTO) throws ParseException {\n\t\tList<HospitalRoom> ret = new ArrayList<>();\n\t\tSurgery surgery = null;\n\t\ttry {\n\t\t\tsurgery = ss.findById(surgeryDTO.getId());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t\tClinic clinic = surgery.getClinic();\n\t\t// Uzimamo milisekunde kad je zakazano\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm\");\n\t\tDate date = dateFormat.parse(surgeryDTO.getDate());\n\t\t// Prolazimo kroz sve sale i gledamo koja je slobodna u tom trenutku\n\t\tList<HospitalRoom> allRooms = hrs.findByClinicId(surgery.getClinic().getId());\n\t\tfor (HospitalRoom hospitalRoom : allRooms) {\n\t\t\tboolean nadjenaOperacijaKojaJeUTomTerminu = false;\n\t\t\t// Proveravamo da li je zakazana neka operacija tada\n\t\t\tList<Surgery> roomSurgeries = ss.findByHospitalId(hospitalRoom.getId());\n\t\t\tfor (Surgery s : roomSurgeries) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// poredim datum moje operacije i datum operacije u ovom for-u\n\t\t\t\t\tif (surgery.getDate().equals(s.getDate())) {\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<Appointment> appsRoom = this.as.findByHospitalRoomId(hospitalRoom.getId());\n\t\t\tfor (Appointment appointment : appsRoom) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// Provaravamo datum moje operacije i datum operacije, ako je 0 onda su jednaki\n\t\t\t\t\tif (surgery.getDate().equals(appointment.getDate())) {\n\t\t\t\t\t\t// Da li se poklapaju satnice\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!nadjenaOperacijaKojaJeUTomTerminu)\n\t\t\t\tret.add(hospitalRoom);\n\t\t\tSet<Appointment> roomAppointments = hospitalRoom.getAppointments();\n\t\t}\n\t\treturn ret;\n\t}", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "public static void main(String[] args) {\n\n // Initialize Database instance:\n HotelDatabase hotelDB = new HotelDatabase();\n Scanner scan = new Scanner(System.in);\n\n // Get the connection:\n hotelDB.username = \"anowilat\";\n hotelDB.password = \"doopee\";\n Connection connection = hotelDB.getConnection(hotelDB.username, hotelDB.password);\n try {\n // Populate DateList and assign generic values to price:\n hotelDB.populateDemo(connection, LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-31\"));\n //hotelDB.searchArea(connection, \"Long Beach\", \"CA\", 94103);\n //hotelDB.createHotel(connection);\n //hotelDB.showTable(connection);\n //hotelDB.searchCustomerReservations(connection, 2);\n //hotelDB.searchHotelReservations(connection, , int branchID, LocalDate checkIn, LocalDate checkOut)\n //hotelDB.searchAvailabilityType(connection, \"Four Seasons Hotel\", 1, \"Single Suite\", LocalDate.parse(\"2018-12-01\"), LocalDate.parse(\"2018-12-01\"));\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic List<AvailableHotelsResponse> getAvailableHotels(AvailableHotelRequest request)\n\t\t\tthrows CommunationFailedException, BusinessException {\n\n\t\tList<AvailableHotelsResponse> hotelResponses = new ArrayList<AvailableHotelsResponse>();\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid request data\");\n\t\t}\n\t\ttry {\n\n\t\t\tGson gson = new Gson();\n\t\t\tString jsonRequestString = gson.toJson(request);\n\n\t\t\tlogger.info(\"AvailableHotelRequest Json String \" + jsonRequestString);\n\n\t\t\tApplicationUrlsHolder applicationUrlsHolder = new ApplicationUrlsHolder();\n\t\t\tMap<HotelProviders, String> providersUrls = applicationUrlsHolder.getHotelProvidersUrls();\n\n\t\t\tfor (Entry<HotelProviders, String> entry : providersUrls.entrySet()) {\n\t\t\t\tHotelProviders hotelProvider = entry.getKey();\n\t\t\t\tString providerUrl = entry.getValue();\n\n\t\t\t\tString jsonResponse = httpCaller.performHttpRequest(jsonRequestString, providerUrl);\n\n\t\t\t\thotelResponses.addAll(ProvidersHotelResponseMapper.mappingHotelResponse(hotelProvider, jsonResponse));\n\t\t\t}\n\n\t\t\tCollections.sort(hotelResponses);\n\n\t\t} catch (BusinessException e) {\n\n\t\t} catch (CommunationFailedException e) {\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\n\t\t\tErrorObj errorObj = new ErrorObj();\n\t\t\terrorObj.setErrorCode(ApplicationConstants.UNKNOWN_EXCEPTION);\n\t\t\terrorObj.setErrorMessage(\"Sorry, Service currently unavailable\");\n\n\t\t\tthrow new BusinessException(errorObj);\n\t\t}\n\n\t\treturn hotelResponses;\n\t}", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "public static void main(String[] args) {\n\r\n\t\tint input;\r\n\t\tSystem.out.println(\"Welcome to hotel Booking\");\r\n\t\tSystem.out.println(\"please enter size of hotel\");\r\n\t\tScanner sObj = new Scanner(System.in);\r\n\t\tint size = sObj.nextInt();\r\n\t\tif(size> 1000 ||size<0) {\r\n\t\t\tSystem.out.println(\"please enter correct size of hotel\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetHotelSize(size);\r\n\t\t\tdo{\r\n\t\t\t\tSystem.out.println(\"please enter start and end day\");\r\n\t\t\t\tint start = sObj.nextInt();\r\n\t\t\t\tint end = sObj.nextInt();\r\n\r\n\t\t\t\tif(start<0 || start>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid Start Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(end<start || end>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid end Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint room_number = room_booking(start,end);\r\n\r\n\t\t\t\tif(room_number >0 && room_number <= size) {\r\n\t\t\t\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\t\t\t\tMap<Integer,List<Integer>> booking_details = new HashMap<Integer,List<Integer>>();\r\n\t\t\t\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\t\t\t\tbooking_days.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbooking_details.put(bookingId++,booking_days);\r\n\t\t\t\t\troom_bookings.put(room_number,booking_details);\r\n\t\t\t\t\tSystem.out.println(\"Accept\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Decline\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Press 1 to continue to check room availablity or 0 to exit\");\r\n\t\t\t\tinput = sObj.nextInt();\r\n\t\t\t}while(input==1); \r\n\t\t}\r\n\t}", "public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}", "private void loadAvailableRooms() {\n\n\t\texecutor.submit(() -> {\n\t\t\troomResultsTable.setVisible(false);\n\t\t\tprogress.setVisible(true);\n\t\t\troom.clear();\n\t\t\thotel.clear();\n\t\t\tquality.clear();\n\t\t\trooms = FXCollections.observableArrayList(dbParser.checkAvailableRoomsBetweenDates(arrivalDate.toEpochDay(),\n\t\t\t\t\tdepartureDate.toEpochDay(), hotelChoice.getName(), roomQualityChoice.getQuality()));\n\t\t\troomResultsTable.setItems(rooms);\n\t\t\tprogress.setVisible(false);\n\t\t\troomResultsTable.setVisible(true);\n\t\t});\n\n\t}", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void getHotelRoomData_DB() throws SQLException{\n \n myHotel = new Room[50]; // initialize size of array of hotel rooms\n roomCounter = 0;\n \n stmt = con.createStatement();\n\n rs = stmt.executeQuery(\"SELECT * FROM APP.HOTELROOMS\");\n \n while (rs.next()){\n int roomNum = rs.getInt(\"ROOMNUMBER\");\n String roomType = rs.getString(\"ROOMTYPE\");\n int bedsNum = rs.getInt(\"BEDS\");\n int roomPrice = rs.getInt(\"PRICE\");\n boolean roomAvailability = rs.getBoolean(\"ISAVAILABLE\");\n String currentGuest = rs.getString(\"OCCUPANT\");\n int currentGuestID = rs.getInt(\"GUESTID\");\n String roomStartDate = rs.getString(\"STARTDATE\");\n String roomEndDate = rs.getString(\"ENDDATE\");\n \n myHotel[roomCounter] = new Room();\n \n //this will set the values above to the array guest.\n myHotel[roomCounter].setHotelRoom(roomNum, roomType, bedsNum, \n roomPrice, roomAvailability, currentGuest, \n currentGuestID,roomStartDate,roomEndDate);\n \n roomCounter++;\n \n System.out.println(roomNum + \" \" + roomType + \" \" + bedsNum + \" \"\n + roomPrice + \" \" + roomAvailability + \" \" + currentGuest+ \" \" \n + currentGuestID + \" \" + roomStartDate + \" \" + roomEndDate );\n }\n stmt.close();\n }", "public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByIDReservation(long id);", "public void updateAvailability(String type) {\n\t\tString title = \"\";\n\t\tif (startDate != null & endDate != null) {\n\t\t\ttitle = \"Available Rooms \" + formatDate(startDate) + \" - \" + formatDate(endDate);\n\t\t}\n\t\tavailabilityDisplay.setText(guestModel.getRooms(type));\n\n\t\tavailabilityLabel.setText(title);\n\t\tadd(availabilityLabel);\n\t}", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "public List<Employee> findEmployeesForServiceByDate(LocalDate date) {\n DayOfWeek dayOfWeek = date.getDayOfWeek();\n\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employeeRepository.findAll();\n for (Employee employee: allEmployees) {\n // Check if employee is available on given days and posses certain skills\n if(employee.getDaysAvailable().contains(dayOfWeek)) {\n employeeAvailable.add(employee);\n }\n }\n\n return employeeAvailable;\n }", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private void getHotelRoomRateCall(long cityId) {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-DD\", Locale.ENGLISH);\n engCheckInDate = dateFormat.format(checkInDate);\n engCheckOutDate = dateFormat.format(checkOutDate);\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n HotelRoomRateRequest hotelRoomRateRequest = new HotelRoomRateRequest();\n hotelRoomRateRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelRoomRateRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelRoomRateRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelRoomRateRequest.setCityId(cityId);\n hotelRoomRateRequest.setHotelId(Long.parseLong(destination.getKey()));\n hotelRoomRateRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n\n if (kidsAgeArrayList == null)\n kidsAgeArrayList = new ArrayList<>();\n kidsAgeArrayList.clear();\n\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelRoomRateRequest.setOccupancy(occupancyDtoArrayList);\n }\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelListingRequest.setCityId(cityId);\n hotelListingRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n hotelListingRequest.setOccupancy(hotelRoomRateRequest.getOccupancy());\n\n String request = new Gson().toJson(hotelRoomRateRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n hotelSearchPresenter.getHotelRoomRate(Constant.API_URL + Constant.HOTELSRATES, request, getActivity());\n\n } else\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }", "public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n\n if (checkIn == null && checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkIn == null){\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, checkOut.toString());\n }\n else {\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, checkOut.toString());\n }\n\n try {\n\n System.out.printf(\" Reservations for %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\" \" + rs.getString(1) + \" \" + rs.getInt(2));\n System.out.println(\" Reservation DATES: \" + rs.getDate(3) + \" TO \" + rs.getDate(4));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );", "public void setAvailabilitiesFiltered(List<Availability> parsedAvailabilities){\n for(int i=0; i<flights.size(); i++){\n for(int j=0; j<parsedAvailabilities.size();j++) {\n if(flights.get(i).getFlightNumber().equals(parsedAvailabilities.get(j).getFlightNumber()) && flights.get(i).getDepartureDate().equals(parsedAvailabilities.get(j).getDepartureDate()) && flights.get(i).getAirlineCode().equals(parsedAvailabilities.get(j).getAirlineCode()) ){\n availabilities.add(parsedAvailabilities.get(j));\n }\n }\n }\n }", "public void ReuseMethodsforDPRcheckavailabitlity(String Enterrooms, String roomtype) throws IOException, InterruptedException, ParseException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSeleniumRepo.driver.navigate().refresh();\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "@SuppressWarnings(\"all\")\n @Override\n public List<RoomEntity> getFreeRooms(final OrderEntity order) {\n\n String hql =\"FROM RoomEntity R WHERE R.hotel=:hotel AND R.category=:category AND R.size=:sizze AND R NOT IN \" +\n \"(SELECT O.room FROM OrderEntity O WHERE O.hotel=:hotel AND NOT \" +\n \"((O.startDate<:startDate AND O.endDate<:startDate) OR (O.startDate>:endDate AND O.endDate>:endDate)))\";\n\n Query query=getSession().createQuery(hql);\n query.setParameter(\"startDate\", order.getStartDate());\n query.setParameter(\"endDate\", order.getEndDate());\n query.setParameter(\"sizze\", order.getPlaces());\n query.setParameter(\"category\", order.getRoomCategory());\n query.setParameter(\"hotel\", order.getHotel());\n List<RoomEntity> rooms=query.list();\n\n return rooms;\n }", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public PoliceObject[] getPolice(String type, String startDate, String endDate) {\n LinkedList<PoliceObject> list = new LinkedList<>();\n\n boolean hasType = (!type.equals(\"*\"));\n boolean hasStart = (!startDate.equals(\"*\"));\n boolean hasEnd = (!endDate.equals(\"*\"));\n boolean hasDate = (hasStart && hasEnd);\n\n if (hasType && hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n }\n });\n } else if (hasType) {\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n list.add(e);\n }\n });\n } else if (hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n });\n } else {\n list.addAll(this.policeDB.values());\n }\n\n PoliceObject[] array = new PoliceObject[list.size()];\n for (int i=0; i<list.size(); i++) {\n array[i] = list.get(i);\n }\n\n return array;\n }", "@Override\n\tpublic List<HotelroomPo> getHotelroomByHotelID(int hotelID) {\n\t\t\n\t\tList<HotelroomPo> rooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getHotelID()==hotelID)\n\t\t\t\trooms.add(hotelroomPo);\n\t\t}\n\t\treturn rooms;\n\t}", "@Override\n public List<LocalTime> getAvailableTimesForServiceAndDate(final com.wellybean.gersgarage.model.Service service, LocalDate date) {\n\n LocalTime garageOpening = LocalTime.of(9,0);\n LocalTime garageClosing = LocalTime.of(17, 0);\n\n // List of all slots set as available\n List<LocalTime> listAvailableTimes = new ArrayList<>();\n for(LocalTime slot = garageOpening; slot.isBefore(garageClosing); slot = slot.plusHours(1)) {\n listAvailableTimes.add(slot);\n }\n\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n\n // This removes slots that are occupied by bookings on the same day\n if(optionalBookingList.isPresent()) {\n List<Booking> bookingsList = optionalBookingList.get();\n for(Booking booking : bookingsList) {\n int bookingDurationInHours = booking.getService().getDurationInMinutes() / 60;\n // Loops through all slots used by the booking and removes them from list of available slots\n for(LocalTime bookingTime = booking.getTime();\n bookingTime.isBefore(booking.getTime().plusHours(bookingDurationInHours));\n bookingTime = bookingTime.plusHours(1)) {\n\n listAvailableTimes.remove(bookingTime);\n }\n }\n }\n\n int serviceDurationInHours = service.getDurationInMinutes() / 60;\n\n // To avoid concurrent modification of list\n List<LocalTime> listAvailableTimesCopy = new ArrayList<>(listAvailableTimes);\n\n // This removes slots that are available but that are not enough to finish the service. Example: 09:00 is\n // available but 10:00 is not. For a service that takes two hours, the 09:00 slot should be removed.\n for(LocalTime slot : listAvailableTimesCopy) {\n boolean isSlotAvailable = true;\n // Loops through the next slots within the duration of the service\n for(LocalTime nextSlot = slot.plusHours(1); nextSlot.isBefore(slot.plusHours(serviceDurationInHours)); nextSlot = nextSlot.plusHours(1)) {\n if(!listAvailableTimes.contains(nextSlot)) {\n isSlotAvailable = false;\n break;\n }\n }\n if(!isSlotAvailable) {\n listAvailableTimes.remove(slot);\n }\n }\n\n return listAvailableTimes;\n }", "@RequestMapping(value=\"/affordable/{price}\", method=RequestMethod.GET)\r\n @ApiMethod(description = \"Get all hotel bookings there is a price per night less than provided value\")\r\n public List<HotelBooking> getAffordable(@ApiPathParam(name=\"price\") @PathVariable double price) {\r\n return this.bookingRepository.findByPricePerNightLessThan(price);\r\n }", "public ArrayList getRooms();", "@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "public HotelDatabase() {\n\n this.HOTEL = new ArrayList<String>(Arrays.asList(\"HOTEL\", \"HOTEL_NAME\", \"BRANCH_ID\", \"PHONE\"));\n this.ROOM = new ArrayList<String>(Arrays.asList(\"ROOM\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"CAPACITY\"));\n this.CUSTOMER = new ArrayList<String>(Arrays.asList(\"CUSTOMER\", \"C_ID\", \"FIRST_NAME\", \"LAST_NAME\", \"AGE\", \"GENDER\"));\n this.RESERVATION = new ArrayList<String>(Arrays.asList(\"RESERVATION\", \"C_ID\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\"));\n this.HOTEL_ADDRESS = new ArrayList<String>(Arrays.asList(\"HOTEL_ADDRESS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"CITY\", \"STATE\", \"ZIP\"));\n this.HOTEL_ROOMS = new ArrayList<String>(Arrays.asList(\"HOTEL_ROOMS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"QUANTITY\"));\n this.BOOKING = new ArrayList<String>(Arrays.asList(\"BOOKING\", \"C_ID\", \"RES_NUM\", \"CHECK_IN\", \"CHECK_OUT\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\"));\n this.INFORMATION = new ArrayList<String>(Arrays.asList(\"INFORMATION\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"DATE_FROM\", \"DATE_TO\", \"NUM_AVAIL\", \"PRICE\"));\n this.NUMBERS = new ArrayList<String>(Arrays.asList(\"BRANCH_ID\", \"CAPACITY\", \"C_ID\", \"AGE\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\", \"ZIP\", \"QUANTITY\", \"NUM_AVAILABLE\", \"PRICE\"));\n this.DATES = new ArrayList<String>(Arrays.asList(\"CHECK_IN\", \"CHECK_OUT\", \"DATE_FROM\", \"DATE_TO\"));\n\n // INDEXING: 0 1 2 3 4 5 6 7\n this.ALL = new ArrayList<ArrayList<String>>(Arrays.asList(HOTEL, ROOM, CUSTOMER, RESERVATION, HOTEL_ADDRESS, HOTEL_ROOMS, BOOKING, INFORMATION));\n }", "@Override\n public RoomRatesEntity findOnlineRateForRoomType(Long roomTypeId, Date currentDate) throws NoAvailableOnlineRoomRateException {\n Query query = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId\");\n query.setParameter(\"roomTypeId\", roomTypeId);\n List<RoomRatesEntity> roomRates = query.getResultList();\n\n //Check what rate type are present\n boolean normal = false;\n boolean promo = false;\n boolean peak = false;\n\n for (RoomRatesEntity roomRate : roomRates) {\n// if (!checkValidityOfRoomRate(roomRate)) { //skips expired/not started rates, price is determined by check in and check out date, it becomes not considered in our final prediction\n// continue;\n// }\n// if null do smt else\n if (roomRate.getIsDisabled() == false) {\n if (null != roomRate.getRateType()) {\n System.out.println(roomRate.getRateType());\n switch (roomRate.getRateType()) {\n case NORMAL:\n normal = true;\n \n break;\n case PROMOTIONAL:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n promo = true;\n }\n break;\n\n case PEAK:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n peak = true;\n }\n break;\n default:\n break;\n }\n }\n\n System.out.println(normal + \" \" + promo + \" \" + peak);\n //5 rules here\n if (normal && promo && peak) {\n //find promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (promo && peak && !normal || normal && peak && !promo) {\n //apply peak, assume only 1\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.PEAK);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n } else if (normal && promo && !peak) {\n //apply promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (normal && !promo && !peak) {\n //apply normal\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.NORMAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n }\n }\n\n }\n throw new NoAvailableOnlineRoomRateException(\"There is no available room rate to be used!\");\n }", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public interface API {\n Room[] findRooms(int price, int persons, String city, String hotel);\n\n Room[] getAllRooms();\n\n}", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetails(TenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=?\",occupiedBy);\n\t\treturn rooms;\n\t}", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public boolean book(Traveler traveler, int numRooms) {\n if (hotels == null) return false;\n\n boolean booked = false;\n for (Hotel hotel : hotels) {\n if (hotel.isAvailable(numRooms))\n booked = hotel.bookRooms(traveler, numRooms);\n if (booked) break;\n }\n\n return booked;\n }", "public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }", "public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }", "public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<Room> findRooms(int offset, int limit, String orderBy) throws AppException {\n log.info(\"#findRooms offset = \" + offset + \" limit = \" + limit + \" orderBy = \" + orderBy);\n Connection con = null;\n PreparedStatement ps;\n ResultSet rs;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n ps = con.prepareStatement(SELECT_ROOMS);\n log.info(\"orderBy = \" + orderBy);\n switch (orderBy) {\n case(\"price\"):\n ps = con.prepareStatement(SELECT_ROOMS_PRICE);\n break;\n case(\"size\"):\n ps = con.prepareStatement(SELECT_ROOMS_SIZE);\n break;\n case(\"class\"):\n ps = con.prepareStatement(SELECT_ROOMS_CLASS);\n break;\n case(\"status\"):\n ps = con.prepareStatement(SELECT_ROOMS_STATUS);\n }\n int k = 1;\n ps.setInt(k++, limit);\n ps.setInt(k, offset);\n log.info(\"ps = \" + ps);\n rs = ps.executeQuery();\n rooms = new ArrayList<>();\n while (rs.next()) {\n rooms.add(extractRoom(con, rs));\n }\n con.commit();\n log.info(\"rooms = \" + rooms);\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public List<Equipment> findByPriceRange(int from, int to){\n List<Equipment> foundEquipment = new ArrayList<>();\n for(Equipment e: equipment){\n if (e.getPrice() <= to && e.getPrice() >= from){\n foundEquipment.add(e);\n }\n }\n return foundEquipment;\n }", "public List<Room> getByType(int idRoomType) {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room_type=\" + idRoomType);\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "List<ExamRoom> selectAll();", "@Test\n\tpublic void testListReservationsOfFacilityInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID,\n\t\t\t\tArrays.asList(room1.getId(), infoBuilding.getId()), reservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(2, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t\tassertTrue(reservationsOfFacility.contains(reservation2));\n\t}", "public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}", "public List<Room> occupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = numOfRooms; i < internalList.size(); i++) {\n if (internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n\n return rooms;\n }", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "@Override\n\tpublic List<Hotel> listar() {\n\t\treturn null;\n\t}", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "ArrayList<Restaurant> getRestaurantListByType(String type);" ]
[ "0.6535867", "0.646599", "0.63867235", "0.6382628", "0.6277739", "0.6095925", "0.6057213", "0.60064304", "0.5992724", "0.5984084", "0.5971679", "0.5965966", "0.5951821", "0.58849555", "0.5875996", "0.58368737", "0.5817798", "0.5791396", "0.5790769", "0.5781905", "0.57799906", "0.5763756", "0.575023", "0.5731744", "0.57317406", "0.57301736", "0.570038", "0.5670513", "0.56681", "0.56370187", "0.5623919", "0.5585708", "0.55722547", "0.55271906", "0.5523738", "0.5514556", "0.54868525", "0.5484493", "0.54776263", "0.5457658", "0.54366547", "0.54222286", "0.5415015", "0.5408116", "0.5394369", "0.5387404", "0.53856325", "0.5377123", "0.5373918", "0.5339455", "0.53311074", "0.53248245", "0.5312489", "0.5305739", "0.5287535", "0.52669245", "0.5255009", "0.5239233", "0.52367216", "0.52267104", "0.5210941", "0.52099514", "0.5202592", "0.5192909", "0.51843286", "0.51763153", "0.5148242", "0.5146172", "0.5140406", "0.5124647", "0.5110474", "0.5092458", "0.5090945", "0.5080262", "0.5073767", "0.5069692", "0.5069402", "0.50612825", "0.50566983", "0.50525886", "0.50449336", "0.50416243", "0.50352806", "0.5024448", "0.5023408", "0.5019004", "0.50121284", "0.50094163", "0.5004459", "0.49984667", "0.49916297", "0.49849698", "0.49843824", "0.4969022", "0.49660063", "0.49646497", "0.49582884", "0.49582204", "0.4954407", "0.49540156" ]
0.59602004
12
Finds all hotels within a given city:
public void searchAreaCity(Connection connection, String city) throws SQLException { ResultSet rs = null; String sql = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setCity(city); pStmt.setString(1, getCity()); try { System.out.printf(" Hotels in %s:\n", getCity()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { e.printStackTrace(); } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Hotel> getHotelsInCity(String cityName, Session session) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tList<Hotel> hotelList = new ArrayList<Hotel>();\n\t\tCriteria cr = session.createCriteria(Hotel.class).add(Restrictions.eq(\"city\", cityName));\n\t\thotelList = cr.list();\n\t\treturn hotelList;\n\t}", "List<City> findCities();", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public void searchAreaFull(Connection connection, String city, String state, int zip) throws SQLException{\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ? AND state = ? AND zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n setZip(zip);\n pStmt.setInt(3, getZip());\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public List<Customer> getAllByCity(String city) {\n\t\treturn custRepo.findByHomeAddressCity(city);\n\t}", "@GetMapping(\"/getTheaters/{city}\")\r\n\tResponseEntity<List<Theater>> findTheaters(@PathVariable(\"city\") String city){\r\n\t\tList<Theater> selectedTheaters = new ArrayList<Theater>();\r\n\t\tList<Theater> theaterList = getTheaters();\r\n\t\tfor (Theater theater : theaterList) {\r\n\t\t\tif(theater.getTheaterCity().equals(city)) {\r\n\t\t\t\tselectedTheaters.add(theater);\r\n\t\t\t}\r\n\t\t}\r\n\t\tResponseEntity<List<Theater>> response = new ResponseEntity<List<Theater>>(selectedTheaters,HttpStatus.OK);\r\n\t\treturn response;\r\n\t}", "List<City> getCityList(Integer countryId)throws EOTException;", "@Override\n\tpublic List<Hotel> getLowPricedHotels(String cityName, Session session) {\n\t\t// TODO Auto-generated method stub\n\t\tList<Hotel> hotelList = new ArrayList<Hotel>();\n\t\tCriteria cr = session.createCriteria(Hotel.class).add(Restrictions.eq(\"city\", cityName)).addOrder(Order.asc(\"tariff\")).setMaxResults(5);\n\t\thotelList = cr.list();\n\t\treturn hotelList;\n\t}", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List FindAddressByCity(String city){\n\t\t\n\t\tAddress addr = new Address();\n\t\taddr.setCity(city);\n\t\tList results = session.createCriteria(Address.class)\n\t\t.add( Example.create(addr) )\n\t\t.list();\n\t\treturn results;\n\t}", "public List<Address> listAddressByCity(String city)\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address where address.city = :city order by address.id asc\").setParameter(\"city\", city).list();\n\n return result;\n }", "@SuppressWarnings(\"unchecked\") \n public List<ZipLocation> getZipCodeLocations(String city, int start, int chunkSize){\n EntityManager em = emf.createEntityManager();\n String pattern = \"'\"+city.toUpperCase()+\"%'\";\n Query query = em.createQuery(\"SELECT z FROM ZipLocation z where UPPER(z.city) LIKE \"+pattern);\n List<ZipLocation> zipCodeLocations = query.setFirstResult(start).setMaxResults(chunkSize).getResultList();\n em.close();\n return zipCodeLocations;\n }", "public List<City> getAll() throws Exception;", "public List<City> getCities(){\n waitFor(visibilityOfAllElements(cities));\n return cities.stream().map(City::new).collect(toList());\n }", "public List<Driver> findDriverByCity(String city);", "public List<City> getCityList(State state);", "public List<WeatherCitySummary> findAllCity(){\n return weatherCityRepository.findAllCity();\n }", "private void searchCity() {\n toggleProgress();\n try {\n WeatherClient client = builder.attach(this)\n .provider(new OpenweathermapProviderType())\n .httpClient(WeatherClientDefault.class)\n .config(config)\n .build();\n\n // Try to find a good location\n // using medium settings\n Criteria criteria = new Criteria();\n criteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n criteria.setAccuracy(Criteria.ACCURACY_MEDIUM);\n // Can we use data?\n criteria.setCostAllowed(true);\n\n // Search city by gps/network using\n // above critera\n client.searchCityByLocation(\n criteria,\n new WeatherClient.CityEventListener() {\n\n // When we get the city list\n @Override\n public void onCityListRetrieved(List<City> cityList) {\n for (int i = 0; i < cityList.size(); i++) {\n adapter.set(cityList.get(i), i);\n }\n displayMessage(\"Not the correct results?\" +\n \" Press the button above to try again.\");\n }\n\n\n @Override\n public void onWeatherError(WeatherLibException wle) {\n displayMessage(\"There seems to be no \" +\n \"weather data, please try again later.\");\n\n }\n\n\n @Override\n public void onConnectionError(Throwable t) {\n displayMessage(\"Whoops! We can't seem to \" +\n \"connect to the weather servers.\");\n }\n\n });\n\n } catch (WeatherProviderInstantiationException e) {\n displayMessage(\"Error: Unable to access \" +\n \"the weather provider.\");\n } catch (LocationProviderNotFoundException e) {\n displayMessage(\"Whoops! Unable to access \" +\n \"location provider.\");\n } catch (NullPointerException e) {\n displayMessage(\"Whoops! We can't seem to\" +\n \"connect to the weather servers.\");\n }\n\n }", "public Collection<City> getAutocompleteCities(String search) {\n return repo.getAutocompleteCities(search);\n }", "public ArrayList<Flight> getCity(String city) {\n return connects.get(city);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Customer> getCustomerByCity(String city) {\n\t\treturn sessionFactory.getCurrentSession().createCriteria(Customer.class).add(Restrictions.eq(\"city\",city)).list();\r\n\t}", "@Override\r\n\tpublic List<Place> searchPlaces(String placeName, String city) {\n\t\tGoogleMapsSearchPlaceAPI googleMapsSearchPlaceAPI = new GoogleMapsSearchPlaceAPI();\r\n\t\tList<Place> places = googleMapsSearchPlaceAPI.search(placeName, city);\r\n\r\n\t\tfor (Place place : places) {\r\n\t\t\tsavePlace(place);\r\n\t\t}\r\n\r\n\t\treturn places;\r\n\t}", "private static String[] getHotelAdress(String city, String state,\n\t\tString country) throws SAXException, IOException,\n\t\tParserConfigurationException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(hotelServiceURL + \"&city=\" + city\n\t\t\t+ \"&stateProvinceCode=\" + state + \"&countryCode=\" + country\n\t\t\t+ \"&apiKey=utf2pd8jsm9mr6mmfxyjqeq9\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList list = doc.getElementsByTagName(\"HotelSummary\");\n\n\t\tNode hotel = list.item(0);\n\n\t\tNodeList hotelInfo = hotel.getChildNodes();\n\n\t\tString[] out = { hotelInfo.item(2).getTextContent(),\n\t\t\thotelInfo.item(3).getTextContent(),\n\t\t\thotelInfo.item(4).getTextContent() };\n\n\t\treturn out;\n\t}", "List<AirportDTO> getAirportsByCity(String city);", "public void searchArea(Connection connection, String city, String state, int zip) throws SQLException {\n\n ResultSet rs = null;\n PreparedStatement pStmt = null;\n String sql1 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?\";\n String sql2 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n String sql3 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n\n // City and State combination:\n if (city != null && state != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql2);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n }\n\n // City and ZIP combination:\n else if (city != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n // State and ZIP combination:\n else {\n\n pStmt = connection.prepareStatement(sql2 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n String result;\n\n while (rs.next()) {\n\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "@Override\n\tpublic List<VenueCity> listVenueCity() {\n\t\treturn eventDao.listVenueCity();\n\t}", "@Override\r\n\tpublic List <City> getAllCities() {\r\n\t\tSystem.out.println(\"Looking for all cities...\");\r\n\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\ttry {\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM city\");\r\n\t\t\tList<City> cityList = new ArrayList<City>();\r\n\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\tCity ci = new City();\r\n\t\t\t\tci.setCityId(rs.getInt(\"cityid\"));\r\n\t\t\t\tci.setName(rs.getString(\"name\"));\r\n\t\t\t\tci.setCapital(rs.getBoolean(\"iscapital\"));\r\n\t\t\t\tcityList.add(ci);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t\treturn cityList;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public List<ATM> listATMsByCity(String city) throws JsonParseException,\n JsonMappingException, IOException {\n RestTemplate restTemplate = new RestTemplate();\n\n String response = restTemplate.getForObject(URL, String.class);\n String toBeParsed = response.substring(6, response.length());\n\n ObjectMapper objectMapper = new ObjectMapper();\n ATM[] atms = objectMapper.readValue(toBeParsed, ATM[].class);\n\n List<ATM> atmsList = Arrays.asList(atms);\n List<ATM> atmsByCityList = new LinkedList<ATM>();\n\n for (ATM atm : atmsList) {\n String theType = atm.getType(), theCity = atm.getAddress()\n .getCity();\n if (theType.equals(\"ING\") && theCity.equalsIgnoreCase(city)) {\n atmsByCityList.add(atm);\n }\n }\n\n return atmsByCityList;\n }", "public ArrayList<City> getACityPopulation(String city)\n {\n try\n {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT DISTINCT(city.Name), city.Population \"\n + \"FROM city \"\n + \"WHERE city.Name = \" + \"'\" + city +\"'\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Check one is returned\n ArrayList<City> nCity = new ArrayList<City>();\n System.out.println(\"31. Population of a city.\");\n System.out.println(\"City | Population \");\n while (rset.next())\n {\n // Create new City (to store in database)\n City cCty = new City();\n cCty.Name = rset.getString(\"Name\");\n cCty.Population = rset.getInt(\"Population\");\n\n System.out.println(cCty.Name + \" | \" + cCty.Population);\n nCity.add(cCty);\n }\n System.out.println(\"\\n\");\n return nCity;\n }\n catch (Exception e)\n {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"30. Failed to get district population\");\n return null;\n }\n }", "public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\n\t}", "public void viewByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.nextLine();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(i));\n }", "public static ArrayList<Node> findBuildings(Node cityModel) {\n\t\tArrayList<Node> buildings = new ArrayList<Node>();\n\n\t\tfor (Node cityObjectMember : findChildrenOfNode(cityModel, Label.label(CityGMLClass.CITY_OBJECT_MEMBER + \"\"))) {\n\t\t\t// each city object member can have max 1 building\n\t\t\tArrayList<Node> nodes = findChildrenOfNode(cityObjectMember, Label.label(CityGMLClass.BUILDING + \"\"));\n\t\t\tif (nodes.size() > 0) {\n\t\t\t\tbuildings.add(nodes.get(0));\n\t\t\t}\n\t\t}\n\n\t\treturn buildings;\n\t}", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "@Override\n\tpublic ArrayList<CityPO> getAll() throws RemoteException {\n\t\t\n\t\t\n\t\treturn cities;\n\t}", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public ArrayList<CoronaCase> Analytics(String city)\n\t{\n\t\tArrayList<CoronaCase> temp = new ArrayList<CoronaCase>();\n\t\t\n\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\tif(coronaCase.get(i).getCity().toLowerCase().contains(city.toLowerCase()))\n\t\t\t\ttemp.add(coronaCase.get(i));\t\n\t\t\n\t\treturn temp;\n\t}", "LinkedHashMap<Long, City> getAllCitiesMap();", "public void searchByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.next();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(\"Result: \"+i.getFirstName()));\n }", "@Override\n\tpublic ArrayList getAllCities() {\n\t\tConnection conn = MySQLDAOFactory.getConnection(); \n\t\t//ResultSet rs = MySQLDAOFactory.executeStatement(conn, \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\");\n\t Statement stmt = null; \n\t ResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = (Statement)conn.createStatement();\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\t String sql;\n\t sql = \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\";\n\t\ttry {\n\t\t\trs = stmt.executeQuery(sql);\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\n\t\tArrayList<Cities> p = new ArrayList<Cities>();\n\t try {\n\t\t\twhile(rs.next()){\n\t\t\t //Retrieve by column name\n\t\t\t int id = rs.getInt(\"id\");\t \n\t\t\t String name = rs.getString(\"name\");\n\t\t\t String district = rs.getString(\"district\");\n\t\t\t long population = rs.getLong(\"population\");\n\t\t\t Cities tmp = new Cities(); \n\t\t\t tmp.setId(id);\n\t\t\t tmp.setName(name);\n\t\t\t tmp.setDistrict(district);\n\t\t\t tmp.setPopulation(population);\n\t\t\t p.add(tmp); \n\t\t\t }\n\t\t\t//rs.close(); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\t//MySQLDAOFactory.closeConnection();\n\t return p; \n\t}", "public List<InputData> getCityData(String city) {\n String SQL = \"SELECT * FROM world_bank WHERE city = ?\";\n List<InputData> records = jdbcTemplate.query(SQL,\n new Object[] { city }, new DataMapper());\n return records;\n }", "public boolean containsCity(City city){\n return tour.contains(city);\n }", "@ApiMethod(name = \"getCities\", path = \"city\", httpMethod = ApiMethod.HttpMethod.GET)\n public List<City> getCities(@Nullable @Named(\"search\") String search) {\n\n if (search == null || search.isEmpty()) {\n return mCityService.list();\n } else {\n return mCityService.list(search);\n }\n }", "@Override\n public Stream<City> getAll() {\n return idToCity.values().stream();\n }", "public Vector<City> getCities(){\r\n\t\tif (map.getVerteices()==null){\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\t\treturn map.getVerteices();\r\n\t}", "private void loadSupermarketLocations(String city) {\n // Request the supermarkets that are available as nodes\n StringBuilder requestUrl = new StringBuilder(\"https://overpass-api.de/api/interpreter?data=\");\n requestUrl.append(\"node%5B%22addr%3Acity%22%3D%22\");\n requestUrl.append(city);\n requestUrl.append(\"%22%5D%5B%22shop%22%3D%22supermarket%22%5D%3Bout%3B\");\n\n StringRequest stringRequest = new StringRequest(Request.Method.GET, requestUrl.toString(),\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n parseSupermarketNodes(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"api req\", error.toString());\n }\n });\n\n queue.add(stringRequest);\n }", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByCityAndCountry(String country, String city) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", country, city);\r\n\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL).expand(city, country, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "public City getMostVisitedPhotosOfCity(String city){\n this.city = flickrDao.getCity(city);\n\n //Get the photos of city from Flickr\n photosList = flickrDao.getCityPhotos(this.city.getPlace_id());\n\n //get the top five photos of photoslist and set them to the city\n this.city.setTopFivePhotos(ClusterService.getTopFivePhotos(photosList));\n\n return this.city;\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "@Override\n public List<String> getCities() {\n\n List<Rout> routs = routDAO.getAll();\n HashSet<String> citiesSet = new HashSet<>();\n for (Rout r : routs) {\n citiesSet.add(r.getCity1());\n }\n List<String> cities = new ArrayList<>(citiesSet);\n\n return cities;\n }", "private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }", "public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}", "public void printAllCities()\n { // to be implemented in part (d) }\n }", "public Vector<Site> getCities(){\n return cities;\n }", "public void getWeather(String city, String units);", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "public static String getHotel(String city, String state, String country)\n\t\tthrows IOException, ParserConfigurationException, SAXException {\n\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(hotelServiceURL + \"&city=\" + city\n\t\t\t+ \"&stateProvinceCode=\" + state + \"&countryCode=\" + country\n\t\t\t+ \"&apiKey=utf2pd8jsm9mr6mmfxyjqeq9\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList list = doc.getElementsByTagName(\"HotelSummary\");\n\n\t\tNode hotel = list.item(0);\n\n\t\tNodeList hotelInfo = hotel.getChildNodes();\n\n\t\tString hotelName = hotelInfo.item(1).getTextContent();\n\t\tString hotelAd = hotelInfo.item(2).getTextContent() + \",\"\n\t\t\t+ hotelInfo.item(3).getTextContent() + \",\"\n\t\t\t+ hotelInfo.item(4).getTextContent();\n\n\t\treturn \"We found the following hotel: \" + hotelName + \"\\n\"\n\t\t\t+ \"At this address: \" + hotelAd;\n\t}", "private void addCities() {\n int random2 = 0;\n for (int i = 1; i < MAP_LENGTH-1; i++) {\n for (int j = 1; j < MAP_LENGTH-1; j++) {\n if (tileMap[i][j].getTerrain() instanceof Grass) { //Make cities on grass tiles only\n random2 = (int)(Math.round(Math.random()*18));\n if (!adjacentCity(i, j) && (random2 < 3)) {\n tileMap[i][j].setCity(new City(i, j, false)); //If randomly chosen and not in proximity of another city, create a city there (right now set as not a capital)\n }\n }\n }\n }\n }", "public HashMap<String, Long> getNumByTag(final String city, final String tag) {\n\t\tHashMap<String, Long> result = new HashMap<String, Long>();\n\t\tJavaRDD<Document> temp1 = dal.getRDD().filter(new Function<Document, Boolean>() {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic Boolean call(Document v1) throws Exception {\n\t\t\t\tString c = v1.getString(\"city\");\n\t\t\t\tif (!v1.containsKey(\"city\") || c == null) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tif (c.contains(city)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tresult.put(\"all\", temp1.count());\n\t\tJavaRDD<Document> temp2 = temp1.filter(new Function<Document, Boolean>() {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic Boolean call(Document v1) throws Exception {\n\t\t\t\tif (v1.getString(\"tag\").contains(tag)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tresult.put(\"count\", temp2.count());\n\t\t// dal.destroy();\n\t\treturn result;\n\t}", "private static CIty chaxunjibandi(String jibandi, ArrayList<CIty> citys) {\n\t\tIterator it=citys.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tCIty c=(CIty)it.next();\r\n\t\t\tif(c.place.equals(jibandi))\r\n\t\t\t\treturn c;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Set<IDiogenAgent> getNeighborhood(IDiogenAgent agent) {\n Set<IDiogenAgent> neighborhood = new HashSet<IDiogenAgent>();\n // for now, only host agent can see the contained agents.\n if (agent == this.hostAgent) {\n neighborhood.addAll(this.getContainedAgents());\n } else if (agent instanceof ICartacomAgent) {\n ICartacomAgent cAgent = (ICartacomAgent) agent;\n for (IAgent target : cAgent.getAgentsSharingRelation()) {\n if (((IDiogenAgent) target).getContainingEnvironments()\n .contains(this)) {\n neighborhood.add((IDiogenAgent) target);\n }\n }\n }\n if (agent instanceof GeographicPointAgent) {\n for (ISubmicroAgent target : ((GeographicPointAgent) agent)\n .getSubmicroAgents()) {\n if (target.getContainingEnvironments().contains(this)) {\n neighborhood.add(target);\n }\n }\n }\n\n return neighborhood;\n\n }", "public void showCities()\n {\n \tSystem.out.println(\"CITY LIST\");\n \t\n \tfor (int i = 0; i < cityNumber; i++)\n \t{\n \t\tSystem.out.println(city[i]);\n \t}\n }", "public void loadHotels();", "List<MasterZipcode> getByCity(int cityId);", "public ArrayList<City> getPopCityReg() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT country.Region, city.Name, city.Population, city.District, city.CountryCode\"\n +\" FROM city\"\n +\" INNER JOIN country ON city.CountryCode = country.Code\"\n +\" ORDER BY country.Region, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new city if valid.\n // Check one is returned\n ArrayList<City> PopCityReg = new ArrayList<>();\n System.out.println(\"9. All the cities in a REGION organised by largest population to smallest.\");\n System.out.println(\"Region | Name | Country | District | Population\");\n while (rset.next()) {\n // Create new Country/City (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"Name\");\n cty.Population = rset.getInt(\"Population\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n cty.District = rset.getString(\"District\");\n\n Country cnt = new Country();\n cnt.Region = rset.getString(\"Region\");\n System.out.println(cnt.Region + \" | \" + cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n PopCityReg.add(cty);\n }\n return PopCityReg;\n } catch (Exception e) {\n // City not found.\n System.out.println(e.getMessage());\n System.out.println(\"Failed to get city details\");\n return null;\n }\n }", "public ArrayList<Hotel> getUserHotels(Integer userId, Integer customerId);", "public ArrayList<City> getAllCapitalContinent()\n {\n try\n {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n // ALl the capital cities in the WORLD organised by largest population to smallest\n String strSelect =\n \"SELECT city.Name, country.Name AS 'CountryName', city.Population, country.Continent \"\n + \"FROM country JOIN city \"\n + \"ON country.Code = city.CountryCode \"\n + \"WHERE country.Capital = city.ID \"\n + \" ORDER BY country.Continent, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new capital city if valid.\n // Check one is returned\n ArrayList<City> capCity = new ArrayList<City>();\n System.out.println(\"18. All the capital cities in a CONTINENT organised by largest population to smallest.\");\n System.out.println(\"Continent | Name | Country | Population\");\n while (rset.next())\n {\n // Create new City (to store in database)\n City cCty = new City();\n cCty.Name = rset.getString(\"Name\");\n cCty.Population = rset.getInt(\"Population\");\n Country cCountry = new Country();\n cCountry.Name = rset.getString(\"CountryName\");\n cCountry.Continent = rset.getString(\"Continent\");\n System.out.println(cCountry.Continent + \" | \" + cCty.Name + \" | \" + cCountry.Name +\" | \" + cCty.Population );\n capCity.add(cCty);\n }\n System.out.println(\"\\n\");\n return capCity;\n }\n catch (Exception e)\n {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"18. Failed to get capital city details by continent\");\n return null;\n }\n }", "boolean hasHasCity();", "public CustomerAddressQuery city() {\n startField(\"city\");\n\n return this;\n }", "public Vector<City> getWays(City c) {\r\n\t\ttry {\r\n\t\t\treturn map.getEdges(c);\r\n\t\t} catch (VertexNotExistException e) {\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\r\n\r\n\t}", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "@Override\r\n\tpublic List<City> getCityById(int pid) {\n\t\treturn cd.getCityById(pid);\r\n\t}", "@Override\n public List<Map<String, Object>> getCityList(Map<String, Object> params)\n {\n return advertisementMapper.getCityList(params);\n }", "public int askWhatCityBonus(List<City> cities);", "public ArrayList<City> getPopCityCount() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT country.Name, (city.Name) AS cName, city.Population, city.District, city.CountryCode\"\n +\" FROM city\"\n +\" INNER JOIN country ON city.CountryCode = country.Code\"\n +\" ORDER BY country.Name, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new city if valid.\n // Check one is returned\n ArrayList<City> PopCityCount = new ArrayList<>();\n System.out.println(\"10. All the cities in a COUNTRY organised by largest population to smallest.\");\n System.out.println(\"Name | Country | District | Population\");\n while (rset.next()) {\n // Create new Country/City (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"cName\");\n cty.Population = rset.getInt(\"Population\");\n cty.District = rset.getString(\"District\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n\n Country cnt = new Country();\n cnt.Name = rset.getString(\"Name\");\n System.out.println(cnt.Name + \" | \" + cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n PopCityCount.add(cty);\n }\n return PopCityCount;\n } catch (Exception e) {\n // City not found.\n System.out.println(e.getMessage());\n System.out.println(\"Failed to get city details\");\n return null;\n }\n }", "public ArrayList<AdminInfo> getAdminByCity(String country, String state, String city) {\n\t\treturn getAdmin(country, state, city);\n\t}", "private static void chaxun(ArrayList<CIty> citys) {\n\t\t\r\n\t\tScanner scanner=new Scanner(System.in);\r\n\t\twhile(true){\r\n\t\tSystem.out.println(\"您是要查询年份1,举办地2,还是冠军国3,退出请输入0:\");\r\n\t\t\r\n\t\t\t\tString i2=scanner.next();\r\n\t\t\t\tint i=Integer.parseInt(i2);\r\n\t\tswitch (i) {\r\n\t\tcase 1:\r\n\t\t\ti=scanner.nextInt();\r\n\t\t\tSystem.out.println(chaxunniangen(i,citys));\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tString jibandi=scanner.next();\r\n\t\t\tSystem.out.println(chaxunjibandi(jibandi,citys));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tString guanjunguo=scanner.next();\r\n\t\t\tSystem.out.println(chaxunguanjunguo(guanjunguo,citys));\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"tuichu!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t}", "public List<PersonDto> findByCity(String city) {\n List<Person> models = Collections.emptyList();\n return models.stream()\n .map(personMapper::toDto)\n .collect(Collectors.toList());\n }", "public void searchAreaState(Connection connection, String state) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n\n try {\n\n System.out.printf(\" Hotels in %s:\\n\", getState());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "@Override\r\n\tpublic List<String> getCities() {\n \tList<Note> notes = this.noteRepository.findAll();\r\n \tfor (Note note : notes) {\r\n\t\t\tSystem.out.println(note.getTitle());\r\n\t\t}\r\n\t\treturn hotelBookingDao.getCities();\r\n\t}", "public List<String> getCity(String state) {\n\t\tSet set=new HashSet();\n\t\tList ls=new LinkedList();\n\t\tStatement statement=null;\n\t\tResultSet rs=null;\n\t\tString engineName=\"\";\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(\"select VALUE from config_master where NAME='EXE_CITY' and LINK1='\"+state+\"'\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\tls.add(rs.getString(\"VALUE\"));\n\t\t\t}\n\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ls;\n\t}", "@Override\r\n\tpublic List<City> getAllCitiesInState(String stateName, String countryName) {\n\t\tSystem.out.println(\"getAllCitiesInCountry,stateName,countryName\");\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\tList<City> clist=new ArrayList<City>();\r\n\t\t\r\n\t\tList<State> list=new ArrayList<State>();\r\n\t\t\r\n\t\t//List<City> clist = this.sessionFactory.getCurrentSession().createCriteria(Country.class)\r\n\t // .add(Restrictions.eq(\"name\",countryName)).list().get(0);\r\n\t\t//null pointer exception\r\n\t\tQuery query = session.createQuery(\"from City c where c.country.name=:countryName and c.district= :stateName\");\r\n\t\t\r\n\t\t//select * from city c, state p, country q where p.StateName='Andhra Pradesh' and q.name='india';\r\n\t\t\r\n\t\t//Query query = session.createQuery(\"from State p, Country q where q.name=:countryName and c.district= :p.stateName and p!=null and c.district!=null\");\r\n\t\t\r\n\t\tquery.setParameter(\"stateName\", stateName);\r\n\t\tquery.setParameter(\"countryName\", countryName);\r\n\t\tclist=query.list();\r\n\t\t\r\n\t\tsession.getTransaction().commit();\r\n\t\t//session.flush();\r\n\t\t//session.close();\r\n\t\treturn clist;\r\n\t}", "public ArrayList<City> getCityPopCon() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT country.Continent, city.Name, city.Population, city.District, city.CountryCode\"\n +\" FROM city\"\n +\" INNER JOIN country ON city.CountryCode = country.Code\"\n +\" ORDER BY country.Continent, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new city if valid.\n // Check one is returned\n ArrayList<City> CityPopCon = new ArrayList<>();\n System.out.println(\"8. All the cities in a CONTINENT organised by largest population to smallest.\");\n System.out.println(\"Continent | Name | Country | District | Population\");\n while (rset.next()) {\n // Create new Country/City (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"Name\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n cty.District = rset.getString(\"District\");\n cty.Population = rset.getInt(\"Population\");\n\n Country cnt = new Country();\n cnt.Continent = rset.getString(\"Continent\");\n System.out.println(cnt.Continent + \" | \" + cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n CityPopCon.add(cty);\n }\n return CityPopCon;\n } catch (Exception e) {\n // City not found.\n System.out.println(e.getMessage());\n System.out.println(\"Failed to get city details\");\n return null;\n }\n }", "@GetMapping(value = \"/repo_city\")\r\n public List<User> repoCity(@RequestParam(name=\"city\") List<String> listCity) {\r\n return userRepository.findByCityIn(listCity);\r\n }", "public ArrayList<String> showCity();", "public ArrayList<City> getPopCity() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT city.Name, city.Population, city.CountryCode, city.District\"\n +\" FROM city\"\n +\" ORDER BY city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Check one is returned\n ArrayList<City> CtyPop = new ArrayList<>();\n System.out.println(\"7. All the cities in the WORLD organised by largest population to smallest.\");\n System.out.println(\"Name | Country | District | Population\");\n while (rset.next()) {\n // Create new city (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"Name\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n cty.District = rset.getString(\"District\");\n cty.Population = rset.getInt(\"Population\");\n\n System.out.println(cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n CtyPop.add(cty);\n }\n return CtyPop;\n } catch (Exception e) {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"7. Failed to get city details\");\n return null;\n }\n }", "public void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);", "public Cursor fetchAllHotels() {\r\n\r\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE,\r\n KEY_NAME, KEY_DESC, KEY_ADDR, KEY_MINS, KEY_RATE, KEY_PHONE, KEY_WEB }, null, null, null, null, null, null);\r\n }", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "GeneralWeatherReport queryWeatherReport(String cityId);", "protected ArrayList<AdminInfo> getAdmin(String country, String state, String city) {\n\t\tArrayList<AdminInfo> result = new ArrayList<AdminInfo>();\n\t\ttry {\n\t\t\t// Get statement\n\t\t\tStatement stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n\t\t\ttry {\n\t\t\t\t// Get result set\n\t\t\t\tString strSQL = sqlSelect(country, state, city);\n\t\t\t\tSystem.out.printf(\"[DEBUG] SQL='%s'\\n\", strSQL);\n\t\t\t\tResultSet rs = stmt.executeQuery(strSQL);\n\t\t\t\ttry {\n\t\t\t\t\t// Iterate all records\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tresult.add(new AdminInfo(rs.getString(FIELD_INDEX_COUNTRY),\n\t\t\t\t\t\t\t\t\t\t\t\t rs.getString(FIELD_INDEX_STATE),\n\t\t\t\t\t\t\t\t\t\t\t\t rs.getString(FIELD_INDEX_CITY)));\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n\tpublic List<Player> getPlayersByCity(String city) throws BusinessException {\n\t\treturn null;\n\t}", "@Dimensional(designDocument = \"userGeo\", spatialViewName = \"byLocation\")\n List<User> findByLocationWithin(Box cityBoundingBox);", "@GET(\"/cities/{cityId}/tours\")\n Call<List<Tour>> getTours(\n @Path(\"cityId\") int cityId\n );", "private static String getKitchenIDListFromLocation(String city,String location, Integer cuisineId){\n\t\tString kitchenIds = \"\";\n\t\tArrayList<Integer> kitchenIdList = new ArrayList<Integer>();\n\t\ttry {\n\t\t\tSQLKITCHENLIST:{\n\t\t\tConnection connection = null;\n\t\t\tPreparedStatement preparedStatement = null;\n\t\t\tResultSet resultSet = null;\n\t\t\tconnection = DBConnection.createConnection();\n\t\t\tString sql = \"select distinct fkd.kitchen_id \"\n\t\t\t\t\t+\" from fapp_kitchen_details fkd \"\n\t\t\t\t\t+\" join sa_area sa \"\n\t\t\t\t\t+\" on fkd.area_id = sa.area_id \" \n\t\t\t\t\t+\" join fapp_kitchen fk \"\n\t\t\t\t\t+\" on fk.kitchen_id = fkd.kitchen_id \"\n\t\t\t\t\t+\" where sa.area_id = \"\n\t\t\t\t\t+\" (select area_id from sa_area where area_name ILIKE ? and city_id = \"\n\t\t\t\t\t+\" (select city_id from sa_city where city_name ILIKE ?))\"\n\t\t\t\t\t+\" and fkd.cuisin_id = ? \"\n\t\t\t\t\t+\" and fk.is_active = 'Y'\";\n\t\t\ttry {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\tpreparedStatement.setString(1, location);\n\t\t\t\tpreparedStatement.setString(2, city);\n\t\t\t\tpreparedStatement.setInt(3, cuisineId);\n\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tkitchenIdList.add(resultSet.getInt(\"kitchen_id\"));\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tif(preparedStatement!=null){\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif(resultSet!=null){\n\t\t\t\t\tresultSet.close();\n\t\t\t\t}\n\t\t\t\tif(connection!=null){\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tStringBuilder kitchenIdListBuilder = new StringBuilder();\n\t\tString temp = kitchenIdList.toString();\n\t\tString fb = temp.replace(\"[\", \"(\");\n\t\tString bb = fb.replace(\"]\", \")\");\n\t\tkitchenIdListBuilder.append(bb);\n\t\tkitchenIds = kitchenIdListBuilder.toString();\n\t\tSystem.out.println(\"KitchenIds -->\"+kitchenIds);\n\t\treturn kitchenIds;\n\t}", "@Override\n\tpublic List<Location> listLocationsById(int venueCity_id) {\n\t\treturn eventDao.listLocationsById(venueCity_id);\n\t}", "public ArrayList<City> getAllCapital() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n // ALL the capital cities in the WORLD organised by largest population to smallest\n String strSelect =\n \"SELECT city.Name, country.name AS 'CountryName', city.Population \"\n + \"FROM country JOIN city \"\n + \"ON country.Code = city.CountryCode \"\n + \"WHERE country.Capital = city.ID \"\n + \"ORDER BY city.population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new capital city if valid.\n // Check one is returned\n ArrayList<City> capCity = new ArrayList<City>();\n System.out.println(\"17. All the capital cities in the WORLD organised by largest population to smallest.\");\n System.out.println(\"Name | Country | Population\");\n while (rset.next())\n {\n City cCty = new City();\n cCty.Name = rset.getString(\"Name\");\n cCty.Population = rset.getInt(\"Population\");\n // cCty.CountryCode = rset.getString(\"CountryCode\");\n Country cCountry = new Country();\n cCountry.Name = rset.getString(\"CountryName\");\n System.out.println(cCty.Name + \" | \" + cCountry.Name +\" | \" + cCty.Population );\n capCity.add(cCty);\n }\n System.out.println(\"\\n\");\n return capCity;\n } catch (Exception e) {\n // Capital City not found.\n System.out.println(e.getMessage());\n System.out.println(\"17. Failed to get capital city details\");\n return null;\n }\n }", "Collection<? extends String> getHasCity();" ]
[ "0.73150444", "0.6946171", "0.63983", "0.6213516", "0.616816", "0.6116292", "0.61004996", "0.6086543", "0.60652614", "0.60632247", "0.60265577", "0.5981485", "0.5941497", "0.5920016", "0.5895213", "0.5881187", "0.58713835", "0.5843412", "0.58023596", "0.579895", "0.57427645", "0.5737753", "0.5719641", "0.57141906", "0.5701239", "0.5696655", "0.5683423", "0.56705827", "0.56684047", "0.56645983", "0.56407243", "0.5626736", "0.55868894", "0.5585115", "0.55803", "0.5572375", "0.55536026", "0.55487055", "0.55238515", "0.551704", "0.5514846", "0.5511613", "0.54989797", "0.5498851", "0.5494208", "0.5481903", "0.5471279", "0.54480934", "0.54411834", "0.5426948", "0.54196674", "0.5384543", "0.5376278", "0.5340392", "0.53250057", "0.5319541", "0.53159237", "0.53084946", "0.5298802", "0.5294803", "0.5290723", "0.52837586", "0.52826136", "0.5281182", "0.52792406", "0.5273501", "0.5270937", "0.5260757", "0.5256525", "0.5254737", "0.5254508", "0.5253265", "0.52436304", "0.52242047", "0.52178186", "0.52173257", "0.5215451", "0.520415", "0.5203201", "0.51965255", "0.51908886", "0.51840246", "0.51674426", "0.5163794", "0.5155345", "0.51480114", "0.51334995", "0.51328945", "0.51283836", "0.5116904", "0.51153624", "0.5115041", "0.5112093", "0.5109991", "0.51085716", "0.51025295", "0.5090301", "0.5088742", "0.5079753", "0.507065" ]
0.70162284
1
Finds all hotels within a given state:
public void searchAreaState(Connection connection, String state) throws SQLException { ResultSet rs = null; String sql = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setState(state); pStmt.setString(1, getState()); try { System.out.printf(" Hotels in %s:\n", getState()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); rs.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<S> getAllPossibleStates(S state);", "public UsState[] findWhereStateEquals(String state) throws UsStateDaoException;", "@Override\r\n\tpublic List<HouseState> queryAllHState() {\n\t\treturn adi.queryAllHState();\r\n\t}", "public List<HealthCheck> getChecksByState(String state);", "List<State> getListStateByFilter( StateFilter filter );", "List<Address> findByState(String state);", "Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);", "@Override\n\tpublic List<Equipment> getEquipmentByState(String state) {\n\t\treturn dao.getEquipmentByState(state);\n\t}", "@Transactional(readOnly = true)\n public List<CountryState> search(String query) {\n log.debug(\"Request to search CountryStates for query {}\", query);\n return StreamSupport\n .stream(countryStateSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public List<City> getCityList(State state);", "public void searchByState() {\n System.out.println(\"enter a name of state to fetch person data fro state :--\");\n String state = scanner.next();\n\n Iterator it = list.iterator();\n while (it.hasNext()) {\n Contact person = (Contact) it.next();\n if (state.equals(person.getState())) {\n List stream = list.stream().filter(n -> n.getCity().contains(state)).collect(Collectors.toList());\n System.out.println(stream);\n }\n }\n }", "public void loadHotels();", "List<Address> findByStateIn(List<String> stateList);", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "private Collection<Node> getCandidates(State state) {\n\t\treturn new ArrayList<Node>(Basic_ILS.graph.getNodes());\n\t}", "public HotelCard searchAdjacentHotels(Board board, Tuple res) {\n ArrayList<HotelCard> hotels = board.getHotels();\n ArrayList<HotelCard> adjacent_hotels = new ArrayList<>();\n ArrayList<Integer> ids = new ArrayList<>();\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // Presentation of player's adjacent hotels\n System.out.println(ANSI() + \"Here are the available adjacent hotels:\" + ANSI_RESET);\n // right\n x1 = res.a;\n y1 = res.b + 1;\n // up \n x2 = res.a - 1;\n y2 = res.b;\n // left\n x3 = res.a;\n y3 = res.b - 1; \n // down\n x4 = res.a + 1;\n y4 = res.b;\n \n if (isNum(board.board[x1][y1]) != -1) {\n ids.add(isNum(board.board[x1][y1]));\n }\n if (isNum(board.board[x2][y2]) != -1) {\n ids.add(isNum(board.board[x2][y2]));\n }\n if (isNum(board.board[x3][y3]) != -1) {\n ids.add(isNum(board.board[x3][y3]));\n }\n if (isNum(board.board[x4][y4]) != -1) {\n ids.add(isNum(board.board[x4][y4]));\n }\n for (int id : ids) {\n for (HotelCard hc : hotels) {\n if (hc.getID() == id) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET); \n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET); \n adjacent_hotels.add(hc); \n }\n }\n }\n\n // Choose one adjacent hotel\n System.out.println(\"Please type the id of the hotel you want to buy\");\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : adjacent_hotels) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n }\n }\n return null;\n }", "public UsState[] findAll() throws UsStateDaoException;", "public Person[] getPatientsByStateOfHealth(int state) {\n int count = 0;\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getStateOfHealth() == state)\n count++;\n }\n \n if(count == 0)\n return null;\n\n int index = 0;\n Person[] patientsByStateOfHealth = new Person[count];\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getStateOfHealth() == state)\n patientsByStateOfHealth[index++] = listOfPatients[i];\n }\n\n return patientsByStateOfHealth;\n }", "public void searchAreaFull(Connection connection, String city, String state, int zip) throws SQLException{\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ? AND state = ? AND zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n setZip(zip);\n pStmt.setInt(3, getZip());\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "private boolean containState(String state) {\r\n for (int i = 0; i < this.visitedList.size(); i++) {\r\n if (state.equals(this.visitedList.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public List<String> getCity(String state) {\n\t\tSet set=new HashSet();\n\t\tList ls=new LinkedList();\n\t\tStatement statement=null;\n\t\tResultSet rs=null;\n\t\tString engineName=\"\";\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(\"select VALUE from config_master where NAME='EXE_CITY' and LINK1='\"+state+\"'\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\tls.add(rs.getString(\"VALUE\"));\n\t\t\t}\n\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ls;\n\t}", "public ArrayList<PuzzleState> getNeighbors() {\n\t\tArrayList<PuzzleState> neighbors = new ArrayList<PuzzleState>();\n\t\tPuzzleState neighbor;\n\t\t//System.out.println(\"getting neighbors.\");\n\t\tfor (String act: ACTIONS) {\n\t\t\tif (current.validAction(act)){\n\t\t\t\t//System.out.println(\"Action: \" + act + \" on \" + current.getString());\n\t\t\t\tneighbor = new PuzzleState(current.getString(current.getState()),\n\t\t\t\t\t\t\t\t\t\t\tcurrent.getString(current.getGoalState()));\n\t\t\t\tsearchCost++;\n\t\t\t\tneighbor.act(act);\n\t\t\t\tneighbors.add(neighbor);\n\t\t\t}\t\n\t\t}\n\t\treturn neighbors;\n\t}", "public HashSet<State> statesReachableOn(State from, Character on) {\n \t\tHashSet<State> reachable = new HashSet<State>();\n \t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\twhile (iter.hasNext()) {\n \t\t\tTransition t = iter.next();\n \n \t\t\t// Do they want the epsilon transitions?\n \t\t\tboolean equals = false;\n \t\t\tif (on == null)\n \t\t\t\tequals = on == t.c;\n \t\t\telse\n \t\t\t\tequals = on.equals(t.c);\n \n \t\t\t// Add all matching transitions\n \t\t\t// Skip if already added to prevent loops\n \t\t\tif (equals && !reachable.contains(t.to)) {\n \t\t\t\t// Add this state\n \t\t\t\treachable.add(t.to);\n \n \t\t\t\t// Recurse and add all reachable from this state (epsilon transitions)\n \t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t\t}\n \t\t}\n \n \t\treturn reachable;\n \t}", "public List<S> getAvailableStates();", "@GetMapping(\"/findAllState\")\n\tpublic ResponseEntity<List<State>> findAllState() {\n\t\tList<State> STATES = stateService.findAllState();\n\t\treturn new ResponseEntity<List<State>>(STATES, HttpStatus.OK);\n\t}", "@Override\n\tpublic List<Equipment> getEquipmentByKey(String state) {\n\t\treturn dao.getEquipmentByKey(state);\n\t}", "public com.apatar.cdyne.ws.demographix.CensusInfoWithDataSet getNeighborhoodVehiclesPerHouseholdInDataset(java.lang.String stateAbbr, java.lang.String placeID) throws java.rmi.RemoteException;", "public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}", "public Cursor fetchAllHotels() {\r\n\r\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE,\r\n KEY_NAME, KEY_DESC, KEY_ADDR, KEY_MINS, KEY_RATE, KEY_PHONE, KEY_WEB }, null, null, null, null, null, null);\r\n }", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public static List<int[]> findAdjacent(PuzzleState state, int row, int column) {\r\n\t\tArrayList<int[]> adjacentTiles = new ArrayList<int[]>();\r\n\t\tint[] whiteTile = Tiles.findTile(0, state);\r\n\t\tint row1, row2, column1, column2;\r\n\t\t\r\n\t\trow1 = whiteTile[1] - 1;\r\n\t\trow2 = whiteTile[1] + 1;\r\n\t\tcolumn1 = whiteTile[0] - 1;\r\n\t\tcolumn2 = whiteTile[1] + 1;\r\n\t\t\r\n\t\t// West\r\n\t\tif (column1 >= 0) {\r\n\t\t\tint[] tile = new int[2];\r\n\t\t\ttile[0] = column1;\r\n\t\t\ttile[1] = row;\r\n\t\t\tadjacentTiles.add(tile);\r\n\t\t}\r\n\t\t// South\r\n\t\tif (row1 >= 0) {\r\n\t\t\tint[] tile = new int[2];\r\n\t\t\ttile[0] = row1;\r\n\t\t\ttile[1] = column;\r\n\t\t\tadjacentTiles.add(tile);\r\n\t\t}\r\n\t\t// East\r\n\t\tif (column2 <= 3) {\r\n\t\t\tint[] tile = new int[2];\r\n\t\t\ttile[0] = column2;\r\n\t\t\ttile[1] = row;\r\n\t\t\tadjacentTiles.add(tile);\r\n\t\t}\r\n\t\t// North\r\n\t\tif (row2 <= 3) {\r\n\t\t\tint[] tile = new int[2];\r\n\t\t\ttile[0] = column;\r\n\t\t\ttile[1] = row2;\r\n\t\t\tadjacentTiles.add(tile);\r\n\t\t}\r\n\t\t\r\n\t\treturn adjacentTiles;\r\n\t}", "@Override\r\n\tpublic List<City> getAllCitiesInState(String stateName, String countryName) {\n\t\tSystem.out.println(\"getAllCitiesInCountry,stateName,countryName\");\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\tList<City> clist=new ArrayList<City>();\r\n\t\t\r\n\t\tList<State> list=new ArrayList<State>();\r\n\t\t\r\n\t\t//List<City> clist = this.sessionFactory.getCurrentSession().createCriteria(Country.class)\r\n\t // .add(Restrictions.eq(\"name\",countryName)).list().get(0);\r\n\t\t//null pointer exception\r\n\t\tQuery query = session.createQuery(\"from City c where c.country.name=:countryName and c.district= :stateName\");\r\n\t\t\r\n\t\t//select * from city c, state p, country q where p.StateName='Andhra Pradesh' and q.name='india';\r\n\t\t\r\n\t\t//Query query = session.createQuery(\"from State p, Country q where q.name=:countryName and c.district= :p.stateName and p!=null and c.district!=null\");\r\n\t\t\r\n\t\tquery.setParameter(\"stateName\", stateName);\r\n\t\tquery.setParameter(\"countryName\", countryName);\r\n\t\tclist=query.list();\r\n\t\t\r\n\t\tsession.getTransaction().commit();\r\n\t\t//session.flush();\r\n\t\t//session.close();\r\n\t\treturn clist;\r\n\t}", "public UsState[] findWhereStateAbbrEquals(String stateAbbr) throws UsStateDaoException;", "private Stack<MapLocation> findPath(State.StateView state)\n {\n Unit.UnitView townhallUnit = state.getUnit(townhallID);\n Unit.UnitView footmanUnit = state.getUnit(footmanID);\n \n MapLocation startLoc = new MapLocation(footmanUnit.getXPosition(), footmanUnit.getYPosition(), null, 0);\n \n MapLocation goalLoc = new MapLocation(townhallUnit.getXPosition(), townhallUnit.getYPosition(), null, 0);\n \n MapLocation footmanLoc = null;\n if(enemyFootmanID != -1) {\n Unit.UnitView enemyFootmanUnit = state.getUnit(enemyFootmanID);\n footmanLoc = new MapLocation(enemyFootmanUnit.getXPosition(), enemyFootmanUnit.getYPosition(), null, 0);\n }\n \n // get resource locations\n List<Integer> resourceIDs = state.getAllResourceIds();\n Set<MapLocation> resourceLocations = new HashSet<MapLocation>();\n for(Integer resourceID : resourceIDs)\n {\n ResourceNode.ResourceView resource = state.getResourceNode(resourceID);\n \n resourceLocations.add(new MapLocation(resource.getXPosition(), resource.getYPosition(), null, 0));\n }\n \n return AstarSearch(startLoc, goalLoc, state.getXExtent(), state.getYExtent(), footmanLoc, resourceLocations);\n }", "public Iterable<Board> neighbors() {\n LinkedList<Board> states = new LinkedList<>();\n LinkedList<int[]> neighbors = neighborFinder();\n int[] curr_loc = blankFinder();\n\n for(int[] temp : neighbors){\n tiles[curr_loc[0]][curr_loc[1]] = tiles[temp[0]][temp[1]];\n tiles[temp[0]][temp[1]] = 0;\n states.add(new Board(deepCopy(tiles)));\n tiles[temp[0]][temp[1]] = tiles[curr_loc[0]][curr_loc[1]];\n tiles[curr_loc[0]][curr_loc[1]] = 0;\n\n }\n return states;\n }", "public abstract List<Direction> searchForCheese(Maze maze);", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "double energy(T searchState);", "List<Coord> allActiveCells();", "@Override\r\n\tpublic List<Food> getFoods() {\n\t\tString sql=\"select state from food group by state\";\r\n\t\tList<Food> s=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn s;\r\n\t}", "public abstract Set<Tile> getNeighbors(Tile tile);", "public void populateRandomly(final EVGameState state)\n \t{\n \t\tfor (int i = 0; i < 6; i++) {\n \t\t\tfinal int width = MathUtils.getRandomIntBetween(32, 128);\n \t\t\tfinal int height = MathUtils.getRandomIntBetween(24, 72);\n \t\t\tfinal Point3D origin = getRandomSolarPoint(Math.max(width, height));\n \t\t\tfinal SolarSystem tSolar = SolarSystem.randomSolarSystem(width, height, origin, state);\n \t\t\taddSolarSystem(tSolar);\n \t\t}\n\t\tfor (int i = 0; i < 10; i++) {\n \t\t\tfinal SolarSystem ss1 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tfinal SolarSystem ss2 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tif (ss1.equals(ss2)) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tfinal Portal portal1 = new Portal(state.getNextPropID(), state.getNullPlayer(), ss1.getWormholeLocation(), ss1, ss2);\n \t\t\tfinal Portal portal2 = new Portal(state.getNextPropID() + 1, state.getNullPlayer(), ss2.getWormholeLocation(), ss2,\n \t\t\t\t\tss1);\n \t\t\tfinal Wormhole tempWorhmhole = new Wormhole(portal1, portal2, ss1.getPoint3D().distanceTo(ss2.getPoint3D()), state);\n \t\t\taddWormhole(tempWorhmhole, state);\n \t\t}\n \t}", "@Override\n\tpublic List<Hotel> getHotelsInCity(String cityName, Session session) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tList<Hotel> hotelList = new ArrayList<Hotel>();\n\t\tCriteria cr = session.createCriteria(Hotel.class).add(Restrictions.eq(\"city\", cityName));\n\t\thotelList = cr.list();\n\t\treturn hotelList;\n\t}", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "public Weet[] getWeetsContaining(String query) {\n Weet[] a = tree.toArray(query);\n\n if (a.length != 0) {\n return a;\n }\n return null;\n }", "public void update(GameState gameState) {\n for (int i = 0;i < map.length; i++) {\n for (int j = 0;j < map[0].length;j++) {\n if (map[i][j] == TileType.WATER) {\n continue;\n }\n\n if (map[i][j] == TileType.MY_ANT) {\n map[i][j] = TileType.LAND;\n }\n\n if (gameState.getMap()[i][j] != TileType.UNKNOWN) {\n this.map[i][j] = gameState.getMap()[i][j];\n }\n }\n }\n\n this.myAnts = gameState.getMyAnts();\n this.enemyAnts = gameState.getEnemyAnts();\n this.myHills = gameState.getMyHills();\n this.seenEnemyHills.addAll(gameState.getEnemyHills());\n\n // remove eaten food\n MapUtils mapUtils = new MapUtils(gameSetup);\n Set<Tile> filteredFood = new HashSet<Tile>();\n filteredFood.addAll(seenFood);\n for (Tile foodTile : seenFood) {\n if (mapUtils.isVisible(foodTile, gameState.getMyAnts(), gameSetup.getViewRadius2())\n && getTileType(foodTile) != TileType.FOOD) {\n filteredFood.remove(foodTile);\n }\n }\n\n // add new foods\n filteredFood.addAll(gameState.getFoodTiles());\n this.seenFood = filteredFood;\n\n // explore unseen areas\n Set<Tile> copy = new HashSet<Tile>();\n copy.addAll(unseenTiles);\n for (Tile tile : copy) {\n if (isVisible(tile)) {\n unseenTiles.remove(tile);\n }\n }\n\n // remove fallen defenders\n Set<Tile> defenders = new HashSet<Tile>();\n for (Tile defender : motherlandDefenders) {\n if (myAnts.contains(defender)) {\n defenders.add(defender);\n }\n }\n this.motherlandDefenders = defenders;\n\n // prevent stepping on own hill\n reservedTiles.clear();\n reservedTiles.addAll(gameState.getMyHills());\n\n targetTiles.clear();\n }", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public List<Integer> getNeighborStates(Grid theGrid) {\n ArrayList<Integer> neighborStates = new ArrayList();\n int[] neighborColIndexForMyRow = getNeighborColIndex();\n\n for (int i = 0; i < neighborColIndexForMyRow.length; i++) {\n if (theGrid.isValidIndex(myRow + neighborRowIndex[i], myCol + neighborColIndexForMyRow[i])) {\n neighborStates.add(\n theGrid.getCell((myRow + neighborRowIndex[i]), (myCol + neighborColIndexForMyRow[i]))\n .getCurrentState());\n } else if (toroidal) {\n int[] newIndexes = getTorodialIndex(theGrid, i);\n if (theGrid.isValidIndex(newIndexes[0], newIndexes[1])) {\n neighborStates.add(\n theGrid.getCell(newIndexes[0], newIndexes[1]).getCurrentState());\n }\n }\n\n }\n return neighborStates;\n }", "public ArrayList<Chromosome> getEliteChromosomes() {\n // SortedMap instead of HashMap? Duplicate key values? \n ArrayList<Chromosome> elites = new ArrayList<Chromosome>();\n// ArrayList<Chromosome> sortedList = this.getChromosomesSorted();\n boolean firstRun = true;\n\n //this.sort();\n Collections.sort(this.chromosomes);\n\n while (elites.size() < Defines.eliteCt) {\n for (Chromosome chromosome : this.chromosomes) {\n if (elites.size() < Defines.eliteCt) {\n if (firstRun && chromosome.isValid()) {\n elites.add(chromosome);\n } else {\n elites.add(chromosome);\n }\n }\n }\n firstRun = false;\n }\n return elites;\n }", "protected int count_nbr_in_state ( int state )\r\n {\r\n OSPF_Interface oif;\r\n int count = 0;\r\n int i, j; \r\n int if_no, nbr_no;\r\n \r\n if_no = if_list.size();\r\n for ( i = 0; i < if_no; i++) {\r\n oif = (OSPF_Interface) if_list.elementAt(i);\r\n nbr_no = oif.neighbor_list.size();\r\n for ( j = 0; j < nbr_no; j++) {\r\n OSPF_Neighbor nbr = (OSPF_Neighbor) oif.neighbor_list.elementAt(j);\r\n if (nbr.state == state)\r\n count++;\r\n }\r\n }\r\n return count;\r\n }", "private GlobalState search(Map<String,String> stateMapping) {\n GlobalState desired = new GlobalState(nodes,binding);\n desired.addMapping(stateMapping);\n for(GlobalState g : globalStates) {\n if(g.equals(desired))\n return g;\n }\n return null;\n }", "public static int[] findTile(int number, PuzzleState state) {\r\n\t\tint[] location = new int[2];\r\n\t\t\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tfor (int j = 0; j < 4; j++)\r\n\t\t\t\tif (state.tiles[i][j] == number) {\r\n\t\t\t\t\tlocation[0] = i;\r\n\t\t\t\t\tlocation[1] = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn location;\r\n\t}", "public HashSet<State> statesReachableFrom(State from) {\n \t\treturn statesReachableOn(from, null);\n \t\t//\t\tHashSet<State> reachable = new HashSet<State>();\n \t\t//\t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\t//\t\twhile (iter.hasNext()) {\n \t\t//\t\t\tTransition t = iter.next();\n \t\t//\t\t\t\n \t\t//\t\t\t// Add all empty transitions\n \t\t//\t\t\t// Skip if already added to prevent loops\n \t\t//\t\t\tif (t.isEmptyTransition() && !reachable.contains(t.to)) {\n \t\t//\t\t\t\t// Add this state\n \t\t//\t\t\t\treachable.add(t.to);\n \t\t//\t\t\t\t\n \t\t//\t\t\t\t// Recurse and add all reachable from this state\n \t\t//\t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t//\t\t\t}\n \t\t//\t\t}\n \t\t//\t\t\n \t\t//\t\treturn reachable;\n \t}", "public void searchArea(Connection connection, String city, String state, int zip) throws SQLException {\n\n ResultSet rs = null;\n PreparedStatement pStmt = null;\n String sql1 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?\";\n String sql2 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n String sql3 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n\n // City and State combination:\n if (city != null && state != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql2);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n }\n\n // City and ZIP combination:\n else if (city != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n // State and ZIP combination:\n else {\n\n pStmt = connection.prepareStatement(sql2 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n String result;\n\n while (rs.next()) {\n\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Override\r\n\tpublic Iterable<Estates> findAll() {\n\t\treturn null;\r\n\t}", "public static GlobalStates getStatesFromAllLocations()\n {\n GlobalStates globalStates = new GlobalStates();\n try {\n\n List<LocalStates> compileRes = new ArrayList<>();\n getLocationIds().getLocationIds().forEach(\n (locn) -> {\n LocalStates ls = new LocalStates();\n StateVariables sv = IoTGateway.getGlobalStates().get(locn);\n ls.setLocation(locn);\n ls.setStateVariable(sv);\n ls.setFire(IoTGateway.getIsFireLocn().get(locn));\n ls.setSmokeAlert(IoTGateway.getSmokeWarn().get(locn));\n compileRes.add(ls);\n\n }\n );\n globalStates.setLocalStates(compileRes);\n }\n catch (NullPointerException npe)\n {\n LOGGER.error(\"Null Pointer Exception at Horizon.Restart project and open browser after atleast one timestep\");\n }\n return globalStates;\n }", "private static String[] getHotelAdress(String city, String state,\n\t\tString country) throws SAXException, IOException,\n\t\tParserConfigurationException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(hotelServiceURL + \"&city=\" + city\n\t\t\t+ \"&stateProvinceCode=\" + state + \"&countryCode=\" + country\n\t\t\t+ \"&apiKey=utf2pd8jsm9mr6mmfxyjqeq9\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList list = doc.getElementsByTagName(\"HotelSummary\");\n\n\t\tNode hotel = list.item(0);\n\n\t\tNodeList hotelInfo = hotel.getChildNodes();\n\n\t\tString[] out = { hotelInfo.item(2).getTextContent(),\n\t\t\thotelInfo.item(3).getTextContent(),\n\t\t\thotelInfo.item(4).getTextContent() };\n\n\t\treturn out;\n\t}", "public ArrayList<Cell> findPlacesToGiveBirth() {\r\n\r\n // Randomly choose the number of babies.\r\n int numOfBabyToBeBorn = new Random().nextInt(this.numOfBaby()) + 1;\r\n\r\n ArrayList<Cell> newEmpty = this.getNeighbours(1);\r\n Collections.shuffle(newEmpty);\r\n\r\n ArrayList<Cell> placeToBeBorn = new ArrayList<Cell>();\r\n\r\n int countEmptyCell = 0;\r\n\r\n for (int findEmpt = 0; findEmpt < newEmpty.size()\r\n && countEmptyCell < numOfBabyToBeBorn; findEmpt++, countEmptyCell++) {\r\n if (newEmpty.get(findEmpt).getInhabit() == null \r\n && isTerrainAccessiable(newEmpty.get(findEmpt))) {\r\n placeToBeBorn.add(newEmpty.get(findEmpt));\r\n }\r\n }\r\n return placeToBeBorn;\r\n }", "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integer> current = ret.getAccepting();\n\n\t\tboolean[] visited = new boolean[ret.getStates().length];\n\n\t\twhile (!current.isEmpty()) {\n\t\t\tInteger evaluated = current.iterator().next();\n\t\t\tcurrent.remove(evaluated);\n\t\t\tif (!visited[evaluated]) {\n\t\t\t\tvisited[evaluated] = true;\n\t\t\t\treachable.add(evaluated);\n\t\t\t\tSet<Integer> prev = new HashSet<>(reversedReachable.get(evaluated));\n\t\t\t\tcurrent.addAll(prev);\n\t\t\t}\n\t\t}\n\n\t\treturn reachable;\n\t}", "public List<String> findIndiaStates(){\n\t\treturn null;\n\t}", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "@Override\r\n\tpublic Set<NFAState> eClosure(NFAState s) {\r\n\t\tSet<NFAState> l = new HashSet<>();\r\n\t\treturn depthFirstSearch(l, s);\r\n\t}", "public Set<IDiogenAgent> getNeighborhood(IDiogenAgent agent) {\n Set<IDiogenAgent> neighborhood = new HashSet<IDiogenAgent>();\n // for now, only host agent can see the contained agents.\n if (agent == this.hostAgent) {\n neighborhood.addAll(this.getContainedAgents());\n } else if (agent instanceof ICartacomAgent) {\n ICartacomAgent cAgent = (ICartacomAgent) agent;\n for (IAgent target : cAgent.getAgentsSharingRelation()) {\n if (((IDiogenAgent) target).getContainingEnvironments()\n .contains(this)) {\n neighborhood.add((IDiogenAgent) target);\n }\n }\n }\n if (agent instanceof GeographicPointAgent) {\n for (ISubmicroAgent target : ((GeographicPointAgent) agent)\n .getSubmicroAgents()) {\n if (target.getContainingEnvironments().contains(this)) {\n neighborhood.add(target);\n }\n }\n }\n\n return neighborhood;\n\n }", "public List<MclnState> getAvailableStates();", "public List<Location> neighbors (Location pos);", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "Map<Coord, ICell> getAllCells();", "public List<A> getAvailableActionsFor(S state);", "public Set<StateVertex> getAllStates() {\n\t\treturn sfg.vertexSet();\n\t}", "ISearchResults<? extends IDeviceState> searchDeviceStates(IDeviceStateSearchCriteria criteria)\n\t throws SiteWhereException;", "public void evolve() {\n\t\tboolean[][] nextState = new boolean[width][height];\n\t\t\n\t\t// Look at each position\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tboolean value = calculateNextState(x, y);\n\t\t\t\tnextState[x][y] = value;\n\t\t\t}\n\t\t}\n\t\t\n\t\tstate = nextState;\n\t}", "public String searchByStateUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER STATE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String state = console.promptForString(\" STATE: \");\n return state;\n }", "public List<SubProduct> getSubProducts(State state)\n\t{\n\t\tArrayList<SubProduct> subProduct = new ArrayList<SubProduct>();\n\t\tfor (int i = 0; i < dao.getSubProducts().size(); i++)\n\t\t{\n\t\t\tif (dao.getSubProducts().get(i).getState() == state)\n\t\t\t{\n\t\t\t\tsubProduct.add(dao.getSubProducts().get(i));\n\t\t\t}\n\t\t}\n\t\tCollections.sort(subProduct);\n\t\treturn subProduct;\n\t}", "public Set<Square> validDestinations(Board b);", "SearchResult search(State root, List<State> expanded_list, State goal);", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "public static String getHotel(String city, String state, String country)\n\t\tthrows IOException, ParserConfigurationException, SAXException {\n\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(hotelServiceURL + \"&city=\" + city\n\t\t\t+ \"&stateProvinceCode=\" + state + \"&countryCode=\" + country\n\t\t\t+ \"&apiKey=utf2pd8jsm9mr6mmfxyjqeq9\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList list = doc.getElementsByTagName(\"HotelSummary\");\n\n\t\tNode hotel = list.item(0);\n\n\t\tNodeList hotelInfo = hotel.getChildNodes();\n\n\t\tString hotelName = hotelInfo.item(1).getTextContent();\n\t\tString hotelAd = hotelInfo.item(2).getTextContent() + \",\"\n\t\t\t+ hotelInfo.item(3).getTextContent() + \",\"\n\t\t\t+ hotelInfo.item(4).getTextContent();\n\n\t\treturn \"We found the following hotel: \" + hotelName + \"\\n\"\n\t\t\t+ \"At this address: \" + hotelAd;\n\t}", "public Iterable<Board> neighbors() {\n int emptyRow = -1; // Row of the empty tile\n int emptyCol = -1; // Column of the empty tile\n\n // Iterate through each tile in the board, searching for empty tile\n search:\n for (int row = 0; row < N; row++) // For each row in the board\n for (int col = 0; col < N; col++) // For each column in the row\n if (tiles[row][col] == 0) { // If the current tile is empty (value of 0)\n emptyRow = row; // Store the row of the empty tile\n emptyCol = col; // Store the column of the empty tile\n break search; // Break from search\n }\n\n Stack<Board> neighbors = new Stack<Board>(); // Initialize a stack of neighboring board states\n\n if (emptyRow - 1 >= 0) // If there is a row of tiles above the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow - 1, emptyCol)); // Swap empty tile with the above adjacent tile and add to neighbors stack\n\n if (emptyRow + 1 < N) // If there is a row of tiles below the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow + 1, emptyCol)); // Swap empty tile with the below adjacent tile and add to neighbors stack\n\n if (emptyCol - 1 >= 0) // If there is a column of tiles to the left of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol - 1)); // Swap empty tile with the left adjacent tile and add to neighbors stack\n\n if (emptyCol + 1 < N) // If there is a column of tiles to the right of the empty tile\n neighbors.push(swap(emptyRow, emptyCol, emptyRow, emptyCol + 1)); // Swap empty tile with the right adjacent tile and add to neighbors stack\n\n return neighbors; // Return iterable stack of neighboring board states\n }", "public UsState[] findWhereIdEquals(int id) throws UsStateDaoException;", "@Override\n\tpublic List<State> getState(String id) {\n\t\t\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// create a query ... sort by last name\n\t\tQuery<State> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from State order where countryid=:c\",\n\t\t\t\t\t\t\t\t\t\t\tState.class);\n\t\ttheQuery.setParameter(\"c\", id);\n\t\t// execute query and get result list\n\t\tList<State> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t\t\n\t\t\n\t}", "public com.apatar.cdyne.ws.demographix.CensusInfoWithDataSet getNeighborhoodAgeGenderFemaleInDataSet(java.lang.String stateAbbrev, java.lang.String placeID) throws java.rmi.RemoteException;", "List<Seat> getSeatsWithState(int filmSessionId);", "public boolean inExplored(int[] state)\n\t{\n\t\tfor (int i = 0; i < this.explored.size(); i++) {\n\t\t\tint[] curr = this.explored.get(i);\n\n\t\t\tif ((curr[0] == state[0]) && (curr[1] == state[1])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public String match(String state) {\n\t\tSet<Entry<String, String>> set = mapList.entrySet(); \t// Converting to Set in order to traverse\n\t\tIterator<Entry<String, String>> i = set.iterator(); \n\t\tString result = new String();\n\t\t\n\t\t// Iterate until you find the state and region\n\t\twhile (i.hasNext()) {\n\t\t\t\n\t\t\t// Convert to Map.Entry to get key and value separately\n\t\t\tMap.Entry<String, String> entry = (Map.Entry<String, String>) i.next(); \n\t\t\t\n\t\t\t// Finding values from map in order to get the correct value associated with the state\n\t\t\tString compareState = entry.getKey().toString();\n\t\t\tString[] region = entry.getKey().toString().split(\",\");\n\t\t\tString match = entry.getValue().toString().split(\",\")[region.length - 1]; \n\t\t\t\n\t\t\t// Found match\n\t\t\tif (compareState.equals(state)) {\n\t\t\t\tresult = match;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\t// Returns the match of given state, i.e. State: ID Region: West\n\t}", "public Set<Eventable> getIncomingClickable(StateVertex stateVertix) {\n\t\treturn sfg.incomingEdgesOf(stateVertix);\n\t}", "public abstract HashSet<Location> getPossibleMovements(GameBoard board);", "@Override\n public void visit (State state) {\n if (! curRegionStack.isEmpty()) {\n Util.debug(\" - searching substate: \" + state.getQualifiedName());\n }\n\n for (Transition transition : state.getOutgoing()) {\n Collection<Event> events = transition.getAllEvents();\n\n // if applicable, add a pair for null-event transition\n if (enableNullEventTransitions && transition.isNullEvent()) {\n EventTransitionPair evTrPair = new EventTransitionPair(null, transition);\n add(evTrPair);\n substatePrefixOfEvent.put(evTrPair, new String[0]);\n }\n\n // add to event-region map each event paired with each region under visit\n for (Event ev : events) {\n // collect as desired event\n EventTransitionPair evTrPair = new EventTransitionPair(ev, transition);\n add(evTrPair);\n\n if (Util.isDebugLevel()) {\n List<String> names = Util.newList();\n for (EventTransitionPair pair : this) {\n if (pair.getEvent() == null) {\n names.add(\"null event\");\n } else {\n names.add(pair.getEvent().getName() + \"@\" + pair.getEvent().id());\n }\n }\n Util.debug(\">> desired event list: \" + Util.join(names, \", \"));\n }\n\n List<String> substates = Util.newList();\n // if we're within submachines, add substate(s) as prefix(es)\n for (State substate : curSubstateStack) {\n substates.add(substate.getName());\n }\n // store the event's substate prependix\n substatePrefixOfEvent.put(evTrPair, substates.toArray(new String[0]));\n String evName = getSubstatePrefixString(evTrPair);\n\n // event-sub-statemachine mapping\n if (! curSubstateStack.isEmpty()) {\n substateDesiringEvent.put(evName, curSubstateStack.get(0));\n }\n // event-region mapping\n List<Region> interestedRegions = regionsDesiringEvent.get(ev.getName());\n if (interestedRegions == null) {\n interestedRegions = Util.newList();\n regionsDesiringEvent.put(ev.getName(), interestedRegions);\n }\n for (Region r : curRegionStack) {\n // register each region in the stack as interested regions\n interestedRegions.add(r);\n }\n }\n }\n }", "Set<MacAddress> neighbors();", "List<WayBill> getWayBillVisited();", "@Override\n public Iterable<WorldState> neighbors() {\n Queue<WorldState> neighbor = new ArrayDeque<>();\n int xDim = 0, yDim = 0;\n int[][] tiles = new int[_N][_N];\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n tiles[i][j] = _tiles[i][j];\n if (_tiles[i][j] == 0) {\n xDim = i;\n yDim = j;\n }\n }\n }\n\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n if (Math.abs(i - xDim) + Math.abs(j - yDim) == 1) {\n tiles[i][j] = _tiles[xDim][yDim];\n tiles[xDim][yDim] = _tiles[i][j];\n neighbor.add(new Board(tiles));\n // System.out.println(new Board(tiles));\n tiles[xDim][yDim] = _tiles[xDim][yDim];\n tiles[i][j] = _tiles[i][j];\n }\n }\n }\n return neighbor;\n }", "List<City> findCities();", "private static boolean AllCellsVisited()\n {\n for (Cell arr[] : cells){\n for (Cell c : arr)\n {\n if (!c.Visited)\n {\n return false;\n }\n }\n }\n return true;\n }", "public ArrayList<SearchNode> search(Problem p) {\n\tfrontier = new NodeQueue();\t// The frontier is a queue of expanded SearchNodes not processed yet\n\texplored = new HashSet<SearchNode>();\t/// The explored set is a set of nodes that have been processed \n\tGridPos startState = (GridPos) p.getInitialState();\t// The start state is given\n\tfrontier.addNodeToFront(new SearchNode(startState));\t// Initialize the frontier with the start state \n\n\t\n\tpath = new ArrayList<SearchNode>();\t// Path will be empty until we find the goal\n\t\t\n\n\n\twhile(!frontier.isEmpty()){\n\n\t SearchNode s = frontier.removeFirst(); \n\t GridPos g = s.getState(); \n\n\t if ( p.isGoalState(g) ) {\n\t\tpath = s.getPathFromRoot();\t\n\t\tbreak; \n\t }\n\t \n\t explored.add(s); \t \n\t ArrayList<GridPos> childStates = p.getReachableStatesFrom(g);\n\n\t while(!childStates.isEmpty()){\n\n\t\tSearchNode child = new SearchNode(childStates.get(0), s); \n\n\t\tif(!explored.contains(child) && !frontier.contains(child)){\n\n\t\t if ( p.isGoalState(child.getState()) ) {\n\t\t\n\t\t\tpath = child.getPathFromRoot();\t\n\t\t\treturn path; \n\t\t }\n\n\t\t if(insertFront) \n\t\t\tfrontier.addNodeToFront(child); \t\t \t\t\n\t\t else\t\n\t\t\tfrontier.addNodeToBack(child); \t \n\n\n\n\t\t}\n\n\t\tchildStates.remove(0);\n\t }\t \n\t}\n\n\n\treturn path;\n\n }", "public ArrayList<HexLocation> getShuffledLocations() {\n\t\t\n\t\tArrayList<HexLocation> locations = new ArrayList<>();\n\t\t\n\t\tHex[][] h = hexGrid.getHexes();\n\t\tlocations.add(h[4][1].getLocation());\n\t\tlocations.add(h[2][2].getLocation());\n\t\tlocations.add(h[5][2].getLocation());\n\t\tlocations.add(h[1][2].getLocation());\n\t\tlocations.add(h[4][3].getLocation());\n\t\tlocations.add(h[3][1].getLocation());\n\t\tlocations.add(h[3][4].getLocation());\n\t\tlocations.add(h[3][5].getLocation());\n\t\tlocations.add(h[5][1].getLocation());\n\t\tlocations.add(h[2][1].getLocation());\n\t\tlocations.add(h[5][3].getLocation());\n\t\tlocations.add(h[2][3].getLocation());\n\t\tlocations.add(h[4][2].getLocation());\n\t\tlocations.add(h[3][2].getLocation());\n\t\tlocations.add(h[4][4].getLocation());\n\t\tlocations.add(h[1][3].getLocation());\n\t\tlocations.add(h[3][3].getLocation());\n\t\tlocations.add(h[2][4].getLocation());\n\t\t\n\t\tCollections.shuffle(locations);\n\t\treturn locations;\n\t}", "public HotelCard searchHotel() {\n System.out.println(ANSI() + \"Here is your hotel card list:\" + ANSI_RESET);\n // Presentation of player's hotel card list\n for (HotelCard hc : hotel_list) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET);\n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET);\n }\n System.out.println(ANSI() + \"Please type the id of the hotel you choose\" + ANSI_RESET);\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : hotel_list) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET); \n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid ID\" + ANSI_RESET);\n }\n }\n // Junk \n return null;\n }", "private byte[] calculateAllPossibleOutboundStates(byte state, byte[] allPossible){\n int stateNumParticles = calcNumParticlesInState(state);\n int[] stateMomentum = calculateMomentum(state);\n ArrayList<Byte> possibleStates = new ArrayList<>();\n for(byte poss:allPossible){\n int possNumPart = calcNumParticlesInState(poss);\n if(possNumPart==stateNumParticles){\n int[] possMomentum = calculateMomentum(poss);\n if(compareMomenta(possMomentum, stateMomentum)){\n possibleStates.add(poss);\n }\n }\n }\n byte[] ret = new byte[possibleStates.size()];\n int i = 0;\n for(Byte b:possibleStates){\n ret[i++] = b.byteValue();\n }\n return ret;\n }" ]
[ "0.6343393", "0.58449686", "0.58417284", "0.57220733", "0.56982505", "0.5695924", "0.5634246", "0.5630204", "0.56174", "0.55445707", "0.55297244", "0.55290085", "0.55239844", "0.5492749", "0.5474616", "0.5446823", "0.54271334", "0.5407135", "0.53995204", "0.5394373", "0.5362785", "0.53589755", "0.53250796", "0.52808577", "0.525208", "0.5244955", "0.52348894", "0.52226716", "0.52217925", "0.52038485", "0.5197384", "0.51699644", "0.5166923", "0.51409054", "0.51396215", "0.5090549", "0.50874674", "0.50852895", "0.5042809", "0.5029182", "0.50261134", "0.50107324", "0.49721587", "0.4970074", "0.49592108", "0.4957409", "0.49541062", "0.49525192", "0.49500793", "0.49406505", "0.4930714", "0.49294853", "0.49110845", "0.49093494", "0.49026933", "0.48888355", "0.48840284", "0.4883442", "0.48717156", "0.48567188", "0.48553076", "0.4851717", "0.4844889", "0.4831512", "0.48291203", "0.48212007", "0.48157445", "0.48142418", "0.4804288", "0.48004672", "0.4780789", "0.4761465", "0.47589853", "0.47512794", "0.4745271", "0.47429544", "0.47313333", "0.47110146", "0.47093847", "0.4702777", "0.4698048", "0.4696528", "0.46899045", "0.4682932", "0.46763223", "0.46744162", "0.46678793", "0.46636987", "0.46620938", "0.4660663", "0.46493143", "0.46433234", "0.4643028", "0.46415746", "0.46401665", "0.4636728", "0.46365613", "0.4634764", "0.46307364", "0.46278244" ]
0.64341295
0
Finds all hotels within a given zip:
public void searchAreaZIP(Connection connection, int zip) throws SQLException { ResultSet rs = null; String sql = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setZip(zip); pStmt.setInt(1, getZip()); try { System.out.printf(" Hotels in %d:\n", getZip()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Theater> getTheaterbyZip(String zip) {\n\t\tList<Address> searchResult = searchAddressByZip(zip);\n\t\tList<Theater> theaterList = new ArrayList<Theater>();\n\t\t\n\t\tfor(Address element : searchResult) {\n\t\t\ttheaterList.add( ((TheaterAddressImpl) element).getTheater());\n\t\t}\n\t\t\n\t\treturn theaterList;\n\t}", "private static List<String> approximateZipCodes(List<String> allZipCodes, HashMap<String, List<String>> allZipCodeLocations) {\n List<String> remainingZipCodes = new ArrayList<>(allZipCodes);\n List<String> optimalZipCodes = new ArrayList<>();\n\n Set<String> uncoveredIds = new HashSet<>(allIds);\n while(!uncoveredIds.isEmpty()) {\n //greedy algorithm, find the highest ids covered in the zip code set\n int maxIdsCovered = 0;\n Set<String> maxSetIdsCovered = null;\n String maxZipCode = null;\n for(String zipCode : remainingZipCodes) {\n int idsCovered = 0;\n Set<String> setIdsCovered = new HashSet<>();\n for(String id : allZipCodeLocations.get(zipCode)) {\n if(uncoveredIds.contains(id)) {\n setIdsCovered.add(id);\n idsCovered++;\n }\n }\n\n if(idsCovered > maxIdsCovered) {\n maxZipCode = zipCode;\n maxIdsCovered = idsCovered;\n maxSetIdsCovered = setIdsCovered;\n }\n }\n\n //add zip code to set\n uncoveredIds.removeAll(maxSetIdsCovered);\n optimalZipCodes.add(maxZipCode);\n }\n\n return optimalZipCodes;\n }", "public HotelCard searchAdjacentHotels(Board board, Tuple res) {\n ArrayList<HotelCard> hotels = board.getHotels();\n ArrayList<HotelCard> adjacent_hotels = new ArrayList<>();\n ArrayList<Integer> ids = new ArrayList<>();\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // Presentation of player's adjacent hotels\n System.out.println(ANSI() + \"Here are the available adjacent hotels:\" + ANSI_RESET);\n // right\n x1 = res.a;\n y1 = res.b + 1;\n // up \n x2 = res.a - 1;\n y2 = res.b;\n // left\n x3 = res.a;\n y3 = res.b - 1; \n // down\n x4 = res.a + 1;\n y4 = res.b;\n \n if (isNum(board.board[x1][y1]) != -1) {\n ids.add(isNum(board.board[x1][y1]));\n }\n if (isNum(board.board[x2][y2]) != -1) {\n ids.add(isNum(board.board[x2][y2]));\n }\n if (isNum(board.board[x3][y3]) != -1) {\n ids.add(isNum(board.board[x3][y3]));\n }\n if (isNum(board.board[x4][y4]) != -1) {\n ids.add(isNum(board.board[x4][y4]));\n }\n for (int id : ids) {\n for (HotelCard hc : hotels) {\n if (hc.getID() == id) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET); \n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET); \n adjacent_hotels.add(hc); \n }\n }\n }\n\n // Choose one adjacent hotel\n System.out.println(\"Please type the id of the hotel you want to buy\");\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : adjacent_hotels) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n }\n }\n return null;\n }", "public void searchAreaFull(Connection connection, String city, String state, int zip) throws SQLException{\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ? AND state = ? AND zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n setZip(zip);\n pStmt.setInt(3, getZip());\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public void searchArea(Connection connection, String city, String state, int zip) throws SQLException {\n\n ResultSet rs = null;\n PreparedStatement pStmt = null;\n String sql1 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?\";\n String sql2 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n String sql3 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n\n // City and State combination:\n if (city != null && state != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql2);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n }\n\n // City and ZIP combination:\n else if (city != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n // State and ZIP combination:\n else {\n\n pStmt = connection.prepareStatement(sql2 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n String result;\n\n while (rs.next()) {\n\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public List<String> findZipCodersWhoseNamesContainLetter(String letter, List<String> zipcoders) {\n\n List<String> zipcodersAnswer = new ArrayList<>();\n\n for(String s: zipcoders){\n for(int i = 0; i < s.length(); i++){\n if(s.substring(i, i + 1).equalsIgnoreCase(letter)){\n zipcodersAnswer.add(s);\n i = s.length();\n }\n }\n }\n return zipcodersAnswer;\n }", "public List<String> getListFromZipCodeElementList(List<WebElement> element);", "public ArrayList<HexLocation> getShuffledLocations() {\n\t\t\n\t\tArrayList<HexLocation> locations = new ArrayList<>();\n\t\t\n\t\tHex[][] h = hexGrid.getHexes();\n\t\tlocations.add(h[4][1].getLocation());\n\t\tlocations.add(h[2][2].getLocation());\n\t\tlocations.add(h[5][2].getLocation());\n\t\tlocations.add(h[1][2].getLocation());\n\t\tlocations.add(h[4][3].getLocation());\n\t\tlocations.add(h[3][1].getLocation());\n\t\tlocations.add(h[3][4].getLocation());\n\t\tlocations.add(h[3][5].getLocation());\n\t\tlocations.add(h[5][1].getLocation());\n\t\tlocations.add(h[2][1].getLocation());\n\t\tlocations.add(h[5][3].getLocation());\n\t\tlocations.add(h[2][3].getLocation());\n\t\tlocations.add(h[4][2].getLocation());\n\t\tlocations.add(h[3][2].getLocation());\n\t\tlocations.add(h[4][4].getLocation());\n\t\tlocations.add(h[1][3].getLocation());\n\t\tlocations.add(h[3][3].getLocation());\n\t\tlocations.add(h[2][4].getLocation());\n\t\t\n\t\tCollections.shuffle(locations);\n\t\treturn locations;\n\t}", "List<GeoPoint> findGeoIntersections(Ray ray);", "public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}", "public abstract Set<Tile> getNeighbors(Tile tile);", "Collection<? extends String> getHasZipCode();", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public void loadHotels();", "public void findShips(int game[][]) {\n\t\tint counter =0; // total number of cells searched\n\t\tint count = 0;\n\t\tString carr=\"\"; // Concatenating the carrier strings.\n\t\tString sub = \"\"; // Concatenating the submarines strings.\n\t\t//System.out.println(\"Horizontal is implemented\"+ game);\n\t\tfor(int i=0 ; i<25; i++) {\n\t\t\tfor(int j =0; j<25;j++) {\n\t\t\t\tif(game[i][j]==1) {\n\t\t\t\t\t//System.out.print(\" Found Carrier at (\"+i+\",\"+j+\") \");\n\t\t\t\t\tString a = \"(\"+i+\",\"+j+\")\";\n\t\t\t\t\tcarr = carr.concat(a);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(game[i][j]==2) {\n\t\t\t\t\t//System.out.print(\" Found submarine at (\"+i+\",\"+j+\") \");\n\t\t\t\t\tString b = \"(\"+i+\",\"+j+\")\";\n\t\t\t\t\tsub = sub.concat(b);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tif(count==8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Strategy: Horizontal Sweep\");\n\t\tSystem.out.println(\"Number of cells searched: \"+counter);\n\t\tSystem.out.print(\"Found Carrier at \"+carr+\";\");\n\t\tSystem.out.println(\" Found Sub at \"+sub);\n\t\t\n\t}", "public static String createWhereForZipFilter(Set<String> zips ){\n\n if (zips==null ||zips.isEmpty()){\n //assert zips!=null:\"Should not have a null!\";\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"There was no last know zip code\");\n return \"and zipcode=''\";\n }\n StringBuilder stringBuilder=new StringBuilder();\n stringBuilder.append(\" and (\");\n for (String zip : zips) {\n stringBuilder.append(\"zipcode=\");\n stringBuilder.append(Utility.quoteStringsForWhere(zip));\n stringBuilder.append(\" or \");\n }\n stringBuilder.setLength(stringBuilder.length()-3);\n stringBuilder.append(\")\");\n return stringBuilder.toString();\n }", "List<Tile> getAdjacentTiles();", "public static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}", "RegisterTuple pickSeeds(ArrayList<Register> registers);", "public abstract List<Direction> searchForCheese(Maze maze);", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "@SuppressWarnings(\"unchecked\") \n public List<ZipLocation> getZipCodeLocations(String city, int start, int chunkSize){\n EntityManager em = emf.createEntityManager();\n String pattern = \"'\"+city.toUpperCase()+\"%'\";\n Query query = em.createQuery(\"SELECT z FROM ZipLocation z where UPPER(z.city) LIKE \"+pattern);\n List<ZipLocation> zipCodeLocations = query.setFirstResult(start).setMaxResults(chunkSize).getResultList();\n em.close();\n return zipCodeLocations;\n }", "public void buildVerticies(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tVertexLocation vertLoc1 = new VertexLocation(entry.getKey(), VertexDirection.NorthWest);\n\t\t\tVertex v1 = new Vertex(vertLoc1);\n\t\t\tverticies.put(vertLoc1, v1);\n\t\t\t\n\t\t\tVertexLocation vertLoc2 = new VertexLocation(entry.getKey(), VertexDirection.NorthEast);\n\t\t\tVertex v2 = new Vertex(vertLoc2);\n\t\t\tverticies.put(vertLoc2, v2);\n\t\t\t\n\t\t\tVertexLocation vertLoc3 = new VertexLocation(entry.getKey(), VertexDirection.East);\n\t\t\tVertex v3 = new Vertex(vertLoc3);\n\t\t\tverticies.put(vertLoc3, v3);\n\t\t\t\n\t\t\tVertexLocation vertLoc4 = new VertexLocation(entry.getKey(), VertexDirection.SouthEast);\n\t\t\tVertex v4 = new Vertex(vertLoc4);\n\t\t\tverticies.put(vertLoc4, v4);\n\t\t\t\n\t\t\tVertexLocation vertLoc5 = new VertexLocation(entry.getKey(), VertexDirection.SouthWest);\n\t\t\tVertex v5 = new Vertex(vertLoc5);\n\t\t\tverticies.put(vertLoc5, v5);\n\t\t\t\n\t\t\tVertexLocation vertLoc6 = new VertexLocation(entry.getKey(), VertexDirection.West);\n\t\t\tVertex v6 = new Vertex(vertLoc6);\n\t\t\tverticies.put(vertLoc6, v6);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public List zipcodeWithSuppliersList() throws AdException {\r\n\t\t try {\r\n\t\t begin();\r\n\t\t Query q = getSession().createSQLQuery(\"select DISTINCT zipcode from Zipcode\");\r\n\t\t List list = q.list();\r\n\t\t commit();\r\n\t\t return list;\r\n\t\t } catch (HibernateException e) {\r\n\t\t rollback();\r\n\t\t throw new AdException(\"Could not list the zipcodes where suppliers are present \", e);\r\n\t\t }\r\n\t\t }", "List<City> findCities();", "public String[] findRestaurant(String[] list1, String[] list2) {\n Map<String, Integer> map = new HashMap<String, Integer>();\n for (int i = 0; i < list1.length; i++) {\n map.put(list1[i], i);\n }\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < list2.length; i++) {\n Integer j = map.get(list2[i]);\n if (j != null) {\n min = Math.min(min, i + j);\n }\n }\n List<String> list = new LinkedList<String>();\n for (int i = 0; i < list2.length; i++) {\n Integer j = map.get(list2[i]);\n if (j != null && (i + j) == min) {\n list.add(list2[i]);\n }\n } \n String[] re = new String[]{};\n return list.toArray(re);\n }", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public static List<String> getZipEntries( final Path zipFile, final Configuration conf) throws IOException\r\n\t{\r\n\t\tif (zipFile==null) {\r\n\t\t\treturn Collections.<String>emptyList();\r\n\t\t}\r\n\t\tFSDataInputStream in = null;\r\n\t\tArrayList<String> entries = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tin = zipFile.getFileSystem(conf).open(zipFile);\r\n\t\t\tZipInputStream zin = new ZipInputStream(in);\r\n\t\t\tZipEntry nextEntry;\r\n\t\t\twhile ((nextEntry = zin.getNextEntry())!=null) {\r\n\t\t\t\tentries.add(nextEntry.getName());\r\n\t\t\t}\r\n\t\t\treturn entries;\t\r\n\t\t} finally {\r\n\t\t\tif (in!=null) {\r\n\t\t\t\tin.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<HotelBean> getHotelsDeals(HotelDealsFilter filter) throws BusinessException {\n\n\t\tOkHttpClient client = new OkHttpClient();\n\t\tHttpUrl.Builder urlBuilder = HttpUrl.parse(BASE_URL).newBuilder();\n\n\t\tfor (SearchableField field : filter.getSearchableFields()) {\n\t\t\tif (field==null || field.getValue()==null || StringUtils.isEmpty(field.getValue().trim())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\turlBuilder.addQueryParameter(field.getName(), field.getValue());\n\t\t}\n\n\t\tRequest request = new Request.Builder().url(urlBuilder.build().toString()).build();\n\t\tDeals deals = null;\n\t\ttry {\n\t\t\tResponse response = client.newCall(request).execute();\n\t\t\tString json = response.body().string();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tdeals = mapper.readValue(json, Deals.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new BusinessException(BusinessException.GENERAL_ERROR);\n\t\t}\n\t\tList<HotelBean> hotels = new ArrayList<>();\n\n\t\tfor (Hotel hotel : deals.getOffers().getHotel()) {\n\n\t\t\tHotelBean bean = new HotelBean();\n\t\t\tbean.setHotelName(hotel.getHotelInfo().getHotelName());\n\t\t\tbean.setHotelImageUrl(hotel.getHotelInfo().getHotelImageUrl());\n\t\t\tbean.setIndex(hotels.size());\n\t\t\tbean.setCity(hotel.getDestination().getCity());\n\t\t\tbean.setContry(hotel.getDestination().getLongName());\n\t\t\tbean.setRate(hotel.getHotelInfo().getHotelStarRating());\n\t\t\tbean.setStreetAddress(hotel.getHotelInfo().getHotelStreetAddress());\n\t\t\thotels.add(bean);\n\t\t}\n\t\treturn hotels;\n\t}", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void buildEdges(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tEdgeLocation edgeLoc1 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthWest);\n\t\t\tEdge edge1 = new Edge(edgeLoc1);\n\t\t\tedges.put(edgeLoc1, edge1);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc2 = new EdgeLocation(entry.getKey(), EdgeDirection.North);\n\t\t\tEdge edge2 = new Edge(edgeLoc2);\n\t\t\tedges.put(edgeLoc2, edge2);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc3 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthEast);\n\t\t\tEdge edge3 = new Edge(edgeLoc3);\n\t\t\tedges.put(edgeLoc3, edge3);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc4 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthEast);\n\t\t\tEdge edge4 = new Edge(edgeLoc4);\n\t\t\tedges.put(edgeLoc4, edge4);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc5 = new EdgeLocation(entry.getKey(), EdgeDirection.South);\n\t\t\tEdge edge5 = new Edge(edgeLoc5);\n\t\t\tedges.put(edgeLoc5, edge5);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc6 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthWest);\n\t\t\tEdge edge6 = new Edge(edgeLoc6);\n\t\t\tedges.put(edgeLoc6, edge6);\n\t\t}\n\t}", "List<MasterZipcode> getAll();", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "protected ArrayList<int[]> findAdjacentUnknown(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY && coveredMap[i][j] == SIGN_UNKNOWN) {\n\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "static int findIslands(ArrayList<ArrayList<Integer>> a, int N, int M)\n {\n \n // Your code here\n int island_count = 0;\n for(int i=0;i<N;i++){\n for(int j=0;j<M;j++){\n if(a.get(i).get(j) == 1){\n island_count++;\n explore_island(a, i, j);\n }\n }\n }\n \n return island_count;\n \n }", "public List<Pair> calculateShipTileIndices() {\n List<Pair> shipTileIndices = new ArrayList<>();\n for (int i = 0; i < shipSize; i++) {\n if (orientation == Orientation.HORIZONTAL) {\n shipTileIndices.add(new Pair(startX + i, startY));\n } else {\n shipTileIndices.add(new Pair(startX, startY + i));\n }\n }\n return shipTileIndices;\n }", "public ArrayList<Chromosome> getEliteChromosomes() {\n // SortedMap instead of HashMap? Duplicate key values? \n ArrayList<Chromosome> elites = new ArrayList<Chromosome>();\n// ArrayList<Chromosome> sortedList = this.getChromosomesSorted();\n boolean firstRun = true;\n\n //this.sort();\n Collections.sort(this.chromosomes);\n\n while (elites.size() < Defines.eliteCt) {\n for (Chromosome chromosome : this.chromosomes) {\n if (elites.size() < Defines.eliteCt) {\n if (firstRun && chromosome.isValid()) {\n elites.add(chromosome);\n } else {\n elites.add(chromosome);\n }\n }\n }\n firstRun = false;\n }\n return elites;\n }", "void mo15917a(ZipFile zipFile, Set<C6556k> set) throws IOException;", "public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }", "boolean hasHasZipCode();", "public String searchByZipUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER ZIPCODE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String zip = console.promptForString(\" ZIPCODE: \");\n return zip;\n }", "public List<Item> getItemsForAllLabels(boolean forceZip) {\n List<Item> itemList = new ArrayList<>();\n if (forceZip) {\n int maxIdx = 0;\n\n for (ShopTheLookResponseItem item : items) {\n if (item.getItems().size() - 1 > maxIdx) {\n maxIdx = item.getItems().size() - 1;\n }\n }\n\n for (int i = 0; i <= maxIdx; i++) {\n for (ShopTheLookResponseItem item : items) {\n if (item.getItems().size() > i) {\n itemList.add(item.getItems().get(i));\n }\n }\n }\n\n return itemList;\n }\n\n for (ShopTheLookResponseItem item : items) {\n itemList.addAll(item.getItems());\n }\n\n return itemList;\n }", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public static void main(String[] args) {\n // get from database\n// List<HotelSupplierProduct> hotelSupplierProducts =\n// getHotelSupplierProducts(\"/home/jchen/aChenBox/Desktop/hotel-28628-from-db.csv\", \",\");\n\n // ie. get zeus from url in vcs\n Collection<HotelMapping> zeusHotelMappings =\n getZeusHotelMappings(\"/home/jchen/aChenBox/Desktop/hotel-28628.txt\", \"\\\\|\");\n\n\n removeHotelNotInZeusLists(zeusHotelMappings, 123);\n\n List<HotelMapping> hotelMappings = new ArrayList<>();\n Collection<HotelMapping> hotelSupplierProducFromZeusList = updateHotelMappings(hotelMappings);\n\n // now get Zeus list\n // ie. cop\n }", "public ArrayList<Hotel> getUserHotels(Integer userId, Integer customerId);", "private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public static void main(String args[]) {\n\t\tint [] n = {-1,0,1,2,-2,4}; \n\t\tSystem.out.println(findTriplets(n));\n\t\t\n\t\t\n\t}", "@Test\n public void testGetAllPersonsByZip() {\n System.out.println(\"getAllPersonsByZip\");\n String zipCode = \"2620\";\n\n FacadePerson instance = new FacadePerson(emf);\n int expResult = 0;\n List<PersonDTO> result = instance.getAllPersonsByZip(zipCode);\n // int result = Array.size();\n assertTrue(expResult < result.size());\n }", "ArrayList<String> getRepresentativeDataByZipcode(String zipcode) throws Exception\n\t{\n\t\tArrayList<String> returnData = new ArrayList<String>();\n\n\t\tString urlHalf1 = \"https://whoismyrepresentative.com/getall_mems.php?zip=\";\n\t\tString urlHalf2 = \"&output=json\";\n\n\t\tString url = urlHalf1 + zipcode + urlHalf2;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement resultsElement = treeObject.get(\"results\");\n\n\t\t\tif (resultsElement.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray resultsArray = resultsElement.getAsJsonArray();\n\n\t\t\t\tint count = 0;\n\n\t\t\t\t// Saves three representatives max from json\n\t\t\t\tfor (int pos = 0; pos < resultsArray.size() && count < 3; pos++)\n\t\t\t\t{\n\t\t\t\t\tJsonElement currentElement = resultsArray.get(pos);\n\n\t\t\t\t\tif (currentElement.isJsonObject())\n\t\t\t\t\t{\n\t\t\t\t\t\tJsonObject currentObject = currentElement.getAsJsonObject();\n\n\t\t\t\t\t\t// Add data to returnData array\n\t\t\t\t\t\treturnData.add(currentObject.get(\"name\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"party\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"phone\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"link\").getAsString());\n\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn returnData;\n\t}", "ArrayList<ArrayList<Cell>> cells(ArrayList<ArrayList<Double>> d) {\n ArrayList<ArrayList<Cell>> result1 = new ArrayList<ArrayList<Cell>>();\n for (int i = 0; i < d.size(); i = i + 1) {\n ArrayList<Cell> result = new ArrayList<Cell>();\n for (int j = 0; j < d.get(i).size(); j = j + 1) {\n double height = d.get(i).get(j);\n if (height <= 0.0) {\n result.add(new OceanCell(height, i, j));\n }\n else {\n result.add(new Cell(height, i, j));\n }\n }\n result1.add(result);\n }\n return result1;\n }", "private static Map<Long, Set<XliffAlt>> getXliffAltMap(List<XliffAlt> alts)\n {\n // tuvId : Set<XliffAlt>\n Map<Long, Set<XliffAlt>> xlfAltMap = new HashMap<Long, Set<XliffAlt>>();\n\n for (XliffAlt alt : alts)\n {\n Set<XliffAlt> myAlts = xlfAltMap.get(alt.getTuvId());\n if (myAlts == null)\n {\n myAlts = new HashSet<XliffAlt>();\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n else\n {\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n }\n\n return xlfAltMap;\n }", "public List<Entry> getByTitle(String title) {\n List<Entry> matches = new ArrayList<>();\n for (Entry l : litRegister) {\n\n if (l.getTitle().contains(title)) {\n matches.add(l);\n }\n }\n return matches;\n }", "public Cursor fetchAllHotels() {\r\n\r\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE,\r\n KEY_NAME, KEY_DESC, KEY_ADDR, KEY_MINS, KEY_RATE, KEY_PHONE, KEY_WEB }, null, null, null, null, null, null);\r\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "Set<MacAddress> neighbors();", "public void showOneZipMarket(String zip){\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n if(lZip.equals(0l) || !propertyInfo.containsKey(lZip)){\n System.out.println(0);\n }else{\n Property pro = propertyInfo.get(lZip);\n System.out.println(lZip+\" \"+pro.calAvgMarket());\n }\n }", "public void buildHexes(){\n\t\t// Normal hexes\n\t\tHexLocation loc1 = new HexLocation(0, -2);\n\t\tTerrainHex hex1 = new TerrainHex(loc1, HexType.WOOD, 11);\n\t\thexes.put(loc1, hex1);\n\n\t\tHexLocation loc2 = new HexLocation(1, -2);\n\t\tTerrainHex hex2 = new TerrainHex(loc2, HexType.SHEEP, 12);\n\t\thexes.put(loc2, hex2);\n\t\t\n\t\tHexLocation loc3 = new HexLocation(2, -2);\n\t\tTerrainHex hex3 = new TerrainHex(loc3, HexType.WHEAT, 9);\n\t\thexes.put(loc3, hex3);\n\t\t\n\t\tHexLocation loc4 = new HexLocation(-1, -1);\n\t\tTerrainHex hex4 = new TerrainHex(loc4, HexType.BRICK, 4);\n\t\thexes.put(loc4, hex4);\n\t\t\n\t\tHexLocation loc5 = new HexLocation(0, -1);\n\t\tTerrainHex hex5 = new TerrainHex(loc5, HexType.ORE, 6);\n\t\thexes.put(loc5, hex5);\n\t\t\n\t\tHexLocation loc6 = new HexLocation(1, -1);\n\t\tTerrainHex hex6 = new TerrainHex(loc6, HexType.BRICK, 5);\n\t\thexes.put(loc6, hex6);\n\t\t\n\t\tHexLocation loc7 = new HexLocation(2, -1);\n\t\tTerrainHex hex7 = new TerrainHex(loc7,HexType.SHEEP, 10);\n\t\thexes.put(loc7, hex7);\n\t\t\n\t\tHexLocation loc8 = new HexLocation(-2, 0);\n\t\tTerrainHex hex8 = new TerrainHex(loc8, HexType.DESERT, 0);\n\t\thexes.put(loc8, hex8);\n\t\t\n\t\tHexLocation loc9 = new HexLocation(-1, 0);\n\t\tTerrainHex hex9 = new TerrainHex(loc9, HexType.WOOD, 3);\n\t\thexes.put(loc9, hex9);\n\t\t\n\t\tHexLocation loc10 = new HexLocation(0, 0);\n\t\tTerrainHex hex10 = new TerrainHex(loc10, HexType.WHEAT, 11);\n\t\thexes.put(loc10, hex10);\n\t\t\n\t\tHexLocation loc11 = new HexLocation(1, 0);\n\t\tTerrainHex hex11 = new TerrainHex(loc11, HexType.WOOD, 4);\n\t\thexes.put(loc11, hex11);\n\t\t\n\t\tHexLocation loc12 = new HexLocation(2, 0);\n\t\tTerrainHex hex12 = new TerrainHex(loc12, HexType.WHEAT, 8);\n\t\thexes.put(loc12, hex12);\n\t\t\n\t\tHexLocation loc13 = new HexLocation(-2, 1);\n\t\tTerrainHex hex13 = new TerrainHex(loc13, HexType.BRICK, 8);\n\t\thexes.put(loc13, hex13);\n\t\t\n\t\tHexLocation loc14 = new HexLocation(-1, 1);\n\t\tTerrainHex hex14 = new TerrainHex(loc14, HexType.SHEEP, 10);\n\t\thexes.put(loc14, hex14);\n\t\t\n\t\tHexLocation loc15 = new HexLocation(0, 1);\n\t\tTerrainHex hex15 = new TerrainHex(loc15, HexType.SHEEP, 9);\n\t\thexes.put(loc15, hex15);\n\t\t\n\t\tHexLocation loc16 = new HexLocation(1, 1);\n\t\tTerrainHex hex16 = new TerrainHex(loc16, HexType.ORE, 3);\n\t\thexes.put(loc16, hex16);\n\t\t\n\t\tHexLocation loc17 = new HexLocation(-2, 2);\n\t\tTerrainHex hex17 = new TerrainHex(loc17, HexType.ORE, 5);\n\t\thexes.put(loc17, hex17);\n\t\t\n\t\tHexLocation loc18 = new HexLocation(-1, 2);\n\t\tTerrainHex hex18 = new TerrainHex(loc18, HexType.WHEAT, 2);\n\t\thexes.put(loc18, hex18);\n\t\t\n\t\tHexLocation loc19 = new HexLocation(0, 2);\n\t\tTerrainHex hex19 = new TerrainHex(loc19, HexType.WOOD, 6);\n\t\thexes.put(loc19, hex19);\n\n\n\t\t\n\t}", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "public static void main(String[] args) {\n\t\tString[] city = { \"Istanbul\", \"Irvine\", \"Venice\", \"Tokyo\", \"Niamey\", \"Luxembourg\" };\n\n\t\tMap<String, Integer> cityMap = new TreeMap<>();\n\n\t\tfor (String s : city) {\n\t\t\tcityMap.put(s, s.length());\n\t\t}\n\t\tSystem.out.println(cityMap);\n\n\t\tSet<Entry<String, Integer>> cities = cityMap.entrySet();\n\n\t\tIterator<Entry<String, Integer>> itr = cities.iterator();\n\n\t\twhile (itr.hasNext()) {\n\t\t\tEntry<String, Integer> e = itr.next();\n\t\t\tInteger length = e.getValue();\n\n\t\t\tif (length > 7) {\n\t\t\t\titr.remove();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(cityMap);\n\t}", "List<Address> findByStateIn(List<String> stateList);", "public String[] findRestaurant(String[] list1, String[] list2) {\n\n List<String> result = new ArrayList<>(list1.length);\n Map<String, Integer> map = new HashMap<>(list1.length);\n\n for (int i = 0; i < list1.length; ++i) {\n map.put(list1[i], i);\n }\n\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < list2.length; ++i) {\n if (map.containsKey(list2[i])) {\n int index = i + map.get(list2[i]);\n if (index > min) continue;\n if (index < min) {\n result.clear();\n min = index;\n }\n result.add(list2[i]);\n }\n }\n\n String [] arr = new String[result.size()];\n\n for (int i = 0; i < result.size(); ++i) {\n arr[i] = result.get(i);\n }\n\n return arr;\n }", "List<MasterZipcode> getByRangeZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern, int pageNo);", "public int infectNeighbours(Map map);", "public Iterator<Example> getNeighbors(Instance instance){\n\t\tSet<Example> set=new HashSet<Example>();\n\t\tfor(Iterator<Feature> i=instance.featureIterator();i.hasNext();){\n\t\t\tFeature f=i.next();\n\t\t\tfor(Iterator<Example> j=featureIndex(f).iterator();j.hasNext();){\n\t\t\t\tset.add(j.next());\n\t\t\t}\n\t\t}\n\t\treturn set.iterator();\n\t}", "public List<String> getZipCodes(String cityName) {\n List<String> results = new ArrayList<String>();\n List<Place> zipsForCity = zipCodes.get(cityName);\n\n if (zipsForCity == null) {\n zipsForCity = zipCodes.get(cityName + \" Town\");\n }\n\n if (zipsForCity != null && zipsForCity.size() >= 1) {\n for (Place place : zipsForCity) {\n if (place.postalCode != null && !place.postalCode.isEmpty()) {\n results.add(place.postalCode);\n }\n }\n }\n\n if (results.isEmpty()) {\n results.add(\"00000\"); // if we don't have the city, just use a dummy\n }\n\n return results;\n }", "public static ArrayList<Neighbourhood> generateNeighbourhoods() {\n People p1 = new People(\"Peter\", \"Smith\");\n People p2 = new People(\"Anna\", \"Hunter\");\n ArrayList<People> people = new ArrayList<People>();\n people.add(p1); people.add(p2);\n\n Post post1 = new Post(p1,\"Babysitter needed\",\"Hi we need a Babysitter for next Friday. Please send me a private message if you are interested. Pay is 5 pound per hour\");\n Post post2 = new Post(p1,\"Car for sale\");\n Post post3 = new Post(p2,\"Looking for plumber\");\n Post post4 = new Post(p2,\"Free beer\");\n\n ArrayList<Post> posts = new ArrayList<Post>();\n posts.add(post1);posts.add(post2);posts.add(post3);posts.add(post4);\n\n\n Neighbourhood n1 = new Neighbourhood(\"Partick\");\n n1.setPosts(posts);\n n1.setMembers(people);\n Neighbourhood n2 = new Neighbourhood(\"West End\");\n n2.setPosts(posts);\n n2.setMembers(people);\n ArrayList<Neighbourhood> neighbourhoods = new ArrayList<Neighbourhood>();\n neighbourhoods.add(n1);\n neighbourhoods.add(n2);\n return neighbourhoods;\n }", "public List<Aresta> getAdjacentes(Ponto ponto) {\n\t\treturn getAdjacentes(Arrays.asList(ponto));\n\t}", "public void showOneZipArea(String zipChooseArea) {\n Long lZip = ParserUtils.tryCastStrToLong(zipChooseArea);\n if(lZip.equals(0l) || !propertyInfo.containsKey(lZip)){\n System.out.println(0);\n }else{\n Property pro = propertyInfo.get(lZip);\n System.out.println(lZip+\" \"+pro.calAvgTotalLiveArea());\n }\n }", "int countByZipcodeDesc(String zipcodeCodePattern, String zipcodeDescPattern);", "public final Workouts getWorkoutsByEquipment(ArrayList<Config.Equipment> e) {\r\n\t\te = (ArrayList<Config.Equipment>) e.stream().distinct().collect(Collectors.toList());\r\n\r\n\t\tWorkouts newWorkoutList = new Workouts();\r\n\r\n\t\t// for every Workout in workoutList\r\n\t\tfor (Workout i : workoutList) {\r\n\t\t\t// and for every Equipment j in the Equipment list passed in\r\n\t\t\tfor (Config.Equipment j : e) {\r\n\t\t\t\tif (i.getEquipment() == j) {\r\n\t\t\t\t\tnewWorkoutList.addWorkout(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn newWorkoutList;\r\n\t}", "private static List<PeakLoc> findPeaks(long[] sums) {\r\n\t\treturn findPeaks(sums, 3);\r\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\tString testData= \"[94133,94133] [94200,94299] [94226,94399] [94400,94499] [94426,94599] \";\n\t\t\n\t\t\n\t\t List<ZipCodeRange> extractedZipRanges = zipCodeRangeProcessor.extractZipCodeRanges(testData,ZipCodeRangeConstants.SQUARE_BRKT_REGEX);\n\t \n\t\t List<ZipCodeRange> finalMergedZipRanges = zipCodeRangeProcessor.mergeZipCodeRanges(extractedZipRanges);\n\t\t LOG.info(\"finalMergedZipRanges \"+finalMergedZipRanges);\n\t}", "List<MasterZipcode> getByCity(int cityId);", "void mo33697a(ZipFile zipFile, Set<C2090j> set) throws IOException;", "public static void main(String[] args) {\n ArrayList<String> cities = new ArrayList<>(Arrays.asList(\"ROME\", \"LONDON\", \"NAIROBI\", \"CALIFORNIA\", \"ZURICH\",\n \"NEW DELHI\", \"AMSTERDAM\", \"ABU DHABI\", \"PARIS\"));\n\n System.out.println(getAICities(cities));\n }", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "@Override\n\tpublic List<Cell> getImmediateNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint north, east, south, west;\n\t\t\n\t\tnorth = getNorthCell(cell);\n\t\teast = getEastCell(cell);\n\t\tsouth = getSouthCell(cell);\n\t\twest = getWestCell(cell);\n\t\t\n\t\tif (north != -1) { neighbors.add(getCellList().get(north)); }\n\t\tif (east != -1) { neighbors.add(getCellList().get(east)); }\n\t\tif (south != -1) { neighbors.add(getCellList().get(south)); }\n\t\tif (west != -1) { neighbors.add(getCellList().get(west)); }\n\t\t\n\t\treturn neighbors;\n\t}", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }", "@Override\n public List<String> ipToIdLookup(List<String> ips)\n {\n log.info(\"Asked IPs -> IDs for: [%s]\", String.join(\",\", ips));\n\n if (ips.isEmpty()) {\n return new ArrayList<>();\n }\n\n // If the first one is not an IP, just assume all the other ones are not as well and just\n // return them as they are. This check is here because Druid does not check if IPs are\n // actually IPs and can send IDs to this function instead\n if (!InetAddresses.isInetAddress(ips.get(0))) {\n log.debug(\"Not IPs, doing nothing\");\n return ips;\n }\n\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n try {\n Compute computeService = createComputeService();\n Compute.Instances.List request = computeService.instances().list(project, zone);\n // Cannot filter by IP atm, see below\n // request.setFilter(GceUtils.buildFilter(ips, \"networkInterfaces[0].networkIP\"));\n\n List<String> instanceIds = new ArrayList<>();\n InstanceList response;\n do {\n response = request.execute();\n if (response.getItems() == null) {\n continue;\n }\n for (Instance instance : response.getItems()) {\n // This stupid look up is needed because atm it is not possible to filter\n // by IP, see https://issuetracker.google.com/issues/73455339\n for (NetworkInterface ni : instance.getNetworkInterfaces()) {\n if (ips.contains(ni.getNetworkIP())) {\n instanceIds.add(instance.getName());\n }\n }\n }\n request.setPageToken(response.getNextPageToken());\n } while (response.getNextPageToken() != null);\n\n log.debug(\"Converted to [%s]\", String.join(\",\", instanceIds));\n return instanceIds;\n }\n catch (Exception e) {\n log.error(e, \"Unable to convert IPs to IDs.\");\n }\n\n return new ArrayList<>();\n }", "public static Map<Integer, List> prepareHotelsListToView(List<Hotel> filteredHotelsToView) {\r\n\t\tMap<Integer, List> map = new HashMap<Integer, List>();\r\n\r\n\t\tfor (Hotel hotel : filteredHotelsToView) {\r\n\t\t\tList hotelData = new ArrayList();\r\n\t\t\t\r\n\t\t\thotelData.add(hotel.getDestination().getCountry());\r\n\t\t\thotelData.add(hotel.getDestination().getCity());\r\n\t\t\thotelData.add(hotel.getDestination().getRegionID());\r\n\t\t\thotelData.add(hotel.getHotelInfo().getHotelName());\r\n\t\t\thotelData.add(convertDateListToString(hotel.getOfferDateRange().getTravelStartDate()));\r\n\t\t\thotelData.add(convertDateListToString(hotel.getOfferDateRange().getTravelEndDate()));\r\n\t\t\thotelData.add(hotel.getHotelInfo().getHotelStarRating());\r\n\t\t\thotelData.add(hotel.getHotelInfo().getHotelGuestReviewRating());\r\n\t\t\thotelData.add(hotel.getHotelInfo().getHotelReviewTotal());\r\n\t\t\thotelData.add(hotel.getHotelInfo().getHotelImageUrl());\r\n\t\t\t\r\n\t\t\tmap.put(map.size() + 1, hotelData);\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}", "Map<Coord, ICell> getAllCells();", "private void setAdjacentCities(List <CityByDegrees> cityList)\r\n\t{\r\n\t\t//get a mapping of interstates to cities\r\n\t\tHashMap<String, Set<CityByDegrees>> interstateMap = new HashMap<String, Set<CityByDegrees>>();\r\n\t\tfor(int i = 0; i < cityList.size(); i++)\r\n\t\t{\r\n\t\t\tList interstates = ((CityByDegrees)cityList.get(i)).getInterstates();\r\n\t\t\tfor(int j = 0; j < interstates.size(); j++)\r\n\t\t\t{\r\n\t\t\t\tString interstate = (String)interstates.get(j);\r\n\t\t\t\tif(interstateMap.containsKey(interstate)) {\r\n\t\t\t\t\t((Set)interstateMap.get(interstate)).add(cityList.get(i));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSet <CityByDegrees> interstateCitySet = new HashSet<CityByDegrees>();\r\n\t\t\t\t\tinterstateCitySet.add(cityList.get(i));\r\n\t\t\t\t\tinterstateMap.put(interstate, interstateCitySet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}//end for\r\n\r\n\t\t//get a mapping of vertices to each city\r\n\t\tfor(int i = 0; i < cityList.size(); i++)\r\n\t\t{\r\n\t\t\tList interstates = ((CityByDegrees)cityList.get(i)).getInterstates();\r\n\t\t\tfor(int j = 0; j < interstates.size(); j++)\r\n\t\t\t{\r\n\r\n\t\t\t\tString interstate = (String)interstates.get(j);\r\n\t\t\t\tHashSet<CityByDegrees> interstateCitySet = (HashSet)interstateMap.get(interstate);\r\n\r\n\t\t\t\tif(interstateCitySet.contains(cityList.get(i))) {\r\n\t\t\t\t\tIterator iterator = interstateCitySet.iterator();\r\n\t\t\t\t\twhile(iterator.hasNext()) {\r\n\t\t\t\t\t\tCityByDegrees temp = (CityByDegrees)iterator.next();\r\n\t\t\t\t\t\tif(!temp.getCity().equals( ((CityByDegrees)cityList.get(i)).getCity()))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t((CityByDegrees)cityList.get(i)).addAdjacentCity(temp);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}//end for\r\n\r\n\t}", "public ArrayList<Restaurant> nearbyRestaurants(){\r\n\t\tint closestlatindex = BinarySearch.indexOf(FindPath.rlist, lat);\r\n\t\treturn BinarySearch.getlist(lat, lng, closestlatindex);\t\t\r\n\t}", "Set<Location> extractLocations() {\n try {\n Set<Location> extracted = CharStreams.readLines(\n gazetteer,\n new ExtractLocations(populationThreshold)\n );\n\n // Raw population stats doesn't work great in the internet as-is. Calibrate for online activity\n calibrateWeight(extracted);\n\n return extracted;\n\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }", "public static String getCityTemp(String zip) throws RemoteException {\n\t\tWeatherSoapProxy wc = new WeatherSoapProxy();\n\t\treturn \"The current temperature of the hotel area is \"\n\t\t\t+ wc.getCityWeatherByZIP(zip).getTemperature() + \"F\";\n\t}", "@Test\n\tpublic void testMergeZips() {\n\t\texpected.add(new int[]{94133,94133});\n\t\texpected.add(new int[]{94200,94699});\n\t\t\n\t\t//interger arrays for happy path\n\t\tint[] a1 = new int[] {94133,94133}, a2 = {94200,94299}, a3 = {94226,94699};\n\t\t\n\t\tint canShip1 = 94199, canShip2 = 94134, canShip3 = 65532;\n\t\t\n\t\t//\n\t\tint cantShip1 = 94133, cantShip2 = 94650, cantShip3 = 94230, cantShip4 = 94600, cantShip5 = 94299,\n\t\t\t\tcantShip6 = 94300;\n\t\t\n\t\tSystem.out.println(\"********************************** Start testMergeZips() **********************************\");\n\t\t\n\t\tSystem.out.print(\"Input ZipCode Ranges:---------------> \");\n\t\tZipCodeUtil.printZipRange(a1, a2, a3);\n\t\t\n\t\ttry{\n\t\t\tmergedZips = ZipCodeUtil.getInstance().mergeUniqueRanges(a1, a2, a3);\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :Output \");\n\t\t\t\n\t\t\tfor(int[] range : mergedZips){\n\t\t\t\tZipCodeUtil.printZipRange(range);\t\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertArrayEquals(expected.toArray(), mergedZips.toArray());\n\t\t\t\n\t\t\tSystem.out.println(\"<----------------------- :ZipCode Range\");\n\n\t\t\tSystem.out.println();\n\n\t\t\tSystem.out.println(\"----------------- Test ZipCodes -------------------\");\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip1, ZipCodeUtil.getInstance().canShipTo(canShip1));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip1));\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip2, ZipCodeUtil.getInstance().canShipTo(canShip2));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip2));\n\n\t\t\tAssert.assertTrue(\"Can ship to: \"+ canShip3 , ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\tSystem.out.println(\"Can ship to: \"+ canShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(canShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip1, ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip1 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip1));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip2, ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip2 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip2));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip3 , ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip3 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip3));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip4,ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip4 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip4));\n\t\t\t\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip5 ,ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip5 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip5));\n\n\t\t\tAssert.assertFalse(\"Can't ship to: \"+ cantShip6 ,ZipCodeUtil.getInstance().canShipTo(cantShip6));\n\t\t\tSystem.out.println(\"Can't ship to: \"+ cantShip6 +\" \"+ ZipCodeUtil.getInstance().canShipTo(cantShip6));\n\n\t\t\tSystem.out.println(\"----------------- End Test ZipCodes -------------------\");\n\n\t\t\n\t\t} catch(InvalidZipCode e){\n\n\t\t\tSystem.err.println(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t\tAssert.fail(e.getErrorCode() + \" - \" + e.getMessage());\n\t\t}finally{\n\n\t\t\tSystem.out.println(\"********************************** End testMergeZips() **********************************\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void FindLstn (int boardID, short[] addrlist, short[] results, int limit);", "public Collection<IntPair> findEmptyNeighbors(int x, int y);", "protected ArrayList<int[]> findAdjacentSafe(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY && coveredMap[i][j] != SIGN_UNKNOWN && coveredMap[i][j] != SIGN_MARK) {\n\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "private void searchNeighborhood(int nx, int ny, int nz) {\n\n if ((nx < 1) || (ny < 1) || (nz < 1)) return;\n if ((nx > w - 2) || (ny > h - 2) || (nz > d - 2)) return;\n\n float[] pixels = stack.getVoxels(nx - 1, ny -1, nz -1 , 3, 3, 3, null);\n\n //System.out.println(\"working on: \" + nx + \" \" + ny + \" \" + nz + \" : \" + pixels[13]);\n\n for (int i = 0; i < pixels.length; i++) {\n if (i == pixels.length/2) continue; //do check the center pixel\n\n int rx = (i % 9) % 3 - 1;\n int ry = (i % 9) / 3 - 1;\n int rz = i / 9 - 1;\n\n int sx = nx + rx;\n int sy = ny + ry;\n int sz = nz + rz;\n\n if (((pixels[i] > .5*value) && pixels[i] > threshold) ||\n (pixels[i] > (value - tolerance)) && (pixels[i] > threshold)) {\n\n Long index = (long)(sz*w*h + sy*w + sx);\n if (!neighborsList.contains((Long)index)) {\n neighborsList.add(index);\n //System.out.println(\"Added: \" + sx + \" \" + sy + \" \" + sz + \" : \" + pixels[i]);\n float d = (nx - sx)*(nx - sx) + (ny - sy)*(ny - sy) + (nz - sz)*(nz - sz);\n if (d < 15*15) {\n searchNeighborhood(sx, sy, sz);\n }\n }\n }\n else {\n //System.out.println(\"Rejected: \" + sx + \" \" + sy + \" \" + sz + \" : \" + pixels[i]);\n }\n\n }\n }", "String[] getRawWeatherDataByZipcode(String zipcode) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + zipcode + \",us\" + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "public String zipScan(String input) throws IOException {\n\t\tString strLine;\n\t\tString zipAndName = \"\";\n\t\twhile((strLine = brZip.readLine()) != null) {\n\t\t\tString zipCode = strLine.split(\" \", 2)[0];\n\n\t\t\tif(input.contains(zipCode) && zipCode.length() > 3)\n\t\t\t\tzipAndName = strLine;\n\t\t}\n\t\treturn zipAndName;\n\t}", "private static void initialise(Room[] hotel) {\n for (int x = 0; x < hotel.length; x++) {\n hotel[x].setName(\"Empty\");\n }\n }", "public static List<Address> getAddressesFromGeoCoder(Context context,double latitude,double longitude,int addressesToReturn) {\n List<Address> listOfAddresses = null;\n Geocoder gc=new Geocoder(context);\n try {\n listOfAddresses = gc.getFromLocation(latitude, longitude, addressesToReturn);\n\n //This is a test of more than one zip code - will give us 10023 & 10024\n //listOfAddresses = gc.getFromLocation(40.782891, -73.983085, addressesToReturn);\n } catch (IOException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n catch (IllegalArgumentException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n //Could be empty or null - we don't want to return null\n if (listOfAddresses==null){\n listOfAddresses=new ArrayList<>();\n }\n return listOfAddresses;\n }", "public void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);" ]
[ "0.655159", "0.5512471", "0.5478331", "0.53069603", "0.5278485", "0.5232489", "0.513538", "0.5061314", "0.49486625", "0.49408212", "0.48986414", "0.48674956", "0.48634213", "0.4859254", "0.4831012", "0.4820203", "0.4815126", "0.47847626", "0.47761214", "0.4775008", "0.47701073", "0.474766", "0.47328198", "0.47169867", "0.4699891", "0.46760195", "0.4640043", "0.4639134", "0.45978326", "0.45859143", "0.45858112", "0.45857564", "0.4579957", "0.45714003", "0.4552928", "0.45492485", "0.45422313", "0.45396486", "0.45225883", "0.45003983", "0.44936603", "0.4481282", "0.44731003", "0.44634816", "0.44625723", "0.44570673", "0.44513506", "0.4451113", "0.44489995", "0.4444618", "0.44397348", "0.44320607", "0.4417126", "0.4408499", "0.44013998", "0.44013962", "0.43987325", "0.43825325", "0.43793666", "0.437714", "0.43768087", "0.43749985", "0.43733168", "0.43701237", "0.4368906", "0.43666115", "0.435129", "0.43392026", "0.4338262", "0.43378314", "0.4336345", "0.43283924", "0.43281645", "0.4324267", "0.43187404", "0.43174526", "0.43035498", "0.43018126", "0.4296412", "0.42904332", "0.42889133", "0.42855382", "0.4278575", "0.42725244", "0.42684138", "0.4263456", "0.42619318", "0.42542496", "0.42526522", "0.42507482", "0.42479995", "0.42355394", "0.42338708", "0.42329234", "0.42302027", "0.42290854", "0.4227553", "0.42185932", "0.42184287", "0.4218316" ]
0.6351902
1
Finds all hotels within a given area; used for combinations for two:
public void searchArea(Connection connection, String city, String state, int zip) throws SQLException { ResultSet rs = null; PreparedStatement pStmt = null; String sql1 = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?"; String sql2 = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?"; String sql3 = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?"; // City and State combination: if (city != null && state != null){ pStmt = connection.prepareStatement(sql1 + " INTERSECT " + sql2); pStmt.clearParameters(); setCity(city); pStmt.setString(1, getCity()); setState(state); pStmt.setString(2, getState()); } // City and ZIP combination: else if (city != null){ pStmt = connection.prepareStatement(sql1 + " INTERSECT " + sql3); pStmt.clearParameters(); setCity(city); pStmt.setString(1, getCity()); setZip(zip); pStmt.setInt(2, getZip()); } // State and ZIP combination: else { pStmt = connection.prepareStatement(sql2 + " INTERSECT " + sql3); pStmt.clearParameters(); setState(state); pStmt.setString(1, getState()); setZip(zip); pStmt.setInt(2, getZip()); } try { System.out.println(" Hotels in area:"); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); String result; while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "abstract void findArea();", "abstract void findArea();", "static boolean allInAreaHuh ( AddressBookEntry ae, int someArea ) {\n\t/*\n\treturn ... ae.home ... ae.office ... ae.cell ... someArea ;\n\treturn ... inAreaHuh( ... ae.home ...) ... inAreaHuh( ... ae.office ...) ... inAreaHuh( ... ae.cell ...) ... someArea ;\n\treturn ... inAreaHuh( ae.home, someArea ) ... inAreaHuh( ae.office, someArea ) ... inAreaHuh( ae.cell, someArea ) ... someArea ;\n\t*/\n\treturn inAreaHuh( ae.home, someArea ) \n\t && inAreaHuh( ae.office, someArea ) \n\t && inAreaHuh( ae.cell, someArea );\t\n }", "public abstract Set<Tile> getNeighbors(Tile tile);", "public ArrayList<AreaInfo> queryAreas(){\n\t\tArrayList<AreaInfo> areaInfos = new ArrayList<AreaInfo>();\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmStatement = mMysqlConnection.createStatement();\n\t\t\tmResultSet = mStatement\n\t\t\t\t\t.executeQuery(\"select * from \" + mDbName + \".\" + TABLE_AREA);\n\t\t\t\n\t\t\t// store information of each area in the areInfos list\n\t\t\twhile (mResultSet.next()) {\n\t\t\t\tAreaInfo info = new AreaInfo();\n\t\t\t\t\n\t\t\t\tinfo.setAreaId( mResultSet.getInt(COLUMN_ID) );\n\t\t\t\tinfo.setAreaName( mResultSet.getString(COLUMN_NAME) );\n\t\t\t\tinfo.setAreaDescription( mResultSet.getString(COLUMN_DESCRIPTION) );\t\t\t\t\n\t\t\t\tinfo.setVersion( mResultSet.getInt(COLUMN_VERSION) );\n\t\t\t\t\n\t\t\t\tareaInfos.add(info);\n\t\t\t}\n\t\t\t\n\t\t\t// query tickets of an area\n\t\t\tfor(AreaInfo info : areaInfos){\n\t\t\t\tList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket> ticketTypes \n\t\t\t\t\t= new ArrayList< de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket >();\n\t\t\t\tArrayList<Ticket> tickets = queryAreaTickets(info.getAreaId());\n\t\t\t\t\n\t\t\t\tfor(Ticket ticket : tickets){\n\t\t\t\t\tticketTypes.add( new de.tudresden.inf.rn.mobilis.services.xhunt.proxy.Ticket( ticket.getId(), ticket.getName() ));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinfo.setTickets( ticketTypes );\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\t\t\n\t\tflush();\n\t\t\n\t\treturn areaInfos;\n\t}", "private static Array<int[]> findAllOpenAreas(int[][] board, int width, int height) {\n Array<int[]> positions = new Array<int[]>();\n boolean[][] good = new boolean[board.length][board[0].length];\n\n // go across horizontally, finding areas where the rectangle may fit\n // width wise\n for (int y = 1; y < board[0].length-1; ++y) {\n int horizontal_count = 0;\n for (int x = 1; x < board.length-1; ++x) {\n // count up in areas where there is no room\n if (board[x][y] == NULL)\n horizontal_count++;\n // if we encounter a room, the rectangle can not fit there\n else\n horizontal_count = 0;\n\n // when we've reached the edge of our rectangle's width\n // we can mark that this is a safe place to measure from\n if (horizontal_count == width) {\n good[x - width + 1][y] = true;\n // increment back one in case the next space is also\n // acceptable for being a rectangle\n horizontal_count--;\n }\n }\n }\n\n // now that count verticals we have established good lines of where a\n // rectangle may start\n // we need to count vertically down where it can fit\n\n for (int x = 0; x < board.length; ++x) {\n int vertical_count = 0;\n for (int y = 0; y < board[0].length; ++y) {\n // check against only the points that we flagged as potentially\n // okay\n if (good[x][y])\n vertical_count++;\n // if we didn't flag that point, then we can't fit a rectangle\n // there vertically\n else\n vertical_count = 0;\n\n // when our rectangle is fully formed, we can add it as a\n // plausible location\n if (vertical_count == height) {\n positions.add(new int[] { x, y - height + 1 });\n vertical_count--;\n }\n }\n }\n\n return positions;\n }", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public HotelCard searchAdjacentHotels(Board board, Tuple res) {\n ArrayList<HotelCard> hotels = board.getHotels();\n ArrayList<HotelCard> adjacent_hotels = new ArrayList<>();\n ArrayList<Integer> ids = new ArrayList<>();\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // Presentation of player's adjacent hotels\n System.out.println(ANSI() + \"Here are the available adjacent hotels:\" + ANSI_RESET);\n // right\n x1 = res.a;\n y1 = res.b + 1;\n // up \n x2 = res.a - 1;\n y2 = res.b;\n // left\n x3 = res.a;\n y3 = res.b - 1; \n // down\n x4 = res.a + 1;\n y4 = res.b;\n \n if (isNum(board.board[x1][y1]) != -1) {\n ids.add(isNum(board.board[x1][y1]));\n }\n if (isNum(board.board[x2][y2]) != -1) {\n ids.add(isNum(board.board[x2][y2]));\n }\n if (isNum(board.board[x3][y3]) != -1) {\n ids.add(isNum(board.board[x3][y3]));\n }\n if (isNum(board.board[x4][y4]) != -1) {\n ids.add(isNum(board.board[x4][y4]));\n }\n for (int id : ids) {\n for (HotelCard hc : hotels) {\n if (hc.getID() == id) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET); \n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET); \n adjacent_hotels.add(hc); \n }\n }\n }\n\n // Choose one adjacent hotel\n System.out.println(\"Please type the id of the hotel you want to buy\");\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : adjacent_hotels) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n }\n }\n return null;\n }", "public void searchAreaFull(Connection connection, String city, String state, int zip) throws SQLException{\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ? AND state = ? AND zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n setZip(zip);\n pStmt.setInt(3, getZip());\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public static ImmutableMap<Character, Integer> coordinateAreas(char[][] grid) {\r\n int height = grid.length;\r\n int width = grid[0].length;\r\n\r\n Map<Character, Integer> areas = new HashMap<>();\r\n\r\n for (int y = 0; y < height; y ++) {\r\n for (int x = 0; x < width; x ++) {\r\n char name = grid[y][x];\r\n if (name == '.') {\r\n continue;\r\n }\r\n\r\n if (y == 0 || x == 0 || y == height - 1 || x == width - 1) {\r\n // Coordinates on the edge are infinite.\r\n areas.put(name, INFINITE_AREA);\r\n } else {\r\n areas.compute(name, (sameName, oldValue) -> {\r\n if (oldValue == null) {\r\n return 1;\r\n } else if (oldValue == INFINITE_AREA) {\r\n return INFINITE_AREA;\r\n } else {\r\n return oldValue + 1;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n return ImmutableMap.copyOf(areas);\r\n }", "List<Coord> allActiveCells();", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n System.out.print(\"masukkan jumlah antenna= \");\n Integer countAntenna = input.nextInt();\n Antenna[] myAntenna = new Antenna[countAntenna];\n for(Integer i = 0; i<myAntenna.length;i++){\n System.out.print(\"point x antenna ke \"+ (i+1)+ \" = \");\n Integer pointX = input.nextInt();\n System.out.print(\"point y antenna ke \"+ (i+1)+ \" = \" );\n Integer pointY = input.nextInt();\n myAntenna[i] = new Antenna(pointX,pointY);\n }\n\n for (Integer i=0; i<myAntenna.length;i++){\n// System.out.println(myAntenna[i].radius.size());\n System.out.println(myAntenna[i].toString());\n }\n\n Set<String> intersection = myAntenna[0].radius;\n for(Integer i=0; i<myAntenna.length;i++){\n intersection.retainAll(myAntenna[i].radius);\n }\n\n System.out.print(\"hasil area irisan = \" + intersection);\n }", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "@NonNull\n private List<ClickableArea> getClickableAreas() {\n\n List<ClickableArea> clickableAreas = new ArrayList<>();\n\n\n //X semakin besar jumlah angkanya KEKANAN ,\n // Y semakin besar jumlah angkanya KEBAWAH , W semakin besar angkanya semakin LEBAR\n // , H semakin besar angknay semakin PANJANG\n clickableAreas.add(new ClickableArea(100, 320, 200, 200, new State(\"R.ALAT LINEN\")));\n clickableAreas.add(new ClickableArea(450, 200, 200, 250, new State(\"DAPUR SUSU\")));\n clickableAreas.add(new ClickableArea(820, 200, 200, 250, new State(\"R.OBAT\")));\n clickableAreas.add(new ClickableArea(1300, 120, 200, 250, new State(\"NURSE STATION\")));\n clickableAreas.add(new ClickableArea(1700, 120, 200, 250, new State(\"SH\")));\n clickableAreas.add(new ClickableArea(950, 500, 150, 200, new State(\"PERINOTOLOGI\")));\n clickableAreas.add(new ClickableArea(380, 850, 200, 350, new State(\"BBRT NDN INFEKSIUS\")));\n clickableAreas.add(new ClickableArea(820, 750, 150, 150, new State(\"LAV\")));\n clickableAreas.add(new ClickableArea(980, 750, 150, 150, new State(\"LAV 2\")));\n clickableAreas.add(new ClickableArea(900, 1000, 100, 100, new State(\"BBRT INFEKSIUS\")));\n clickableAreas.add(new ClickableArea(1500, 1200, 100, 100, new State(\"BBRT DIARE\")));\n\n\n\n return clickableAreas;\n }", "@Override\n public HashSet<int[]> coordinatesOfTilesInRange(int x, int y, Tile[][] board){\n HashSet<int[]> hashy = new HashSet<>();\n int[] c = {x,y};\n hashy.add(c);\n return findTiles(x, y, board, hashy);\n }", "public static int area_intersection(int blx1, int bly1, int trx1,int try1, int blx2, int bly2,int trx2,int try2){\r\n\t\tint base = 0, height = 0, area = 0;\r\n\t\r\n\t\tif (blx2>=blx1 && blx2<=trx1){\r\n\t\t\tif (bly2>=bly1 && bly2<=try1){\r\n\tif (trx2<=trx1 && trx2>=blx1){\r\n\tbase = trx2 - blx2;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\telse{\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tif( blx1>=blx2 && blx1<=trx2){\r\n\tbase = trx1 - blx1;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (blx1>=blx2 && blx1<=trx2){\r\n\t if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx1;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t }\r\n\tif( trx2>=blx1 && trx2<=trx1){\r\n\tbase = trx2 - blx1;\r\n\theight = try2 - bly1;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\t//else if(trx1 - blx2)==0 || (try1 - bly1)==0 || !(trx1>blx2 and trx2>trx1 && bly2<=bly1){\r\n\t//area = 0\r\n\t\t//}\r\n\t//end\r\n\t \r\n\t//if( area && area<=2147483647 )\r\n\t//area\r\n\t//else\r\n\t//-1\r\n\t//end\r\n\r\n\t\treturn area;\r\n\t}", "public Collection<IntPair> findEmptyNeighbors(int x, int y);", "List<Long> getBestSolIntersection();", "private static List<HantoCoordinate> getPerimeterSpaces(Board b) {\n\n\t\tList<HantoCoordinate> perimeter = new ArrayList<HantoCoordinate>();\n\t\tList<HantoCoordinate> toVisit = b.getAllOccupiedCoordinates();\n\n\t\tfor(HantoCoordinate current : toVisit){\n\n\t\t\tfor(HantoCoordinate neighbor : HantoUtil.getAllNeighbors(current)){\n\n\t\t\t\tif(!toVisit.contains(neighbor) && !perimeter.contains(neighbor)){\n\t\t\t\t\tperimeter.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn perimeter;\n\t}", "private Set<Cell> findShortestRoad(Set<Cell> b, Land land) {\n\t\tfor (Cell cell : b) {\n\t\t\tif (isNextToRoad(cell.i, cell.j, land))\n\t\t\t\treturn new HashSet<Cell>();\n\t\t}\n\t\t\n\t\tSet<Cell> output = new HashSet<Cell>();\n\t\tboolean[][] checked = new boolean[land.side][land.side];\n\t\tQueue<Cell> queue = new LinkedList<Cell>();\n\t\t// add border cells that don't have a road currently\n\t\t// dummy cell to serve as road connector to perimeter cells\n\t\tCell source = new Cell(Integer.MAX_VALUE, Integer.MAX_VALUE);\n\t\tfor (int z = 0; z < land.side; z++) {\n\t\t\tif (b.contains(new Cell(0, z)) || b.contains(new Cell(z, 0)) || b.contains(new Cell(land.side - 1, z))\n\t\t\t\t\t|| b.contains(new Cell(z, land.side - 1)))\n\t\t\t\treturn output;\n\t\t\tif (land.unoccupied(0, z))\n\t\t\t\tqueue.add(new Cell(0, z, source));\n\t\t\tif (land.unoccupied(z, 0))\n\t\t\t\tqueue.add(new Cell(z, 0, source));\n\t\t\tif (land.unoccupied(z, land.side - 1))\n\t\t\t\tqueue.add(new Cell(z, land.side - 1, source));\n\t\t\tif (land.unoccupied(land.side - 1, z))\n\t\t\t\tqueue.add(new Cell(land.side - 1, z, source));\n\t\t}\n\t\t// add cells adjacent to current road cells\n\t\tfor (Cell p : road_cells) {\n\t\t\tfor (Cell q : p.neighbors()) {\n\t\t\t\tif (!road_cells.contains(q) && land.unoccupied(q) && !b.contains(q))\n\t\t\t\t\tqueue.add(new Cell(q.i, q.j, p)); // use tail field of cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to keep track of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous road cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// during the search\n\t\t\t}\n\t\t}\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell p = queue.remove();\n\t\t\tchecked[p.i][p.j] = true;\n\t\t\tfor (Cell x : p.neighbors()) {\n\t\t\t\tif (b.contains(x)) { // trace back through search tree to find\n\t\t\t\t\t\t\t\t\t\t// path\n\t\t\t\t\tCell tail = p;\n\t\t\t\t\twhile (!b.contains(tail) && !road_cells.contains(tail) && !tail.equals(source)) {\n\t\t\t\t\t\toutput.add(new Cell(tail.i, tail.j));\n\t\t\t\t\t\ttail = tail.previous;\n\t\t\t\t\t}\n\t\t\t\t\tif (!output.isEmpty())\n\t\t\t\t\t\treturn output;\n\t\t\t\t} else if (!checked[x.i][x.j] && land.unoccupied(x.i, x.j)) {\n\t\t\t\t\tx.previous = p;\n\t\t\t\t\tqueue.add(x);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tif (output.isEmpty() && queue.isEmpty())\n\t\t\treturn null;\n\t\telse\n\t\t\treturn output;\n\t}", "public abstract IAttackable getEnemyInSearchArea(ShortPoint2D centerPos, IAttackable movable, short minSearchRadius, short maxSearchRadius,\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean includeTowers);", "Map<Coord, ICell> getAllCells();", "public ArrayList<Chromosome> getEliteChromosomes() {\n // SortedMap instead of HashMap? Duplicate key values? \n ArrayList<Chromosome> elites = new ArrayList<Chromosome>();\n// ArrayList<Chromosome> sortedList = this.getChromosomesSorted();\n boolean firstRun = true;\n\n //this.sort();\n Collections.sort(this.chromosomes);\n\n while (elites.size() < Defines.eliteCt) {\n for (Chromosome chromosome : this.chromosomes) {\n if (elites.size() < Defines.eliteCt) {\n if (firstRun && chromosome.isValid()) {\n elites.add(chromosome);\n } else {\n elites.add(chromosome);\n }\n }\n }\n firstRun = false;\n }\n return elites;\n }", "Map<BoardCellCoordinates, Set<Integer>> getWinningCoordinates();", "public static ArrayList<Corner> findCorners(int[][] area, boolean countEdges) {\r\n\t\tArrayList<Corner> corners = new ArrayList<Corner>();\r\n\t\tfor (int i = 0; i < area.length; i++) { // each row\r\n\t\t\tfor (int j = 0; j < area[i].length; j++) { // each column\r\n\t\t\t\tif (area[i][j] == 0) { // it's not a wall - lets test to see if\r\n\t\t\t\t\t\t\t\t\t\t// it's a corner\r\n\t\t\t\t\tif (CornerAnalysis.isCorner(area, i, j, countEdges)) {\r\n\t\t\t\t\t\tCorner c = new Corner(new Vector2(i, j), new Vector2());\r\n\t\t\t\t\t\tif(isDeepCorner(area, c)) { c.setDeep(true); }\r\n\t\t\t\t\t\tcorners.add(c);\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\treturn corners;\r\n\t}", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int area(String[] rectangles){\n TreeMap<Integer, Events> events = new TreeMap<>();\n\n int tag = 0;\n for(String r : rectangles){\n tag++;\n Scanner sc = new Scanner(r);\n int x1 = sc.nextInt();\n int y1 = sc.nextInt();\n int x2 = sc.nextInt();\n int y2 = sc.nextInt();\n if(!events.containsKey(x1))\n events.put(x1, new Events());\n if(!events.containsKey(x2))\n events.put(x1, new Events());\n\n events.get(x1).in.add(new YRange(y1, y2, tag));\n events.get(x2).out.add(new YRange(y1, y2, tag));\n }\n\n // Active set of tags for each unique y\n // we need to identify where each each rectangle starts & end\n // positve tag - start \n // negative tag - end\n // We need all of them sorted\n TreeSet<Pair> active = new TreeSet<Pair>(new Comparator<Pair>(){\n @Override\n public int compare(Pair a, Pair b){\n if(a.y == b.y)\n return Integer.compare(a.tag, b.tag);\n return Integer.compare(a.y, b.y);\n }\n });\n\n int area = 0;\n for(Map.Entry<Integer, Events> entry : events.entrySet()){\n int x = entry.getKey();\n Integer next_x = events.higherKey(x);\n // processed last unique x\n if(next_x == null) break;\n Events e = entry.getValue();\n\n // Construct the current active set\n for(YRange y : e.in){\n active.add(new Pair(y.y1, y.tag));\n active.add(new Pair(y.y2, -y.tag));\n }\n\n for(YRange y : e.out){\n active.remove(new Pair(y.y1, y.tag));\n active.remove(new Pair(y.y2, -y.tag));\n }\n // Compute union of y segments\n Integer lasty = null;\n int ySum = 0;\n int cnt = 0;\n for(Pair p : active){\n int y = p.y;\n if(cnt == 0){\n lasty = y;\n }\n // closing\n if(p.tag < 0) cnt--;\n else cnt++;\n\n if(cnt == 0){\n ySum += y - lasty;\n // reset lasty\n lasty = null;\n }\n }\n area += (next_x - x)*ySum;\n }\n return area;\n }", "public List<Entity> getEntitiesInArea(BoundingBox area)\n\t{\n\t\tList<Entity> entitiesInArea = new ArrayList<Entity>();\n\t\tEntity currentEntity;\n\t\tfor(int i = 0; i < this.entities.size(); ++i)\n\t\t{\n\t\t\tcurrentEntity = this.entities.get(i);\n\t\t\tif(currentEntity.getBoundingBox().offset(currentEntity.getX(), currentEntity.getY()).intersects(area))\n\t\t\t{\n\t\t\t\tentitiesInArea.add(currentEntity);\n\t\t\t}\n\t\t}\n\t\treturn entitiesInArea;\n\t}", "@Override\n\tvoid findArea(double dim1) {\n\t\t\n\t}", "public int area(String[] rectangles){\n TreeMap<Integer, Events> events = new TreeMap<>();\n\n int tag = 0;\n for(String r : rectangles){\n tag++;\n Scanner sc = new Scanner(r);\n int x1 = sc.nextInt();\n int y1 = sc.nextInt();\n int x2 = sc.nextInt();\n int y2 = sc.nextInt();\n if(!events.containsKey(x1))\n events.put(x1, new Events());\n if(!events.containsKey(x2))\n events.put(x2, new Events());\n\n events.get(x1).in.add(new YRange(y1, y2, tag));\n events.get(x2).out.add(new YRange(y1, y2, tag));\n }\n\n // Active set of tags for each unique y\n // we need to identify where each each rectangle starts & end\n // positve tag - start \n // negative tag - end\n // We need all of them sorted\n TreeMap<Integer, TreeSet<Integer>> active = new TreeMap<>();\n int area = 0;\n for(Map.Entry<Integer, Events> entry : events.entrySet()){\n int x = entry.getKey();\n Integer next_x = events.higherKey(x);\n // processed last unique x\n if(next_x == null) break;\n Events e = entry.getValue();\n\n // Construct the current active set\n for(YRange y : e.in){\n if(!active.containsKey(y.y1)) active.put(y.y1, new TreeSet<>());\n if(!active.containsKey(y.y2)) active.put(y.y2, new TreeSet<>());\n\n active.get(y.y1).add(y.tag);\n active.get(y.y2).add(-y.tag);\n }\n for(YRange y : e.out){\n active.get(y.y1).remove(y.tag);\n active.get(y.y2).remove(-y.tag);\n }\n // Compute union of y segments\n Integer lasty = null;\n int ySum = 0;\n int cnt = 0;\n for(Map.Entry<Integer, TreeSet<Integer>> ytags : active.entrySet()){\n int y = ytags.getKey();\n if(cnt == 0){\n lasty = y;\n }\n for(int ytag : ytags.getValue()){\n // closing\n if(ytag < 0) cnt--;\n else cnt++;\n }\n\n if(cnt == 0){\n ySum += y - lasty;\n // reset lasty\n lasty = null;\n }\n }\n area += (next_x - x)*ySum;\n }\n return area;\n }", "public abstract int getPopulation(int west, int south, int east, int north);", "HashSet<Square> pieceLocations(Piece side) {\r\n assert side != EMPTY;\r\n HashSet<Square> squareSides = new HashSet<Square>();\r\n for (Square mapSquare : map.keySet()) {\r\n if (get(mapSquare) == side) {\r\n squareSides.add(mapSquare);\r\n }\r\n }\r\n return squareSides;\r\n }", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public void search(Creature c, Area area){\r\n LinkedList<Point> ary = new LinkedList<>();\r\n boolean searchSuccessful = false;\r\n for(int yPlus=-1;yPlus<2;yPlus++){\r\n for(int xPlus=-1;xPlus<2;xPlus++){\r\n if(yPlus!=0&&xPlus!=0){\r\n ary.add(new Point(c.x+xPlus, c.y+yPlus));\r\n if(area.map[c.y+yPlus][c.x+xPlus] instanceof HiddenTile && ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).hidden){\r\n ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).find(c);\r\n searchSuccessful = true;\r\n }\r\n }\r\n }\r\n }\r\n Main.animator.searchAnimation(ary, searchSuccessful);\r\n }", "public StrictImageFinder(BufferedImage area) {\n bigWidth = area.getWidth();\n bigHeight = area.getHeight();\n bigPixels = new int[bigWidth][bigHeight];\n for(int x = 0; x < bigWidth; x++) {\n for(int y = 0; y < bigHeight; y++) {\n bigPixels[x][y] = area.getRGB(x, y);\n }\n }\n }", "public int[] pick() {\n int key = map.ceilingKey(random.nextInt(areaSum) + 1);\n int[] rectangle = map.get(key);\n\n int length = rectangle[2] - rectangle[0] + 1;\n int breadth = rectangle[3] - rectangle[1] + 1;\n\n //length denotes the no of x coordinates we can have.\n //breadth denotes the no of y coordinates we can have\n\n //random.nextInt gives a random value from x1 - x2-1 which we can add to the current x and we can have a valid x .\n //random.nextInt gives a random value from y1 - y2-1 which we can add to the current y and we can have a valid y .\n\n int x = rectangle[0] + random.nextInt(length);\n int y = rectangle[1] + random.nextInt(breadth);\n\n return new int[]{x, y};\n }", "List<GeoPoint> findGeoIntersections(Ray ray);", "@Override\n public List<Area> getAllAreas() {\n return new ArrayList<>(areas.values());\n }", "public Set<IDiogenAgent> getNeighborhood(IDiogenAgent agent) {\n Set<IDiogenAgent> neighborhood = new HashSet<IDiogenAgent>();\n // for now, only host agent can see the contained agents.\n if (agent == this.hostAgent) {\n neighborhood.addAll(this.getContainedAgents());\n } else if (agent instanceof ICartacomAgent) {\n ICartacomAgent cAgent = (ICartacomAgent) agent;\n for (IAgent target : cAgent.getAgentsSharingRelation()) {\n if (((IDiogenAgent) target).getContainingEnvironments()\n .contains(this)) {\n neighborhood.add((IDiogenAgent) target);\n }\n }\n }\n if (agent instanceof GeographicPointAgent) {\n for (ISubmicroAgent target : ((GeographicPointAgent) agent)\n .getSubmicroAgents()) {\n if (target.getContainingEnvironments().contains(this)) {\n neighborhood.add(target);\n }\n }\n }\n\n return neighborhood;\n\n }", "@Test\r\n\tpublic void testAdjacenciesInsideRooms()\r\n\t{\r\n\t\t// Test a corner\r\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway underneath\r\n\t\ttestList = board.getAdjList(7, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway above\r\n\t\ttestList = board.getAdjList(13, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that is in middle of room\r\n\t\ttestList = board.getAdjList(14, 17);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one beside a door\r\n\t\ttestList = board.getAdjList(6, 16);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one in a corner of room\r\n\t\ttestList = board.getAdjList(10, 15);\r\n\t\tassertEquals(0, testList.size());\r\n\t}", "public void findShips(int game[][]) {\n\t\tint counter =0; // total number of cells searched\n\t\tint count = 0;\n\t\tString carr=\"\"; // Concatenating the carrier strings.\n\t\tString sub = \"\"; // Concatenating the submarines strings.\n\t\t//System.out.println(\"Horizontal is implemented\"+ game);\n\t\tfor(int i=0 ; i<25; i++) {\n\t\t\tfor(int j =0; j<25;j++) {\n\t\t\t\tif(game[i][j]==1) {\n\t\t\t\t\t//System.out.print(\" Found Carrier at (\"+i+\",\"+j+\") \");\n\t\t\t\t\tString a = \"(\"+i+\",\"+j+\")\";\n\t\t\t\t\tcarr = carr.concat(a);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(game[i][j]==2) {\n\t\t\t\t\t//System.out.print(\" Found submarine at (\"+i+\",\"+j+\") \");\n\t\t\t\t\tString b = \"(\"+i+\",\"+j+\")\";\n\t\t\t\t\tsub = sub.concat(b);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tif(count==8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Strategy: Horizontal Sweep\");\n\t\tSystem.out.println(\"Number of cells searched: \"+counter);\n\t\tSystem.out.print(\"Found Carrier at \"+carr+\";\");\n\t\tSystem.out.println(\" Found Sub at \"+sub);\n\t\t\n\t}", "public static void main ( String[] args )\n {\n int[][] grid = new int[][] {{9, 0, 2, 5, 0, 9, 0, 5, 8, 5},\n {4, 8, 1, 7, 0, 5, 3, 6, 2, 0},\n {7, 7, 5, 6, 0, 5, 6, 6, 4, 0},\n {5, 1, 6, 2, 2, 2, 0, 9, 1, 9},\n {0, 7, 8, 9, 0, 7, 4, 3, 8, 6},\n {1, 0, 5, 6, 3, 2, 9, 3, 5, 3},\n {5, 3, 1, 4, 9, 9, 1, 3, 4, 8},\n {5, 6, 9, 9, 7, 8, 7, 3, 9, 3},\n {1, 0, 4, 8, 3, 1, 0, 2, 1, 5},\n {1, 7, 3, 6, 3, 7, 8, 3, 3, 6}};\n int[] rowproduct= new int[10]; //{0,0,....,0}\n int[] colproduct= new int[10];\n for( int i = 0; i < 10; i++)\n {\n rowproduct[i] = 1;\n colproduct[i] = 1;\n }\n int rhp=0;\n int chp=0;\n int rp=0;\n int cp=0;\n int intersection = 0;\n for (int row=0; row < grid.length; row++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[row][col]!=0) // find product\n {\n rowproduct[row] *= grid[row][col];\n colproduct[col] *= grid[row][col];\n }//end if \n }\n }\n for(int i = 0 ;i < 10; i ++)\n {\n if(rowproduct[i]>rhp) //[rows] or [col] ?? row cuz we only compare when it has finished multiplying\n {\n rp=i;\n rhp = rowproduct[i];\n }\n if(colproduct[i]>chp)\n {\n cp=i;\n chp =colproduct[i];\n }\n }\n intersection = grid[rp][cp];\n System.out.println(\"--------------\");\n System.out.println(\"Number replaced = \"+ intersection + \"(Row \" + (rp+1)+\", Col \"+(cp+1) +\")\" );\n System.out.println(\"--------------\");\n for (int rows=0; rows < grid.length; rows++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[rows][col]==0) // locate all zeros\n {\n grid[rows][col]=intersection;\n }\n\n if (grid[rows][col]==intersection) // locate all num intersections \n {\n grid[rows][col]=0;\n }\n System.out.print(grid[rows][col] + \" \");\n }\n System.out.print(\"\\n\");\n }\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "private ArrayList<Point> getNeighbors(Point p) {\n\t\tArrayList<Point> arr = new ArrayList<Point>();\n\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\t\tPoint npoint = new Point( p.x + x, p.y + y);\n\t\t\t\tint sind = spacesContains(npoint);\n\t\t\t\tif ( p.compareTo(npoint) != 0 && sind >= 0 ) { \n\t\t\t\t\tarr.add( spaces.get(sind) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "public abstract HashSet<Location> getPossibleMovements(GameBoard board);", "List<Area> list();", "private HashMap<Coordinate, Coordinate> getAreaIntersectionPt( Geometry gfaPoly )\n\t{\n\t\tHashMap<Coordinate, Coordinate>\tinterPtsPair = new HashMap<Coordinate, Coordinate>();\t\n\n\t\tArrayList<Coordinate> interPts = new ArrayList<Coordinate>();\t\t\n\t\tArrayList<Coordinate> pts;\n\t\tArrayList<Integer> interIndex = new ArrayList<Integer>();\n\t\tArrayList<Integer> indx = new ArrayList<Integer>();\n\t\t\n\t\t//Reorder in clockwise - first point is repeated at the end.\n\t\tArrayList<Coordinate> gfaPoints = new ArrayList<Coordinate>();\n\t\tfor ( Coordinate c : gfaPoly.getCoordinates() ) {\n\t\t\tgfaPoints.add( c );\n\t\t}\n\t\t\n\t\tArrayList<Coordinate> cwGfaPts = GfaSnap.getInstance().reorderInClockwise( gfaPoints, null );\n\t\t\n\t\t//Get all intersection point with FA region common border.\n\t\tHashMap<String, Geometry> areaCommBnds = GfaClip.getInstance().getFaAreaXCommBounds();\t\n\t\tfor ( Geometry bnd : areaCommBnds.values() ) {\n\t\t\tpts = GfaClip.getInstance().lineIntersect( cwGfaPts.toArray( new Coordinate[ cwGfaPts.size() ]), \n\t\t\t\t\t bnd.getCoordinates(), indx );\n\t\t\t\n\t\t\tif ( pts.size() > 0 ) {\n\t\t\t\tinterPts.addAll( pts );\n\t\t\t\tinterIndex.addAll( indx );\n\t\t\t}\n\t\t}\n\n\t\tif ( interPts.size() <= 0 ) {\n\t\t\treturn interPtsPair;\n\t\t}\n\n\t\t/*\n\t\t * Find the area common bound points inside the polygon to ensure\n\t\t * the new snap points will not cluster with these points.\n\t\t */\n\t\t ArrayList<Coordinate> checkPoints = new ArrayList<Coordinate>();\n\t\t for ( Geometry g : areaCommBnds.values() ) {\t\t\t \n\t\t\t for ( Coordinate c : g.getCoordinates() ) {\n\t\t\t\t Geometry pp = GfaClip.getInstance().pointsToGeometry( new Coordinate[]{ c } );\n\t\t\t\t if ( !checkPoints.contains( c ) && pp.within( gfaPoly ) ) {\n\t\t\t\t\t checkPoints.add( c );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t /*\n\t\t * Now insert each common intersection point into the el polygon\n\t\t * and snap it outside of the el polygon.\n\t\t * \n\t\t * Note: the point cannot be any point of the el polygon or any \n\t\t * snap point that has been used.\n\t\t * \n\t\t * If an intersection point is not within the clustering distance of \n\t\t * the point before it (Pb) or point after it (Pa), simply insert it into \n\t\t * the polygon and snap it. Otherwise, do the following:\n\t\t * \n\t\t * 1. Pick the closer one of Pb and Pa as Pn. \n\t\t * 2. Check if Pn is within the clustering distance of the common boundary\n\t\t * points inside the FROM line. \n\t\t * 3. If so, snap Pn to the closest point not within the clustering distance\n\t\t * and match the intersection point and Pn to the new point. \n\t\t * 4. If not, match the intersection point with Pn.\n\t\t */\n\t\t ArrayList<Coordinate> usedPoints = new ArrayList<Coordinate>();\n\t\t usedPoints.addAll( cwGfaPts );\n\t\t \n\t\t ArrayList<Coordinate> ePts = new ArrayList<Coordinate>();\t\t \n\t\t for ( int ii = 0; ii < interPts.size(); ii++ ) {\n\t\t\t \n\t\t Coordinate interP = interPts.get( ii );\n\t\t\t Coordinate ptBefore = cwGfaPts.get( interIndex.get( ii ) );\n\t\t\t Coordinate ptAfter = cwGfaPts.get( interIndex.get( ii ) + 1 );\n\t\t\t \n\t\t\t double qdist1 = GfaSnap.getInstance().distance( interP, ptBefore );\n\t\t\t double qdist2 = GfaSnap.getInstance().distance( interP, ptAfter );\n\n\t\t\t int addOne = -1; \t \n\t\t\t int qmatch = -1;\n\t\t\t double qdist;\n\n\t\t\t if ( qdist1 < qdist2 ) {\n\t\t\t\t qmatch = interIndex.get( ii ); \n\t\t\t\t qdist = qdist1;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t qmatch = interIndex.get( ii ) + 1;\n\t\t\t\t qdist = qdist2;\n\t\t\t }\n\n\t\t\t if ( ( qdist / PgenUtil.NM2M ) < GfaSnap.CLUSTER_DIST ) {\n\n\t\t\t\t Coordinate ptMatch = cwGfaPts.get( qmatch );\n\t\t\t\t for ( Coordinate c : checkPoints ) {\n\t\t\t\t\t if ( GfaSnap.getInstance().isCluster( c, ptMatch ) ) {\n\t\t\t\t\t\t addOne = qmatch;\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \t\t\t\t \n\t\t\t\t if ( addOne < 0 ) {\n\t\t\t\t\t interPtsPair.put( new Coordinate( interP ),\n\t\t\t\t\t\t\t new Coordinate( ptMatch ) );\n\t\t\t\t\t continue; //Done - ptMatch is a snapped point.\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t // Snap\n\t\t\t int kk, kk2;\n\t\t\t if ( addOne >= 0 ) {\n\t\t\t kk = addOne;\n\t\t\t kk2 = kk;\n\n\t\t\t ePts.clear();\n\t\t\t ePts.addAll( cwGfaPts );\n\t\t\t }\n\t\t\t else {\t\t\t\t \n\t\t\t ePts.clear();\n\t\t\t\t ePts.addAll( GfaSnap.getInstance().insertArray( cwGfaPts, interIndex.get( ii ) + 1, interP ) );\n\t\t\t\t kk = interIndex.get( ii ) + 1;\n\t\t\t\t kk2 = kk;\n\t\t\t }\n\n\t\t\t \n\t\t\t ePts.remove( ePts.size() - 1 );\n\t\t\t \n\t\t\t Coordinate[] snapped = new Coordinate[1];\n \n\t\t\t //snap....\n\t\t\t int status = GfaSnap.getInstance().snapPtGFA( kk, kk2, usedPoints, checkPoints, \n\t\t\t\t\t\t ePts, true, true, 3.0F, snapped );\n\t\t\t \n\t\t\t if ( status != 0 ) {\n\t\t\t\t if ( addOne >= 0 ) {\n\t\t\t\t\t snapped[ 0 ] = new Coordinate( ePts.get( kk ) );\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t snapped[ 0 ] = new Coordinate( interP );\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t interPtsPair.put( new Coordinate( interP ), \n\t\t\t new Coordinate( snapped[ 0 ] ) );\n\t\t\t \n\t\t\t if ( addOne >= 0 ) {\n\t\t\t\t interPtsPair.put( new Coordinate( cwGfaPts.get( addOne ) ), \n\t\t new Coordinate( snapped[ 0 ] ) );\t\t\t\t \n\t\t\t }\t\n\t\t\t \n\t\t\t usedPoints.add( snapped[ 0 ] );\n\t\t\t \n\t\t }\n\t\t\n\t\treturn interPtsPair;\n\t}", "@Test\n\tpublic void testAdjacenciesInsideRooms()\n\t{\n\t\t// Test a corner\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that has walkway above\n\t\ttestList = board.getAdjList(7, 19);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that is in middle of room\n\t\ttestList = board.getAdjList(20, 3);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one beside a door\n\t\ttestList = board.getAdjList(18, 11);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one in a edge of board\n\t\ttestList = board.getAdjList(11, 24);\n\t\tassertEquals(0, testList.size());\n\t}", "@Test\n\t\t\tpublic void besidesRoomTests() {\n\t\t\t\t//Testing walkway space that is next to the kitchen with no door\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(6, 1);\n\t\t\t\tassertEquals(3, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 1)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 0)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 2)));\n\t\t\t\t//Testing walkway space that is next to two kitchen spaces with no door\n\t\t\t\ttestList = board.getAdjList(6, 20);\n\t\t\t\tassertEquals(2, testList.size());\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 20)));\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 19)));\n\t\t\t\t//Testing walkway space that is between two room spaces and an edge\n\t\t\t\ttestList = board.getAdjList(20, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(19, 15)));\n\t\t\t\tassertEquals(1, testList.size());\n\n\t\t\t}", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "private void fillShotsArea(int[][] shots, int x, int y) {\n for (int i = x; inSea(i) && shots[i][y] == 4; i--) fillAreaAround(shots, i, y);\n for (int i = x; inSea(i) && shots[i][y] == 4; i++) fillAreaAround(shots, i, y);\n for (int i = y; inSea(i) && shots[x][i] == 4; i--) fillAreaAround(shots, x, i);\n for (int i = y; inSea(i) && shots[x][i] == 4; i++) fillAreaAround(shots, x, i);\n }", "@Override\n\tpublic List<Goodsarea> findAllArea() {\n\t\treturn null;\n\t}", "public native int kbAreaGetNumberFogTiles(int areaID);", "static int findIslands(ArrayList<ArrayList<Integer>> a, int N, int M)\n {\n \n // Your code here\n int island_count = 0;\n for(int i=0;i<N;i++){\n for(int j=0;j<M;j++){\n if(a.get(i).get(j) == 1){\n island_count++;\n explore_island(a, i, j);\n }\n }\n }\n \n return island_count;\n \n }", "public int infectNeighbours(Map map);", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "private void fillAreaAround(int[][] shots, int x, int y) {\n for (int i = putInSea(x - 1); i <= putInSea(x + 1); i++)\n for (int j = putInSea(y - 1); j <= putInSea(y + 1); j++)\n if (shots[i][j] == 0) shots[i][j] = 1;\n }", "public SetOfTiles getSetOfTiles();", "public static void main(String[] args) {\n\t\t\n\t\tfindArea(2, 5, 4);\n\t}", "public static ArrayList<int[]> getDissatisfiedCellCoords(int[][] grid) {\n ArrayList<int[]> dissatisfiedCells = new ArrayList<int[]>();\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n\n if (grid[i][j] != 0) {\n\n int totalCells = 0, totalSatisfactory = 0;\n\n for (int k = i - 1; k <= i + 1; k++) {\n for (int l = j - 1; l <= j + 1; l++) {\n if (k > -1 && l > -1 && k < grid.length && l < grid.length) {\n if (k != i || l != j) {\n totalCells++;\n if (grid[k][l] == grid[i][j]) {\n totalSatisfactory++;\n }\n }\n }\n }\n }\n\n double percentSatisfied = (double)totalSatisfactory / (double)totalCells;\n\n if (percentSatisfied < PERCENT_SATISFIED) {\n int[] arr = {i, j};\n dissatisfiedCells.add((int)(Math.random() * dissatisfiedCells.size()), arr);\n }\n }\n\n }\n \n }\n\n return dissatisfiedCells;\n }", "private boolean isAllAreaAchievable() throws ReachabilityException {\n\t\t\n\t\t// mark all points that the player should reach as 1, else as 0\n\t\tint[][] tempMap = new int[height][width];\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\tif (mapElementArray[i][j] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i][j] instanceof Teleporter\n\t\t\t\t\t\t|| mapElementArray[i][j] instanceof PlayerSpawnPoint)\n\t\t\t\t\ttempMap[i][j] = 1;\n\t\t\t\telse\n\t\t\t\t\ttempMap[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//try to reach all area\n\t\treachAllValidPoint(tempMap, aPlayerSpawnPointRow, aPlayerSpawnPointCol);\n\t\t\n\t\t//check if all area have been reached\n\t\tint unreachablePoint = 0;\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\tif (tempMap[i][j] == 1) {\n\t\t\t\t\tunreachablePoint++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t\ttry {\n\t\t\tif (unreachablePoint > 0) {\n\t\t\t\tSystem.out.println(unreachablePoint + \" points are unreachable\");\n\t\t\t\tthrow new ReachabilityException();\n\t\t\t}else {\n\t\t\t\treturn true;\n\t\t\t}\n\t/*\t} catch (ReachabilityException e) {\n\t\t\tSystem.out.println(e);\n\t\t\t//print out map with invalid area\n\t\t\tfor (int i = 0; i < height; i++) {\n\t\t\t\tfor (int j = 0; j <width; j++) {\n\t\t\t\t\tSystem.out.print(tempMap[i][j]);\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t\treturn false;\n\t\t}*/\n\n\t}", "private List<Cell> getBananaAffectedCell(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 2; i <= x + 2; i++) {\n for (int j = y - 2; j <= y + 2; j++) {\n // Don't include the current position\n if (isValidCoordinate(i, j) && euclideanDistance(i, j, x, y) <= 2) {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n\n return cells;\n }", "static void countApplesAndOranges(int houseStartPoint, int houseEndPoint, int appleTreeLocation,\n\t\t\tint orangeTreeLocation, int[] applesDistanceFromTheTree, int[] orangesDistanceFromTheTree) {\n\t\tint applesInTheHouse = 0;\n\t\tint orangesInTheHouse = 0;\n\n\t\tfor (int i = 0; i < applesDistanceFromTheTree.length; i++) {\n\t\t\tint appleDistanceFromTheTree = applesDistanceFromTheTree[i];\n\t\t\tint appleAbsolutePosition = appleDistanceFromTheTree + appleTreeLocation;\n\n\t\t\tif (appleAbsolutePosition >= houseStartPoint && appleAbsolutePosition <= houseEndPoint) {\n\t\t\t\tapplesInTheHouse++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < orangesDistanceFromTheTree.length; i++) {\n\t\t\tint orangeDistanceFromTheTree = orangesDistanceFromTheTree[i];\n\t\t\tint orangeAbsolutePosition = orangeDistanceFromTheTree + orangeTreeLocation;\n\n\t\t\tif (orangeAbsolutePosition >= houseStartPoint && orangeAbsolutePosition <= houseEndPoint) {\n\t\t\t\torangesInTheHouse++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(applesInTheHouse);\n\t\tSystem.out.println(orangesInTheHouse);\n\t}", "private int[] generate(int[] cells) {\n // Placeholder\n int[] newCells = new int[cells.length];\n\n // Boundary-elements, simply ignoring them..\n for (int x = 1; x < cells.length - 1; x++) {\n\n // Neighborhood\n int left = cells[x - 1];\n int mid = cells[x];\n int right = cells[x + 1];\n\n int newState = next(left, mid, right);\n\n newCells[x] = newState;\n }\n\n return newCells;\n }", "public static ArrayList<XYCoord> findPossibleDestinations(Unit unit, GameMap gameMap, boolean includeOccupiedSpaces)\n {\n ArrayList<XYCoord> reachableTiles = new ArrayList<XYCoord>();\n\n if( null == unit || unit.x < 0 || unit.y < 0 )\n {\n System.out.println(\"WARNING! Finding destinations for ineligible unit!\");\n return reachableTiles;\n }\n\n // set all locations to false/remaining move = 0\n int[][] costGrid = new int[gameMap.mapWidth][gameMap.mapHeight];\n for( int i = 0; i < gameMap.mapWidth; i++ )\n {\n for( int j = 0; j < gameMap.mapHeight; j++ )\n {\n costGrid[i][j] = Integer.MAX_VALUE;\n }\n }\n\n // set up our search\n SearchNode root = new SearchNode(unit.x, unit.y);\n costGrid[unit.x][unit.y] = 0;\n Queue<SearchNode> searchQueue = new java.util.PriorityQueue<SearchNode>(13, new SearchNodeComparator(costGrid));\n searchQueue.add(root);\n // do search\n while (!searchQueue.isEmpty())\n {\n // pull out the next search node\n SearchNode currentNode = searchQueue.poll();\n // if the space is empty or holds the current unit, highlight\n Unit obstacle = gameMap.getLocation(currentNode.x, currentNode.y).getResident();\n if( obstacle == null || obstacle == unit || includeOccupiedSpaces ) // expandSearchNode will throw out spaces occupied by enemies\n {\n reachableTiles.add(new XYCoord(currentNode.x, currentNode.y));\n }\n\n expandSearchNode(unit, gameMap, currentNode, searchQueue, costGrid, false);\n\n currentNode = null;\n }\n\n return reachableTiles;\n }", "public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight) {\n/* 17 */ int[] var5 = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);\n/* 18 */ int[] var6 = IntCache.getIntCache(areaWidth * areaHeight);\n/* */ \n/* 20 */ for (int var7 = 0; var7 < areaHeight; var7++) {\n/* */ \n/* 22 */ for (int var8 = 0; var8 < areaWidth; var8++) {\n/* */ \n/* 24 */ initChunkSeed((var8 + areaX), (var7 + areaY));\n/* 25 */ var6[var8 + var7 * areaWidth] = (var5[var8 + var7 * areaWidth] > 0) ? (nextInt(299999) + 2) : 0;\n/* */ } \n/* */ } \n/* */ \n/* 29 */ return var6;\n/* */ }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public Set<Square> validDestinations(Board b);", "private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }", "private Set<IntVector2D> canAttackFromDestination() {\n\t\tif(activePath == null || !pf.isValidPath(activePath))\n\t\t\treturn new HashSet<>();\n\t\tGameCharacter gc = getUnitAt(activePath.get(0)).getEnclosed();\n\t\tboolean ranged = gc.isRanged();\n\t\tboolean melee = gc.isMelee();\n\t\tAlignment atkSide = gc.getSide();\n\t\tSet<IntVector2D> attackable = new HashSet<>();\n\t\tint x = activePath.get(activePath.size() - 1).getX();\n\t\tint y = activePath.get(activePath.size() - 1).getY();\n\t\tif(ranged) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 2, y));\n\t\t\tarr.add(new IntVector2D(x - 2, y));\n\t\t\tarr.add(new IntVector2D(x, y + 2));\n\t\t\tarr.add(new IntVector2D(x, y - 2));\n\t\t\tarr.add(new IntVector2D(x + 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x + 1, y - 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\tif(melee) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 1, y));\n\t\t\tarr.add(new IntVector2D(x - 1, y));\n\t\t\tarr.add(new IntVector2D(x, y + 1));\n\t\t\tarr.add(new IntVector2D(x, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\treturn attackable;\n\t}", "public static int find_land (int a [][], int x, int y){\r\n int count_land = 0;\r\n for (int i = 0; i < x; i++){\r\n for (int j = 0; j < y; j++){\r\n if (a[i][j] > 0){\r\n count_land ++;\r\n //x[i][j] = 0;\r\n check_island(i, j);\r\n }\r\n }\r\n }\r\n return count_land;\r\n }", "public Set<Coordinate> getAllSurroundingCellsAsCoordinates() {\n Set<MapCoordinate> mapCoordinates = getAllSurroundingCellsAsMapCoordinatesStartingFromTopLeft(1);\n return mapCoordinates\n .stream()\n .map(mapCoordinate -> mapCoordinate.toCoordinate())\n .collect(\n Collectors.toSet()\n );\n }", "@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}", "int countPowertypeRanges();", "public static void main(String[] args) {\n int[][] rooms = new int[4][4];\n int INF = Integer.MAX_VALUE;\n int[] p0 = {INF, -1, 0, INF};\n int[] p1 = {INF, INF, INF, -1};\n int[] p2 = {INF, -1, INF, -1};\n int[] p3 = {0, -1, INF, INF};\n rooms[0] = p0;\n rooms[1] = p1;\n rooms[2] = p2;\n rooms[3] = p3;\n wallsAndGates(rooms);\n\n\n }", "public native int kbAreaGetNumberBorderAreas(int areaID);", "public ArrayList<? extends Puzzle> getNeighbors();", "int getAreaCount();", "int getAreaCount();", "int getAreaCount();", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "private ArrayList<Integer> commonEdges(ArrayList<HashMap<Integer,Integer>> table, ArrayList<Integer> pool, int city_id){\n ArrayList<Integer> subPool = new ArrayList<Integer>();\n\n //Find the higest amount of common edges in the pool using the table hashmaps\n //Realistically, this should only be at most 2\n int most_common_edges = 0;\n for(int i = 1; i <= 2; i++){\n if(table.get(city_id).containsValue(i) && most_common_edges < i){\n most_common_edges = i;\n }\n }\n\n for(int i = 0; i < pool.size(); i++){\n if(table.get(city_id).get(pool.get(i)) == most_common_edges){\n subPool.add(pool.get(i));\n }\n }\n\n //If all options have no edges left, return the original list\n if(subPool.size() <= 0){\n return pool;\n }\n\n return subPool;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(findSubset(30, new int[]{2,3,7,8,10}));\n\n\t}", "public HashMap<Integer, Ticket> queryAreaTicketsMap(int areaId) {\n\t\tHashMap<Integer, Ticket> tickets = new HashMap<Integer, Ticket>();\n\t\t\n\t\ttry {\n\t\t\tfor(Ticket ticket : queryAreaTickets(areaId)){\n\t\t\t\ttickets.put(ticket.getId(), ticket);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn tickets;\n\t}", "@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}", "public void loadHotels();", "public Stream<Area> extractBounds() {\n if (getPolygonsAsJson() != null && !getPolygonsAsJson().trim().equalsIgnoreCase(\"[]\")) {\n ObjectMapper mapper = new ObjectMapper();\n try {\n @SuppressWarnings(\"unchecked\")\n ArrayList<LinkedHashMap<String, Double>> bounds = (ArrayList<LinkedHashMap<String, Double>>) mapper.readValue(getPolygonsAsJson(), ArrayList.class);\n return bounds.stream().map(entry -> new Area(entry.get(LEFT), entry.get(TOP), entry.get(RIGHT), entry.get(BOTTOM)));\n } catch (IOException e) {\n throw new EmbryonicException(\"Error parsing json for InterestOfAreas\", e);\n }\n }\n return Stream.empty();\n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "private List<Rectangle> getRectanglesToConsiderForBranchingVarCalculation () {\r\n \r\n List<Rectangle> rectanglesToConsider = new ArrayList<Rectangle> ();\r\n \r\n //for every constraint, see if it has rects at the best lp\r\n \r\n for (Map <Double, List<Rectangle>> rectMap: myInfeasibleRectanglesList) {\r\n for (List<Rectangle> rectList : rectMap.values()) { \r\n \r\n rectanglesToConsider.addAll(rectList );\r\n \r\n } \r\n }\r\n \r\n return rectanglesToConsider;\r\n }", "public native int kbAreaGetNumberBlackTiles(int areaID);", "public static int recurseAndFillBuckets(int[] heights, int area) {\n\t\tint newArea = area;\n\t\tint[] newHeights = heights.clone();\n\t\tfor(int i = 1; i < heights.length - 1; i++) { // No need to check the first and last for bucketness\n\t\t\tif(!checkOpenOnLeft(heights, i) && !checkOpenOnRight(heights, i)) {\n\t\t\t\tnewArea++;\n\t\t\t\tnewHeights[i]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(newArea == area)\n\t\t\treturn newArea;\n\t\telse\n\t\t\treturn recurseAndFillBuckets(newHeights, newArea);\n\t}", "@Override\r\n public void getRange(ArrayList<Piece> pieces){\r\n this.range.clear();\r\n int pieceX = this.getX(); int pieceY = this.getY(); // X and Y coordinates for the king piece\r\n\r\n // getPiece: 0 = empty; 1 = same color; 2 = opposite color\r\n //Up\r\n if (this.getPiece(pieceX, pieceY+1, pieces) == 0 || this.getPiece(pieceX, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Up-right\r\n if (this.getPiece(pieceX+1, pieceY+1, pieces) == 0 || this.getPiece(pieceX+1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Right\r\n if (this.getPiece(pieceX+1, pieceY, pieces) == 0 || this.getPiece(pieceX+1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Down-right\r\n if (this.getPiece(pieceX+1, pieceY-1, pieces) == 0 || this.getPiece(pieceX+1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX+1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down\r\n if (this.getPiece(pieceX, pieceY-1, pieces) == 0 || this.getPiece(pieceX, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Down-left\r\n if (this.getPiece(pieceX-1, pieceY-1, pieces) == 0 || this.getPiece(pieceX-1, pieceY-1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY-1}); // Return int[] of tested coordinates\r\n\r\n //Left\r\n if (this.getPiece(pieceX-1, pieceY, pieces) == 0 || this.getPiece(pieceX-1, pieceY, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY}); // Return int[] of tested coordinates\r\n\r\n //Up-left\r\n if (this.getPiece(pieceX-1, pieceY+1, pieces) == 0 || this.getPiece(pieceX-1, pieceY+1, pieces) == 2)\r\n this.range.add(new int[] {pieceX-1, pieceY+1}); // Return int[] of tested coordinates\r\n\r\n //Castling\r\n for (Piece piece : pieces) {\r\n if (piece instanceof Rook) {\r\n if (piece.getColor() == this.getColor()) {\r\n if (validCastling(pieces, (Rook)piece)) {\r\n int targetX = (piece.getX() < getX()) ? (this.getX() - 2) : (this.getX() + 2);\r\n this.range.add(new int[] {targetX, this.getY()});\r\n }\r\n }\r\n }\r\n }\r\n }", "public native int kbAreaGetNumberVisibleTiles(int areaID);", "protected abstract void getAllUniformLocations();", "public static void test(String args[]) {\n int[][] input = {{1,1,1,1,1,1,1,0},{1,0,0,0,0,1,1,0},{1,0,1,0,1,1,1,0},{1,0,0,0,0,1,0,1},{1,1,1,1,1,1,1,0}};\n int[][] input2 = {{0,0,1,0,0},{0,1,0,1,0},{0,1,1,1,0}};\n int[][] input3 = {{1,1,1,1,1,1,1},\n {1,0,0,0,0,0,1},\n {1,0,1,1,1,0,1},\n {1,0,1,0,1,0,1},\n {1,0,1,1,1,0,1},\n {1,0,0,0,0,0,1},\n {1,1,1,1,1,1,1}};\n System.out.println(closedIsland(input));\n System.out.println(closedIsland(input2));\n System.out.println(closedIsland(input3));\n }", "public Iterable<Point2D> range(RectHV rect) {\n ArrayList<Point2D> returnArray = new ArrayList<Point2D>();\n if (rect == null) {\n throw new IllegalArgumentException(\"rect input is null\");\n }\n for (Point2D i : pointsSet) {\n if (rect.contains(i))\n returnArray.add(i);\n }\n return returnArray;\n }", "public static Object[] ticket_combo(int l, Set<Set<Object>> ticket_indices_powerset, Object[] all_number_subset_array, Object[] winning_number_subset_array) {\n \n Set<Object> curr_t = new HashSet<Object>(); //carries one ticket\n Set<Object> set_to_buy = new HashSet<Object>(); //carries one winning combo\n Set<Object> curr_win_combo = new HashSet<Object>(); //carries one ticket combo\n \n boolean has_winning = false;\n int match_count = 0;\n int ticket_amount_count = all_number_subset_array.length; //smallest amount of tickets needed so far\n \n // a combo to possibly buy\n for(Set<Object> curr_indices_subset : ticket_indices_powerset) {\n int curr_num_tickets_to_buy = curr_indices_subset.toArray().length;\n if(ticket_amount_count <= curr_num_tickets_to_buy && has_winning)\n {\n continue;\n }\n //copy a winning array\n Object[] winning_number_subset_array_copy = Arrays.copyOf(winning_number_subset_array, winning_number_subset_array.length);\n //setup a counter of uncovered winning combos\n int uncovered_winning_possibilities = winning_number_subset_array_copy.length;\n Object[] curr_indices_subset_array = curr_indices_subset.toArray();\n \n //take each ticket in a combo\n for(Object curr_index : curr_indices_subset_array) {\n int curr_index_int = ((Integer) curr_index).intValue() - 1;\n curr_t = (java.util.HashSet<java.lang.Object>) all_number_subset_array[curr_index_int];\n \n //see which winning combos you can cross out\n for(int i = 0; i < winning_number_subset_array_copy.length; i++) {\n match_count = 0;\n curr_win_combo = (java.util.HashSet<java.lang.Object>) winning_number_subset_array[i];\n if (winning_number_subset_array_copy[i] instanceof Integer)\n {\n continue;\n }\n \n for(Object combo_num : curr_win_combo) {\n for(Object ticket_num : curr_t) {\n if(((Integer)combo_num).intValue() == ((Integer)ticket_num).intValue())\n {\n match_count++;\n }\n }\n }\n if(match_count >= l)\n {\n uncovered_winning_possibilities--;\n winning_number_subset_array_copy[i] = 0;\n }\n }\n }\n //after ticket combo loop\n if((uncovered_winning_possibilities == 0) && (!has_winning || (curr_num_tickets_to_buy < ticket_amount_count)))\n {\n has_winning = true;\n ticket_amount_count = curr_num_tickets_to_buy;\n set_to_buy = curr_indices_subset;\n \n }\n }\n Object[] final_ticket_indeces = set_to_buy.toArray();\n return final_ticket_indeces;\n }", "public int charArea(char ch) {\n\t\tint westPoint = 0;\n\t\tint eastPoint = 0;\n\t\tint northPoint = 0;\n\t\tint southPoint = 0;\n\t\tboolean firstOccur = true;\n\t\t\n\t\tfor(int row = 0; row < grid.length; row++) {\n\t\t\tfor(int col = 0; col < grid[0].length; col++) {\n\t\t\t\tif(grid[row][col] == ch) {\n\t\t\t\t\tif(firstOccur) {\n\t\t\t\t\t\twestPoint = col;\n\t\t\t\t\t\teastPoint = col;\n\t\t\t\t\t\tnorthPoint = row;\n\t\t\t\t\t\tsouthPoint = row;\n\t\t\t\t\t\tfirstOccur = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twestPoint = Math.min(westPoint, col);\n\t\t\t\t\t\teastPoint = Math.max(eastPoint, col);\n\t\t\t\t\t\tnorthPoint = Math.min(northPoint, row);\n\t\t\t\t\t\tsouthPoint = Math.max(southPoint, row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint area = (eastPoint - westPoint + 1) * (southPoint - northPoint + 1);\n\t\tif(firstOccur) return 0;\n\t\treturn area; \n\t}", "public interface IMapArea extends Iterable<ShortPoint2D>, Serializable {\n\t/**\n\t * Checks whether the given position is contained by the shape.\n\t * <p>\n\t * It is not guaranteed that they are also on the map.\n\t * \n\t * @param position\n\t * The position.\n\t */\n\tboolean contains(ShortPoint2D position);\n\n\tboolean contains(int x, int y);\n\n\t/**\n\t * Gets an iterator for the shape that returns all tiles that are contained by this shape.\n\t * <p>\n\t * The iterator iterates over all positions for which {@link #contains(ShortPoint2D)} returns true and returns each position exactly one.\n\t * \n\t * @return An Iterator over the area in the shape.\n\t */\n\t@Override\n\tIterator<ShortPoint2D> iterator();\n\n\tCoordinateStream stream();\n}" ]
[ "0.58685505", "0.57036626", "0.57036626", "0.5506996", "0.54500043", "0.53746873", "0.5323553", "0.53182626", "0.5268077", "0.526708", "0.5219042", "0.51983404", "0.5190684", "0.5173304", "0.51676434", "0.5089988", "0.50760734", "0.5066357", "0.50593984", "0.5053867", "0.50483483", "0.5044247", "0.50404483", "0.50391656", "0.50373936", "0.50299203", "0.5025164", "0.5016507", "0.5016358", "0.50028247", "0.4990229", "0.49895188", "0.4983537", "0.49757665", "0.49620104", "0.4958586", "0.49543792", "0.49510872", "0.4929204", "0.49183396", "0.49167216", "0.48922235", "0.4883123", "0.48768955", "0.487516", "0.4866433", "0.4861494", "0.485307", "0.48521245", "0.48438278", "0.48140243", "0.48090047", "0.47923896", "0.4791804", "0.47840077", "0.47840005", "0.47816825", "0.47803178", "0.47781217", "0.47747692", "0.4768638", "0.4767664", "0.47574034", "0.47508374", "0.47497723", "0.47460538", "0.47453532", "0.47429407", "0.4741914", "0.47360957", "0.4721112", "0.47199246", "0.47064924", "0.4697656", "0.46880034", "0.46857542", "0.46788162", "0.4676329", "0.46759167", "0.46759167", "0.46759167", "0.46756312", "0.4675077", "0.4669605", "0.46619675", "0.46570608", "0.46495575", "0.4639354", "0.46370646", "0.4633762", "0.46272296", "0.46272257", "0.46271613", "0.46270812", "0.46216235", "0.46183524", "0.46141744", "0.4612017", "0.4604231", "0.46036875" ]
0.52768743
8
Finds all hotels within the full address:
public void searchAreaFull(Connection connection, String city, String state, int zip) throws SQLException{ ResultSet rs = null; String sql = "SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ? AND state = ? AND zip = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setCity(city); pStmt.setString(1, getCity()); setState(state); pStmt.setString(2, getState()); setZip(zip); pStmt.setInt(3, getZip()); try { System.out.println(" Hotels in area:"); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}", "public List<Address> findAll();", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "public HotelCard searchAdjacentHotels(Board board, Tuple res) {\n ArrayList<HotelCard> hotels = board.getHotels();\n ArrayList<HotelCard> adjacent_hotels = new ArrayList<>();\n ArrayList<Integer> ids = new ArrayList<>();\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // Presentation of player's adjacent hotels\n System.out.println(ANSI() + \"Here are the available adjacent hotels:\" + ANSI_RESET);\n // right\n x1 = res.a;\n y1 = res.b + 1;\n // up \n x2 = res.a - 1;\n y2 = res.b;\n // left\n x3 = res.a;\n y3 = res.b - 1; \n // down\n x4 = res.a + 1;\n y4 = res.b;\n \n if (isNum(board.board[x1][y1]) != -1) {\n ids.add(isNum(board.board[x1][y1]));\n }\n if (isNum(board.board[x2][y2]) != -1) {\n ids.add(isNum(board.board[x2][y2]));\n }\n if (isNum(board.board[x3][y3]) != -1) {\n ids.add(isNum(board.board[x3][y3]));\n }\n if (isNum(board.board[x4][y4]) != -1) {\n ids.add(isNum(board.board[x4][y4]));\n }\n for (int id : ids) {\n for (HotelCard hc : hotels) {\n if (hc.getID() == id) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET); \n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET); \n adjacent_hotels.add(hc); \n }\n }\n }\n\n // Choose one adjacent hotel\n System.out.println(\"Please type the id of the hotel you want to buy\");\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : adjacent_hotels) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n }\n }\n return null;\n }", "public List<UrlAddress> searchDBUrl() {\n log.info(new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(new Date()) + \"find all url address\");\n List<UrlAddress> all = urlRepository.findAll();\n return all;\n }", "Set<MacAddress> neighbors();", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public Cursor fetchAllHotels() {\r\n\r\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE,\r\n KEY_NAME, KEY_DESC, KEY_ADDR, KEY_MINS, KEY_RATE, KEY_PHONE, KEY_WEB }, null, null, null, null, null, null);\r\n }", "java.lang.String getHotelAddress();", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Set<IDiogenAgent> getNeighborhood(IDiogenAgent agent) {\n Set<IDiogenAgent> neighborhood = new HashSet<IDiogenAgent>();\n // for now, only host agent can see the contained agents.\n if (agent == this.hostAgent) {\n neighborhood.addAll(this.getContainedAgents());\n } else if (agent instanceof ICartacomAgent) {\n ICartacomAgent cAgent = (ICartacomAgent) agent;\n for (IAgent target : cAgent.getAgentsSharingRelation()) {\n if (((IDiogenAgent) target).getContainingEnvironments()\n .contains(this)) {\n neighborhood.add((IDiogenAgent) target);\n }\n }\n }\n if (agent instanceof GeographicPointAgent) {\n for (ISubmicroAgent target : ((GeographicPointAgent) agent)\n .getSubmicroAgents()) {\n if (target.getContainingEnvironments().contains(this)) {\n neighborhood.add(target);\n }\n }\n }\n\n return neighborhood;\n\n }", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public Data getDataContaining(Address addr);", "private Response getAddressList( String term )\n {\n\n ReferenceList list = null;\n try\n {\n if ( \"RestAddressService\".equals( AddressServiceProvider.getInstanceClass( ) ) )\n {\n list = AddressServiceProvider.searchAddress( null, term );\n }\n\n }\n catch( RemoteException e )\n {\n AppLogService.error( e );\n }\n\n if ( list == null )\n {\n _logger.error( Constants.ERROR_NOT_FOUND_RESOURCE );\n return Response.status( Response.Status.NOT_FOUND )\n .entity( JsonUtil.buildJsonResponse( new ErrorJsonResponse( Response.Status.NOT_FOUND.name( ), MSG_ERROR_GET_ADDRESSES ) ) ).build( );\n }\n\n return Response.status( Response.Status.OK ).entity( JsonUtil.buildJsonResponse( new JsonResponse( list ) ) ).build( );\n }", "private static String[] getHotelAdress(String city, String state,\n\t\tString country) throws SAXException, IOException,\n\t\tParserConfigurationException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(hotelServiceURL + \"&city=\" + city\n\t\t\t+ \"&stateProvinceCode=\" + state + \"&countryCode=\" + country\n\t\t\t+ \"&apiKey=utf2pd8jsm9mr6mmfxyjqeq9\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList list = doc.getElementsByTagName(\"HotelSummary\");\n\n\t\tNode hotel = list.item(0);\n\n\t\tNodeList hotelInfo = hotel.getChildNodes();\n\n\t\tString[] out = { hotelInfo.item(2).getTextContent(),\n\t\t\thotelInfo.item(3).getTextContent(),\n\t\t\thotelInfo.item(4).getTextContent() };\n\n\t\treturn out;\n\t}", "public List<String> searchByStreet(String street) {\n if (street == null)\n throw new NullPointerException();\n List<String> searchResult = new ArrayList<>();\n Set<Map.Entry<String, Address>> allAddress = addressBook.entrySet();\n for (Map.Entry<String, Address> currentAddress : allAddress) {\n String currentStreet = currentAddress.getValue().getStreet();\n if (currentStreet.equals(street))\n searchResult.add(currentAddress.getKey());\n }\n return searchResult;\n }", "public void loadHotels();", "List<?> getAddress();", "com.google.protobuf.ByteString\n getHotelAddressBytes();", "@GetMapping()\n\t@Override\n\tpublic List<Address> findAll() {\n\t\treturn addressService.findAll();\n\t}", "public MapCell[] getNeighbors(){\n\t\tMapCell[] neighbors = new MapCell[4];\n\t\tneighbors[0] = getNeighbor(\"east\");\n\t\tneighbors[1] = getNeighbor(\"north\");;\n\t\tneighbors[2] = getNeighbor(\"west\");\n\t\tneighbors[3] = getNeighbor(\"south\");\n\t\treturn neighbors;\n\t}", "public void findStreets() {\r\n\t\tpolygonMap.resetStreets();\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tfor (int i = 0; i < island.getRoads().length; i++) {\r\n\t\t\tif (buildStreetIsAllowed(island.getRoads()[i])\r\n\t\t\t\t\t&& !isWaterStreet(island.getRoads()[i])) {\r\n\t\t\t\tpolygonMap.addStreet(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Location> neighbors (Location pos);", "public void searchArea(Connection connection, String city, String state, int zip) throws SQLException {\n\n ResultSet rs = null;\n PreparedStatement pStmt = null;\n String sql1 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?\";\n String sql2 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n String sql3 = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n\n // City and State combination:\n if (city != null && state != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql2);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setState(state);\n pStmt.setString(2, getState());\n }\n\n // City and ZIP combination:\n else if (city != null){\n\n pStmt = connection.prepareStatement(sql1 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n // State and ZIP combination:\n else {\n\n pStmt = connection.prepareStatement(sql2 + \" INTERSECT \" + sql3);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n setZip(zip);\n pStmt.setInt(2, getZip());\n }\n\n try {\n\n System.out.println(\" Hotels in area:\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n String result;\n\n while (rs.next()) {\n\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public void searchAreaState(Connection connection, String state) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n\n try {\n\n System.out.printf(\" Hotels in %s:\\n\", getState());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "public List<PeerAddress> allOverflow() {\n List<PeerAddress> all = new ArrayList<PeerAddress>();\n for (Map<Number160, PeerStatistic> map : peerMapOverflow) {\n synchronized (map) {\n for (PeerStatistic peerStatistic : map.values()) {\n all.add(peerStatistic.peerAddress());\n }\n }\n }\n return all;\n }", "public StringList lookupAddresses(String name) throws UnknownHostException\n {\n StringList names=new StringList(); \n // cached lookup \n InetAddress[] addres = lookup(name); \n \n for (InetAddress addr:addres)\n {\n // only add unique address\n names.add(addr.getHostAddress(),true); // getHostName()); \n }\n \n return names; \n }", "public static List<Address> getAddressesFromGeoCoder(Context context,double latitude,double longitude,int addressesToReturn) {\n List<Address> listOfAddresses = null;\n Geocoder gc=new Geocoder(context);\n try {\n listOfAddresses = gc.getFromLocation(latitude, longitude, addressesToReturn);\n\n //This is a test of more than one zip code - will give us 10023 & 10024\n //listOfAddresses = gc.getFromLocation(40.782891, -73.983085, addressesToReturn);\n } catch (IOException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n catch (IllegalArgumentException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n //Could be empty or null - we don't want to return null\n if (listOfAddresses==null){\n listOfAddresses=new ArrayList<>();\n }\n return listOfAddresses;\n }", "private void searchmap() {\n String location = \"475 Dien bien phu\";\n //lcSearch;\n\n if (location != null && !location.equals(\"\")) {\n List<Address> lstAddress = null;\n try {\n lstAddress = geocoder.getFromLocationName(location, 1);\n System.out.print(lstAddress);\n if (lstAddress != null) {\n double lat = lstAddress.get(0).getLatitude();\n double lng = lstAddress.get(0).getLongitude();\n LatLng latLng = new LatLng(lat, lng);\n goToMaps(latLng);\n } else {\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "@Test\n\tpublic void listLocations(){\n\t\tList<Location> lists = locationService.queryLoctionsByLat(29.8679775, 121.5450105);\n\t\t//System.out.println(lists.size()) ;\n\t\tfor(Location loc : lists){\n\t\t\tSystem.out.println(loc.getAddress_cn());\n\t\t}\n\t}", "AllUsersAddresses getAllUsersAddresses();", "@SuppressWarnings(\"unchecked\") \n public List<ZipLocation> getZipCodeLocations(String city, int start, int chunkSize){\n EntityManager em = emf.createEntityManager();\n String pattern = \"'\"+city.toUpperCase()+\"%'\";\n Query query = em.createQuery(\"SELECT z FROM ZipLocation z where UPPER(z.city) LIKE \"+pattern);\n List<ZipLocation> zipCodeLocations = query.setFirstResult(start).setMaxResults(chunkSize).getResultList();\n em.close();\n return zipCodeLocations;\n }", "public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}", "List<Address> findByState(String state);", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "public Employee[] findEmployeesByAddress(Employee[] ea, String addr){\n\t\tEmployee[] temp = new Employee[ea.length];\n\t\tEmployee[] result = null;\n\t\tint count = 0;\n\t\t\n\t\tint[] index = new int[ea.length];\n\t\t\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(ea[i].getAddress().equals(addr)){\n\t\t\t\ttemp[i] = ea[i];\n\t\t\t} else {\n\t\t\t\tindex[i] = i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tint a = count;\n\t\tresult = new Employee[ea.length-a];\n\t\tfor(int i = 0; i < ea.length; i++){\n\t\t\tif(i == index[i])\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\telse if( i >= result.length)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\telse{\n\t\t\t\tresult[i] = ea[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn result;\n\t}", "private static Iterable<Cell> getNeighbors(Grid<Cell> grid, Cell cell) {\n\t\tMooreQuery<Cell> query = new MooreQuery<Cell>(grid, cell);\n\t\tIterable<Cell> neighbors = query.query();\n\t\treturn neighbors;\n\t}", "public ArrayList<Cell> findPlacesToGiveBirth() {\r\n\r\n // Randomly choose the number of babies.\r\n int numOfBabyToBeBorn = new Random().nextInt(this.numOfBaby()) + 1;\r\n\r\n ArrayList<Cell> newEmpty = this.getNeighbours(1);\r\n Collections.shuffle(newEmpty);\r\n\r\n ArrayList<Cell> placeToBeBorn = new ArrayList<Cell>();\r\n\r\n int countEmptyCell = 0;\r\n\r\n for (int findEmpt = 0; findEmpt < newEmpty.size()\r\n && countEmptyCell < numOfBabyToBeBorn; findEmpt++, countEmptyCell++) {\r\n if (newEmpty.get(findEmpt).getInhabit() == null \r\n && isTerrainAccessiable(newEmpty.get(findEmpt))) {\r\n placeToBeBorn.add(newEmpty.get(findEmpt));\r\n }\r\n }\r\n return placeToBeBorn;\r\n }", "@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(BookingActivity.this);\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return addresses;\n }", "List<Address> findByStateIn(List<String> stateList);", "public void searchAreaCity(Connection connection, String city) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE city = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCity(city);\n pStmt.setString(1, getCity());\n\n try {\n\n System.out.printf(\" Hotels in %s:\\n\", getCity());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public ArrayList<Chromosome> getEliteChromosomes() {\n // SortedMap instead of HashMap? Duplicate key values? \n ArrayList<Chromosome> elites = new ArrayList<Chromosome>();\n// ArrayList<Chromosome> sortedList = this.getChromosomesSorted();\n boolean firstRun = true;\n\n //this.sort();\n Collections.sort(this.chromosomes);\n\n while (elites.size() < Defines.eliteCt) {\n for (Chromosome chromosome : this.chromosomes) {\n if (elites.size() < Defines.eliteCt) {\n if (firstRun && chromosome.isValid()) {\n elites.add(chromosome);\n } else {\n elites.add(chromosome);\n }\n }\n }\n firstRun = false;\n }\n return elites;\n }", "@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 10 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 10);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "boolean hasAddressList();", "public Vector<NetworkAddress> getHostAddresses(int type) {return addressesChecker.getAllMyAddresses(type); }", "public List<Address> getGeocoderAddress(Context context, double latitude, double longitude, int maxAddresses ) {\n if (location != null) {\n\n Geocoder geocoder = new Geocoder(context, Locale.ENGLISH);\n\n try {\n /**\n * Geocoder.getFromLocation - Returns an array of Addresses\n * that are known to describe the area immediately surrounding the given latitude and longitude.\n */\n List<Address> addresses = geocoder.getFromLocation(latitude, longitude, maxAddresses);\n\n return addresses;\n } catch (IOException e) {\n //e.printStackTrace();\n }\n }\n\n return null;\n }", "Map<Coord, ICell> getAllCells();", "@Override\r\n\tpublic List<Adress> findAllAdress() {\n\t\treturn em.createNamedQuery(\"findAllAdress\", Adress.class).getResultList();\r\n\t}", "@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n \n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }", "@ApiOperation(value = \"retourne la liste des habitants vivant à l’adresse donnée\")\n @GetMapping(\"/fire\")\n public PersonsInFirestationAddressResponse getPeopleInFirestationAddress(@RequestParam String address){\n return firestationService.getPeopleByFirestationAddress(address);\n }", "@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }", "@Override\n\tpublic List<Cell> getImmediateNeighbors(Cell cell) {\n\t\tList<Cell> neighbors = new ArrayList<Cell>();\n\t\tint north, east, south, west;\n\t\t\n\t\tnorth = getNorthCell(cell);\n\t\teast = getEastCell(cell);\n\t\tsouth = getSouthCell(cell);\n\t\twest = getWestCell(cell);\n\t\t\n\t\tif (north != -1) { neighbors.add(getCellList().get(north)); }\n\t\tif (east != -1) { neighbors.add(getCellList().get(east)); }\n\t\tif (south != -1) { neighbors.add(getCellList().get(south)); }\n\t\tif (west != -1) { neighbors.add(getCellList().get(west)); }\n\t\t\n\t\treturn neighbors;\n\t}", "public static List<Address> search(String value) throws SQLException, Exception {\n\n String sql = \"SELECT * FROM address WHERE (UPPER(publicplace) LIKE UPPER(?) AND enabled=?)\";\n\n List<Address> listAddress = null;\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result = null;\n try {\n //Opens a connection to the DB\n con = ConnectionUtils.getConnection();\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql);\n\n stmt.setString(1, \"%\" + value + \"%\");\n stmt.setBoolean(2, true);\n\n result = stmt.executeQuery();\n\n while (result.next()) {\n\n if (listAddress == null) {\n listAddress = new ArrayList<Address>();\n }\n\n // Create a Address instance and population with BD values\n Address address = new Address();\n\n address.setId(result.getInt(\"id\"));\n PublicPlaceType publicPlaceType = DAOPublicPlaceType.get(result.getInt(\"publicplace_type_id\"));\n address.setPublicPlaceType(publicPlaceType);\n City city = DAOCity.get(result.getInt(\"city_id\"));\n address.setCity(city);\n address.setNumber(result.getInt(\"number\"));\n address.setComplement(result.getString(\"complement\"));\n address.setDistrict(result.getString(\"district\"));\n address.setZipcode(result.getInt(\"zipcode\"));\n\n // Add the instance in the list\n listAddress.add(address);\n }\n } finally {\n ConnectionUtils.finalize(result, stmt, con);\n }\n\n return listAddress;\n }", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override public ArrayList<Location> neighbors(final Location id) {\n ArrayList<Location> neighbours = new ArrayList<>();\n for (Location direction : directions){\n\n Location position = new Location(direction.x + id.x, direction.y + id.y);\n\n if (inBounds(position) && isPassable(position))\n neighbours.add(position);\n }\n return neighbours;\n }", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public Hotel(String name, String address) {\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t}", "void FindLstn (int boardID, short[] addrlist, short[] results, int limit);", "public static ArrayList<XYCoord> findPossibleDestinations(Unit unit, GameMap gameMap, boolean includeOccupiedSpaces)\n {\n ArrayList<XYCoord> reachableTiles = new ArrayList<XYCoord>();\n\n if( null == unit || unit.x < 0 || unit.y < 0 )\n {\n System.out.println(\"WARNING! Finding destinations for ineligible unit!\");\n return reachableTiles;\n }\n\n // set all locations to false/remaining move = 0\n int[][] costGrid = new int[gameMap.mapWidth][gameMap.mapHeight];\n for( int i = 0; i < gameMap.mapWidth; i++ )\n {\n for( int j = 0; j < gameMap.mapHeight; j++ )\n {\n costGrid[i][j] = Integer.MAX_VALUE;\n }\n }\n\n // set up our search\n SearchNode root = new SearchNode(unit.x, unit.y);\n costGrid[unit.x][unit.y] = 0;\n Queue<SearchNode> searchQueue = new java.util.PriorityQueue<SearchNode>(13, new SearchNodeComparator(costGrid));\n searchQueue.add(root);\n // do search\n while (!searchQueue.isEmpty())\n {\n // pull out the next search node\n SearchNode currentNode = searchQueue.poll();\n // if the space is empty or holds the current unit, highlight\n Unit obstacle = gameMap.getLocation(currentNode.x, currentNode.y).getResident();\n if( obstacle == null || obstacle == unit || includeOccupiedSpaces ) // expandSearchNode will throw out spaces occupied by enemies\n {\n reachableTiles.add(new XYCoord(currentNode.x, currentNode.y));\n }\n\n expandSearchNode(unit, gameMap, currentNode, searchQueue, costGrid, false);\n\n currentNode = null;\n }\n\n return reachableTiles;\n }", "List<Building> findBuildingCoordinatesByType(String type);", "public List<Location> searchLocations(String search) {\n Query query = entityManager.createQuery(\"select loc from Location loc where loc.code like :search or loc.name like :search or loc.shortName like :search order by loc.locationId\");\r\n query.setParameter(\"search\", \"%\" + search + \"%\");\r\n return query.getResultList();\r\n\t\t/*\r\n Session session = (Session) getEntityManager().getDelegate();\r\n Criteria crit = session.createCriteria(Location.class);\r\n // If this is not set in a hibernate many-to-many criteria query, we'll get multiple results of the same object\r\n crit.setResultTransformer(Criteria.ROOT_ENTITY);\r\n Criterion name = Restrictions.ilike(\"name\", \"%\" + search + \"%\");\r\n Criterion shortName = Restrictions.ilike(\"shortName\", \"%\" + search + \"%\");\r\n Criterion code = Restrictions.ilike(\"code\", \"%\" + search + \"%\");\r\n Criterion shortCode = Restrictions.ilike(\"shortCode\", \"%\" + search + \"%\");\r\n LogicalExpression orExpName = Restrictions.or(name,shortName);\r\n LogicalExpression orExpCode = Restrictions.or(code,shortCode);\r\n LogicalExpression orExpNameCode = Restrictions.or(orExpName,orExpCode);\r\n crit.add(orExpNameCode);\r\n return crit.list();\r\n */\r\n\t}", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "protected ArrayList<String> search(String key) {\n addresses = map.get(key);\n if (addresses == null) {\n return null;\n }\n return addresses;\n }", "@Override\n\tpublic List<Adresse> findAllAdresse() {\n\t\treturn dao.findAllAdresse();\n\t}", "protected abstract Collection<Street> findConnectedStreets(\r\n StreetNode streetNode);", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public interface AddressFinderService {\n Set<Address> findAddresses(String postcode);\n}", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "List<City> findCities();", "@Override\r\n\tpublic List<Map<String, String>> selectAddressList() {\n\t\treturn ado.selectAddressList();\r\n\t}", "private List<Address> collectLocationAddresses(APDataCollection apData) {\n\t\tint numLocations = apData.getCount(ICommlAutoConstants.LOCATION_XPATH);\n\t\tList<Address> addresses = new ArrayList<Address>(numLocations);\n\n\t\t// Loop through the Location aggregates in the ap data\n\t\tfor (int locationIndex = 0; locationIndex < numLocations; locationIndex++) {\n\n\t\t\t// Create an Address object for each one (containing just the\n\t\t\t// address information.\n\t\t\tAddress address = new Address(apData, ICommlAutoConstants.LOCATION_XPATH, new int[] { locationIndex });\n\t\t\tString id = apData.getFieldValue(ICommlAutoConstants.LOCATION_ID_XPATH, locationIndex, \"\");\n\n\t\t\t// add an id to any location missing one. We need id's on the\n\t\t\t// location so we can link\n\t\t\t// the vehicles back to them.\n\t\t\tif (isEmpty(id)) {\n\t\t\t\tid = apData.generateUID();\n\t\t\t\tapData.setFieldValue(ICommlAutoConstants.LOCATION_ID_XPATH, locationIndex, id);\n\t\t\t}\n\t\t\taddress.setID(id);\n\t\t\taddresses.add(address);\n\t\t}\n\t\treturn addresses;\n\t}", "public abstract List<Direction> searchForCheese(Maze maze);", "public Friend findFriend(Address addr);", "@Override\n\tpublic List<Hotel> listar() {\n\t\treturn null;\n\t}", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "public Data getDefinedDataContaining(Address addr);", "public HotelCard searchHotel() {\n System.out.println(ANSI() + \"Here is your hotel card list:\" + ANSI_RESET);\n // Presentation of player's hotel card list\n for (HotelCard hc : hotel_list) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET);\n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET);\n }\n System.out.println(ANSI() + \"Please type the id of the hotel you choose\" + ANSI_RESET);\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : hotel_list) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET); \n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid ID\" + ANSI_RESET);\n }\n }\n // Junk \n return null;\n }", "public void searchAreaZIP(Connection connection, int zip) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setZip(zip);\n pStmt.setInt(1, getZip());\n\n try {\n\n System.out.printf(\" Hotels in %d:\\n\", getZip());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "private void fillExplorePlaces(boolean exploreAll) {\n Set<BuildingModel> borderBuildings = new FastSet<BuildingModel>();\n Set<BuildingModel> allBuildings = new FastSet<BuildingModel>();\n\n borderBuildings.add(fireBrigadeTarget.getTarget());\n allBuildings.add(fireBrigadeTarget.getTarget());\n\n if (exploreAll) {\n Set<StandardEntity> entitySet = new FastSet<StandardEntity>(fireBrigadeTarget.getFireZone().getBorderEntities());\n entitySet.removeAll(fireBrigadeTarget.getFireZone().getIgnoredBorderEntities());\n\n for (StandardEntity entity : entitySet) {\n borderBuildings.add(world.getBuildingModel(entity.getID()));\n allBuildings.add(world.getBuildingModel(entity.getID()));\n }\n }\n for (BuildingModel neighbour : borderBuildings) {\n for (BuildingModel b : neighbour.getConnectedBuilding()) {\n if (world.getDistance(b.getSelfBuilding().getID(), neighbour.getSelfBuilding().getID()) < world.getViewDistance()) {\n allBuildings.add(b);\n }\n }\n }\n\n exploreTargets = FireSearchTools.findMaximalCovering(allBuildings);\n\n target = null;\n }", "public List<Address> listAddress()\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address order by address.id asc\").list();\n\n return result;\n }", "public String getHotelAddress() {\n\t\treturn this.address;\n\t}", "public List<Neighbour> getAvailableHosts() {\n return new ArrayList<>(routes.keySet());\n }", "io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList getAddressList();", "public List<Address> getAllAddressesByName(String user_name) {\n\t\tList<Address> address = new ArrayList<>();\r\n\t\taddressdao.findByUserUsername(user_name)\r\n\t\t.forEach(address::add);\r\n\t\treturn address;\r\n\t}", "public ArrayList<AddressEntry> searchByPostalAddress(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPostalAddress().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public ArrayList<HexLocation> getShuffledLocations() {\n\t\t\n\t\tArrayList<HexLocation> locations = new ArrayList<>();\n\t\t\n\t\tHex[][] h = hexGrid.getHexes();\n\t\tlocations.add(h[4][1].getLocation());\n\t\tlocations.add(h[2][2].getLocation());\n\t\tlocations.add(h[5][2].getLocation());\n\t\tlocations.add(h[1][2].getLocation());\n\t\tlocations.add(h[4][3].getLocation());\n\t\tlocations.add(h[3][1].getLocation());\n\t\tlocations.add(h[3][4].getLocation());\n\t\tlocations.add(h[3][5].getLocation());\n\t\tlocations.add(h[5][1].getLocation());\n\t\tlocations.add(h[2][1].getLocation());\n\t\tlocations.add(h[5][3].getLocation());\n\t\tlocations.add(h[2][3].getLocation());\n\t\tlocations.add(h[4][2].getLocation());\n\t\tlocations.add(h[3][2].getLocation());\n\t\tlocations.add(h[4][4].getLocation());\n\t\tlocations.add(h[1][3].getLocation());\n\t\tlocations.add(h[3][3].getLocation());\n\t\tlocations.add(h[2][4].getLocation());\n\t\t\n\t\tCollections.shuffle(locations);\n\t\treturn locations;\n\t}", "private static Address getOfficialByAddress(String address) throws Exception {\n\t\tString USER_AGENT = \"Mozilla/5.0\";\n\n\t\tString name = \"\", country = \"US\", zip = \"\", city = \"\", state = \"\", line1 = \"\", line2 = \"\";\n\t\tAddress to = null;\n\t\t// Replaces all strings with '%20' for URL completion\n\t\taddress = address.replace(\" \", \"%20\");\n\t\tString urlString = \"https://www.googleapis.com/civicinfo/v2/representatives?key=AIzaSyAEU9J6KzUL_gXPGi-4S6XekJuEC0JRWjA&address=\" + address;\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\t// By default it is GET request\n\t\tcon.setRequestMethod(\"GET\");\n\t\t//add request header\n\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\n\t\t// Reading response from input Stream\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t \n\t\tString output;\n\t\tStringBuffer response = new StringBuffer();\n\t\twhile ((output = in.readLine()) != null) {\n\t\t\tresponse.append(output);\t\n\t\t}\n\t\tin.close();\n\t\t\n\t\t// Constructs JSONOBject to parse the response\n\t\tJSONObject object = new JSONObject(response.toString());\n\t\tJSONArray addresses = object.getJSONArray(\"officials\");\n\t\t\n\t\t// Takes array of individuals response and selects last index of it by default (may be optimized for more specific selections)\n\t\tJSONObject person = addresses.getJSONObject(addresses.length()-1);\n\t\tJSONArray fields = person.getJSONArray(\"address\");\n\t\tJSONObject addressTo = fields.getJSONObject(0);\n\t\t\t\t\n\t\tif(person.has(\"name\"))\n\t\t\tname = person.getString(\"name\");\n\t\t\n\t\tif(addressTo.has(\"zip\"))\n\t\t\tzip = addressTo.getString(\"zip\");\n\t\t\n\t\tif(addressTo.has(\"city\"))\n\t\t\tcity = addressTo.getString(\"city\");\n\t\t\n\t\tif(addressTo.has(\"state\"))\n\t\t\tstate = addressTo.getString(\"state\");\n\t\t\n\t\tif(addressTo.has(\"line2\"))\n\t\t\tline2 = addressTo.getString(\"line2\");\n\t\t\n\t\tif(addressTo.has(\"line1\"))\n\t\t\t line1 = addressTo.getString(\"line1\");\n\t\t\n\t\tto = new Address(name, country, zip, city, state, line2, line1);\n\t\t\n\n\t\treturn to;\n\t\t\n\t \n\t }", "public abstract Set<Tile> getNeighbors(Tile tile);", "public List<Address> getAllAddresses() throws BackendException;", "Map<String, String> findAllInMap();", "public Weet[] getWeetsContaining(String query) {\n Weet[] a = tree.toArray(query);\n\n if (a.length != 0) {\n return a;\n }\n return null;\n }", "List<Coord> allActiveCells();", "@Override\r\n\t\t\tprotected List<Address> doInBackground(String... locationName) {\n\t\t\t\tGeocoder geocoder = new Geocoder(getBaseContext());\r\n\t\t\t\tList<Address> addresses = null;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Getting a maximum of 3 Address that matches the input text\r\n\t\t\t\t\taddresses = geocoder.getFromLocationName(locationName[0], 3);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\treturn addresses;\r\n\t\t\t}", "public static ArrayList<Neighbourhood> generateNeighbourhoods() {\n People p1 = new People(\"Peter\", \"Smith\");\n People p2 = new People(\"Anna\", \"Hunter\");\n ArrayList<People> people = new ArrayList<People>();\n people.add(p1); people.add(p2);\n\n Post post1 = new Post(p1,\"Babysitter needed\",\"Hi we need a Babysitter for next Friday. Please send me a private message if you are interested. Pay is 5 pound per hour\");\n Post post2 = new Post(p1,\"Car for sale\");\n Post post3 = new Post(p2,\"Looking for plumber\");\n Post post4 = new Post(p2,\"Free beer\");\n\n ArrayList<Post> posts = new ArrayList<Post>();\n posts.add(post1);posts.add(post2);posts.add(post3);posts.add(post4);\n\n\n Neighbourhood n1 = new Neighbourhood(\"Partick\");\n n1.setPosts(posts);\n n1.setMembers(people);\n Neighbourhood n2 = new Neighbourhood(\"West End\");\n n2.setPosts(posts);\n n2.setMembers(people);\n ArrayList<Neighbourhood> neighbourhoods = new ArrayList<Neighbourhood>();\n neighbourhoods.add(n1);\n neighbourhoods.add(n2);\n return neighbourhoods;\n }" ]
[ "0.61394894", "0.5995871", "0.565677", "0.564416", "0.56099916", "0.55329007", "0.5518731", "0.55141324", "0.54481184", "0.5432516", "0.54150164", "0.53121275", "0.52964276", "0.52584374", "0.52491844", "0.52480185", "0.52410585", "0.522357", "0.521863", "0.51936233", "0.5185822", "0.51836175", "0.51696575", "0.5166228", "0.51608694", "0.51477087", "0.514506", "0.5137663", "0.51262534", "0.512517", "0.5123393", "0.5111058", "0.50992537", "0.5095361", "0.5083716", "0.50836694", "0.50709504", "0.50687605", "0.50563", "0.50526696", "0.5052667", "0.50522953", "0.5046224", "0.5031892", "0.5027327", "0.50124705", "0.50102955", "0.49929202", "0.49813253", "0.49766362", "0.49758676", "0.49685183", "0.4964852", "0.49591154", "0.49589026", "0.495168", "0.49451953", "0.4938618", "0.49380618", "0.49318376", "0.4931083", "0.49305645", "0.4929858", "0.49282607", "0.49169305", "0.49133873", "0.49132907", "0.49115083", "0.49057388", "0.49040124", "0.49031812", "0.49019754", "0.49008566", "0.48985526", "0.48982537", "0.48947406", "0.48810178", "0.48804304", "0.4878947", "0.48761672", "0.48731405", "0.48602772", "0.48548627", "0.4851878", "0.48423433", "0.484227", "0.48336166", "0.4806701", "0.48035586", "0.48031598", "0.4794832", "0.47875854", "0.47841948", "0.478244", "0.47817832", "0.4780025", "0.47794363", "0.477927", "0.47688547", "0.47677428" ]
0.5810135
2
Finds all the room types available at a specified hotel:
public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException { ResultSet rs = null; String sql = "SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setHotelName(hotel_name); pStmt.setString(1, getHotelName()); setBranchID(branch_ID); pStmt.setInt(2, getBranchID()); try { System.out.printf(" Room types available at %S, branch ID (%d)", getHotelName(), getBranchID()); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2)); } } catch (SQLException e) { throw e; } finally { pStmt.close(); if(rs != null) { rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<HotelroomPo> getHotelroomByroomType(String roomType) {\n\t\t\n\t\tList<HotelroomPo> hotelrooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getRoomType().equals(roomType))\n\t\t\t\thotelrooms.add(hotelroomPo);\n\t\t}\n\t\treturn hotelrooms;\n\t}", "public List<Room> findAllRooms();", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}", "public void searchHotels(String location, String noOfRoomAndTravellers){\r\n\t\thotelLink.click();\r\n\t\tWaitHelper wait = new WaitHelper(driver);\r\n\t\twait.waitElementTobeClickable(driver, localityTextBox, 20).click();\r\n\t\tlocalityTextBox.clear();\r\n\t\tlocalityTextBox.sendKeys(location);\r\n\t\t\r\n\t\tWebElement allOptions = wait.setExplicitWait(driver, By.xpath(\"//ul[@id='ui-id-1']\"),20);\r\n\t\tList<WebElement> allOptionsResult = allOptions.findElements(By.xpath(\"./li\"));\r\n\t\tallOptionsResult.get(1).click();\r\n\t\tcheckInDate.click();\r\n\t\tcurrentDate.click();\r\n\t\twait.waitElementTobeClickable(driver, nextDate, 20).click();\r\n\t\tnew Select(travellerSelection).selectByVisibleText(noOfRoomAndTravellers);\r\n searchButton.click();\r\n\t}", "public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "private RoomType[] getRoomTypeStrings()\r\n\t{\r\n\t\treturn bCtrl.getAllRoomTypes().stream().toArray(RoomType[]::new);\r\n\t}", "public List<Room> getByType(int idRoomType) {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room_type=\" + idRoomType);\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "public static ArrayList<Room> getTypicalRooms() {\n return new ArrayList<>(Arrays.asList(BEST_ROOM, WORST_ROOM));\n }", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "private ArrayList<Room> roomAvailability(LocalDate start, LocalDate end, int small, int medium, int large) {\n ArrayList<Room> availableRooms = new ArrayList<Room>();\n // Iterate for all rooms in the venue\n for (Room room : rooms) {\n // Search the venue's reservations that contain the specified room.\n ArrayList<Reservation> reservationsWithRoom = Reservation.searchReservation(reservations, room);\n // Try to find rooms that fulfil the request.\n switch(room.getSize()) {\n case \"small\":\n // Ignore if no small rooms are needed.\n if (small > 0) {\n // If there no reservations with the room or the reserved dates do not\n // overlap, then add the room sinced it is available.\n if(reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n\n availableRooms.add(room);\n small--;\n } \n }\n break;\n\n case \"medium\":\n // Ignore if no medium rooms are needed.\n if (medium > 0) {\n \n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n medium--;\n }\n }\n break;\n\n case \"large\":\n // Ignore if no large rooms ar eneeded.\n if (large > 0) {\n if (reservationsWithRoom.size() == 0 ||\n !Reservation.hasDateOverlap(reservationsWithRoom, start, end)) {\n \n availableRooms.add(room);\n large--;\n }\n break;\n }\n }\n }\n // A request cannot be fulfilled if there are no rooms available in the venue\n if (small > 0 || medium > 0 || large > 0) {\n \n return null;\n } else {\n return availableRooms;\n }\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "public abstract List<LocationDto> search_type_building\n (BuildingDto building, LocationTypeDto type);", "private Rooms getRooms(boolean sociallyDistanced, LocalDateTime time, LocalDateTime endTime, Modules module) {\n // Get viable rooms\n Session s = HibernateUtil.getSessionFactory().openSession();\n CriteriaBuilder cb = s.getCriteriaBuilder();\n CriteriaQuery<Rooms> cq = cb.createQuery(Rooms.class);\n Root<Rooms> root = cq.from(Rooms.class);\n ParameterExpression<Integer> spacesNeeded = cb.parameter(Integer.class);\n if (sociallyDistanced) {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"socialDistancingCapacity\"), spacesNeeded));\n } else {\n cq.select(root).where(cb.greaterThanOrEqualTo(root.get(\"maxCapacity\"), spacesNeeded));\n }\n\n root.join(\"bookings\", JoinType.LEFT);\n root.fetch(\"bookings\", JoinType.LEFT);\n\n Query<Rooms> query = s.createQuery(cq);\n query.setParameter(spacesNeeded, module.getStudents().size());\n\n List<Rooms> results = query.getResultList();\n\n s.close();\n\n\n Map<String, Rooms> possibleRooms = new HashMap<>();\n\n for (Rooms room : results) {\n if (room.isAvailable(time, endTime) && !possibleRooms.containsKey(room.getRoomID())) {\n System.out.println(\" \" + room.getRoomID() + \" of type \" + room.getType() + \" is available and meets your capacity needs.\");\n possibleRooms.put(room.getRoomID(), room);\n }\n }\n\n System.out.println(\"Please enter the room ID you would like to book.\");\n String roomKey = sc.next();\n while (!possibleRooms.containsKey(roomKey)) {\n System.out.println(\"That is not a correct ID for a room. Look at the list above.)\");\n roomKey = sc.next();\n }\n sc.nextLine();\n\n return possibleRooms.get(roomKey);\n }", "@Query(\"from Room where occupied = :occ and hotel_id = :hotelId\")\n\tList<Room> findOccupied(@Param(\"occ\") boolean occupied, @Param(\"hotelId\") long id);", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "@GetMapping(\"/{hotelId}/rooms\")\n public ResponseEntity<Resources<RoomResource>> getRoomsForHotelId(@PathVariable Long hotelId){\n\n return new ResponseEntity<>(\n hotelService.findRoomsByHotelId(hotelId),HttpStatus.OK\n );\n }", "ArrayList<Restaurant> getRestaurantListByType(String type);", "@Override\r\n\tpublic List<HouseType> queryAllHtype() {\n\t\treturn adi.queryAllHtype();\r\n\t}", "@Override\n\tpublic List<HotelroomPo> getHotelroomByHotelID(int hotelID) {\n\t\t\n\t\tList<HotelroomPo> rooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getHotelID()==hotelID)\n\t\t\t\trooms.add(hotelroomPo);\n\t\t}\n\t\treturn rooms;\n\t}", "@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {\n\t\tList<Room> returned = new ArrayList<>();\t\t\n\t\tfor (Room room : roomDB)\n\t\t\tif (room.getBuilding().equals(building))\n\t\t\t\treturned.add(room);\n\t\treturn returned;\n\t}", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}", "public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }", "public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }", "public List<Room> occupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = numOfRooms; i < internalList.size(); i++) {\n if (internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n\n return rooms;\n }", "public Set<Room> getRooms() {\n return rooms;\n }", "public static Room findAvailableRoom(Room[] room1, String roomType) {\n\t\tfor (int i =0; i< room1.length; i++) {\n\t\t\tif(room1[i].getType().equals(roomType) && room1[i].getAvailability()) {\n\t\t\t\treturn room1[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<CalendarRoom> getRooms(String sType) throws IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getRooms&token=\"+sSecurityToken+\"&type=\"+sType);\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "List<Building> findBuildingCoordinatesByType(String type);", "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public Cursor fetchAllHotels() {\r\n\r\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE,\r\n KEY_NAME, KEY_DESC, KEY_ADDR, KEY_MINS, KEY_RATE, KEY_PHONE, KEY_WEB }, null, null, null, null, null, null);\r\n }", "private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }", "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }", "private void get_rooms() throws FileNotFoundException\n {\n Scanner room_all = new Scanner(new FileInputStream(db_rooms));\n room_all.nextLine();\n while(room_all.hasNextLine())\n {\n String [] searcher = (room_all.nextLine()).split(\"\\\"\");\n if(!searcher[7].equals(\"empty\"))\n data_set.add(new Room(searcher[3], searcher[5], (searcher[7].equals(\"booked\") ? 1 : 2), Integer.valueOf(searcher[1])));\n else\n data_set.add(new Room(Integer.valueOf(searcher[1])));\n }\n room_all.close();\n }", "public void loadHotels();", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "List<ReportType> findTypes();", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}", "@Override\r\n\tpublic List<HotelArea> queryHotelArea(HotelAreaQuery query) {\n\t\tList<HotelArea> hotelAreaLs = hotelAreaDao.selectEntityList(query);\r\n\t\treturn hotelAreaLs;\r\n\t}", "public ArrayList getRooms();", "@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}", "public String getRoomType() {\n\t\treturn \"class room\";\n\t}", "@GET\n @Produces(\"application/json\")\n @Path(\"/building/id/{id}\")\n public static List<CRoom> roomsByBuilding(@PathParam(\"id\") final int pId) {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(\n CRoom.FIND_ROOMS_BY_BUILDING, QueryParameter.with(\"Pid\", pId).parameters());\n }", "public List<LogRoomTypeHistory>getAllRoomTypeHistory(TblRoomType roomType);", "public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo, String sType)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&type=\"+sType+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetails(TenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=?\",occupiedBy);\n\t\treturn rooms;\n\t}", "@CrossOrigin\n\t@GetMapping(\"/INSA/{building}/{room}/floor\")\n\tpublic List<String> getRoomFloor(@PathVariable String building, @PathVariable String room) {\n\t\tList<String> returned = new ArrayList<>();\t\n\t\t\n\t\tfor (Room aRoom : roomDB) {\n\t\t\tif (aRoom.getName().equals(room) && aRoom.getBuilding().equals(building)) {\n\t\t\t\tswitch (aRoom.getFloor()) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturned.add(\"rdc\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturned.add(\"1st\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturned.add(\"2nd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturned.add(\"3rd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturned.add(aRoom.getFloor() + \"th\"); \t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (returned.size() == 0) \n\t\t\treturned.add(\"404\");\n\t\treturn returned;\n\t}", "public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}", "List<Clothes> getByOffice(OfficeType officeType);", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }", "public static ArrayList<AvailableHotelRoom> SearchByStar(int Star) {\n\t\tArrayList<AvailableHotelRoom> nAHR = new ArrayList<AvailableHotelRoom>();\n\t\tfor (AvailableHotelRoom ahr : AHR)\n\t\t\tif (ahr.getHotelStar() == Star)\n\t\t\t\tnAHR.add(ahr);\n\t\treturn nAHR;\n\t}", "public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}", "private void loadAvailableRooms() {\n\n\t\texecutor.submit(() -> {\n\t\t\troomResultsTable.setVisible(false);\n\t\t\tprogress.setVisible(true);\n\t\t\troom.clear();\n\t\t\thotel.clear();\n\t\t\tquality.clear();\n\t\t\trooms = FXCollections.observableArrayList(dbParser.checkAvailableRoomsBetweenDates(arrivalDate.toEpochDay(),\n\t\t\t\t\tdepartureDate.toEpochDay(), hotelChoice.getName(), roomQualityChoice.getQuality()));\n\t\t\troomResultsTable.setItems(rooms);\n\t\t\tprogress.setVisible(false);\n\t\t\troomResultsTable.setVisible(true);\n\t\t});\n\n\t}", "public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\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\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "private static void initialise(Room[] hotel) {\n for (int x = 0; x < hotel.length; x++) {\n hotel[x].setName(\"Empty\");\n }\n }", "public List<Room> getRooms() {\n return rooms;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetailsIncludingVacantRooms(\n\t\t\tTenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms1=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=? \",occupiedBy);\n\t\tList<PropertyRooms> rooms2=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",'N');\n\t\t\n\t\trooms1.addAll(rooms2);\n\t\t\n\t\treturn rooms1;\n\t}", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public void populateRooms(){\n }", "public String getRoomTypeId() {\n return this.room_type_id;\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public RoomType getRoomType() {\r\n\t\treturn this.type;\r\n\t}", "public String getRoomtype() {\r\n\t\treturn roomtype;\r\n\t}", "@Override\n\tpublic List<PropertyRooms> findRoomByIsOccupied(char isOccupied) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",isOccupied);\n\t\treturn rooms;\n\t}", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "@SuppressWarnings(\"all\")\n @Override\n public List<RoomEntity> getFreeRooms(final OrderEntity order) {\n\n String hql =\"FROM RoomEntity R WHERE R.hotel=:hotel AND R.category=:category AND R.size=:sizze AND R NOT IN \" +\n \"(SELECT O.room FROM OrderEntity O WHERE O.hotel=:hotel AND NOT \" +\n \"((O.startDate<:startDate AND O.endDate<:startDate) OR (O.startDate>:endDate AND O.endDate>:endDate)))\";\n\n Query query=getSession().createQuery(hql);\n query.setParameter(\"startDate\", order.getStartDate());\n query.setParameter(\"endDate\", order.getEndDate());\n query.setParameter(\"sizze\", order.getPlaces());\n query.setParameter(\"category\", order.getRoomCategory());\n query.setParameter(\"hotel\", order.getHotel());\n List<RoomEntity> rooms=query.list();\n\n return rooms;\n }", "@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}", "private List<String> getCombinedFacilities(Hotel hotel) {\n List<String> hotelFacilities = hotel.getFacilities() != null ? Arrays.asList(hotel.getFacilities().split(\",\")) : new ArrayList<>();\n List<String> facilities = new ArrayList<>(hotelFacilities);\n if (hotel.getRooms() != null && hotel.getRooms().size() > 0) {\n List<String> roomsFacilities = hotel.getRooms().stream()\n .filter(room -> !room.isDeleted())\n .map(room -> room.getFacilities() != null ? Arrays.asList(room.getFacilities().split(\",\")) : new ArrayList<String>())\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n facilities.addAll(roomsFacilities);\n }\n return facilities;\n }", "public static void createGameRooms()\r\n\t{\r\n\t\tfor(int i = 0; i < MAX_FIREWORKS_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"fireworks_\" + i, new VMKGameRoom(\"fireworks_\" + i, \"Fireworks Game \" + i, \"\"));\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < MAX_PIRATES_ROOMS; i++)\r\n\t\t{\r\n\t\t\taddRoom(\"pirates_\" + i, new VMKGameRoom(\"pirates_\" + i, \"Pirates Game \" + i, \"\"));\r\n\t\t}\r\n\t}", "@GetMapping\n public RoomsDto getRooms() {\n return roomsFacade.findRooms();\n }", "@Override\n\tpublic List<Hotel> listar() {\n\t\treturn null;\n\t}", "private static List<Element> getXMLLocationTypes(Model model) {\n Set<LocationType> locTypes = new TreeSet<>(Comparators.objectsById());\n locTypes.addAll(model.getLocationTypes(null));\n List<Element> result = new ArrayList<>(locTypes.size());\n for (LocationType curType : locTypes) {\n Element typeElement = new Element(\"locationType\");\n typeElement.setAttribute(\"id\", String.valueOf(curType.getId()));\n typeElement.setAttribute(\"name\", curType.getName());\n for (String curOperation : curType.getAllowedOperations()) {\n Element opElement = new Element(\"allowedOperation\");\n opElement.setAttribute(\"name\", curOperation);\n typeElement.addContent(opElement);\n }\n result.add(typeElement);\n for (Map.Entry<String, String> curEntry\n : curType.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n typeElement.addContent(propertyElement);\n }\n }\n return result;\n }", "@Override\n\tpublic List<AvailableHotelsResponse> getAvailableHotels(AvailableHotelRequest request)\n\t\t\tthrows CommunationFailedException, BusinessException {\n\n\t\tList<AvailableHotelsResponse> hotelResponses = new ArrayList<AvailableHotelsResponse>();\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid request data\");\n\t\t}\n\t\ttry {\n\n\t\t\tGson gson = new Gson();\n\t\t\tString jsonRequestString = gson.toJson(request);\n\n\t\t\tlogger.info(\"AvailableHotelRequest Json String \" + jsonRequestString);\n\n\t\t\tApplicationUrlsHolder applicationUrlsHolder = new ApplicationUrlsHolder();\n\t\t\tMap<HotelProviders, String> providersUrls = applicationUrlsHolder.getHotelProvidersUrls();\n\n\t\t\tfor (Entry<HotelProviders, String> entry : providersUrls.entrySet()) {\n\t\t\t\tHotelProviders hotelProvider = entry.getKey();\n\t\t\t\tString providerUrl = entry.getValue();\n\n\t\t\t\tString jsonResponse = httpCaller.performHttpRequest(jsonRequestString, providerUrl);\n\n\t\t\t\thotelResponses.addAll(ProvidersHotelResponseMapper.mappingHotelResponse(hotelProvider, jsonResponse));\n\t\t\t}\n\n\t\t\tCollections.sort(hotelResponses);\n\n\t\t} catch (BusinessException e) {\n\n\t\t} catch (CommunationFailedException e) {\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\n\t\t\tErrorObj errorObj = new ErrorObj();\n\t\t\terrorObj.setErrorCode(ApplicationConstants.UNKNOWN_EXCEPTION);\n\t\t\terrorObj.setErrorMessage(\"Sorry, Service currently unavailable\");\n\n\t\t\tthrow new BusinessException(errorObj);\n\t\t}\n\n\t\treturn hotelResponses;\n\t}", "@Override\n public List<Room> findRooms(int offset, int limit, String orderBy) throws AppException {\n log.info(\"#findRooms offset = \" + offset + \" limit = \" + limit + \" orderBy = \" + orderBy);\n Connection con = null;\n PreparedStatement ps;\n ResultSet rs;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n ps = con.prepareStatement(SELECT_ROOMS);\n log.info(\"orderBy = \" + orderBy);\n switch (orderBy) {\n case(\"price\"):\n ps = con.prepareStatement(SELECT_ROOMS_PRICE);\n break;\n case(\"size\"):\n ps = con.prepareStatement(SELECT_ROOMS_SIZE);\n break;\n case(\"class\"):\n ps = con.prepareStatement(SELECT_ROOMS_CLASS);\n break;\n case(\"status\"):\n ps = con.prepareStatement(SELECT_ROOMS_STATUS);\n }\n int k = 1;\n ps.setInt(k++, limit);\n ps.setInt(k, offset);\n log.info(\"ps = \" + ps);\n rs = ps.executeQuery();\n rooms = new ArrayList<>();\n while (rs.next()) {\n rooms.add(extractRoom(con, rs));\n }\n con.commit();\n log.info(\"rooms = \" + rooms);\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "public List<Type> getAll();", "List<ExamRoom> selectAll();", "public ArrayList<Room> getAvailableRooms(LocalDate start, LocalDate end,\n int small, int medium, int large) {\n // Prepare temporary variables since the function using them will change. We do not want to change the original small, medium and large parameters.\n int tmpSmall = small;\n int tmpMedium = medium;\n int tmpLarge = large;\n return roomAvailability(start, end, tmpSmall, tmpMedium, tmpLarge);\n \n }", "@Override\r\n\tpublic List<PartyType> findAll() {\n\t\treturn null;\r\n\t}", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "public interface API {\n Room[] findRooms(int price, int persons, String city, String hotel);\n\n Room[] getAllRooms();\n\n}", "List<Menu> findByHotelHotelName(String hotelName);" ]
[ "0.6571092", "0.6160872", "0.61328673", "0.5996913", "0.5967907", "0.59207046", "0.5894855", "0.58626026", "0.5831751", "0.5807397", "0.57139635", "0.570186", "0.56936586", "0.56828076", "0.56527126", "0.5649057", "0.5593002", "0.5563673", "0.55592823", "0.55408525", "0.55136496", "0.55052024", "0.5479239", "0.5452292", "0.5452017", "0.5436773", "0.53984547", "0.5392338", "0.53885764", "0.5383069", "0.537471", "0.5372118", "0.536726", "0.53647333", "0.5358973", "0.5353748", "0.5346179", "0.53410316", "0.53364205", "0.53327054", "0.5331223", "0.5331135", "0.5323391", "0.53213626", "0.53207225", "0.5301068", "0.5238519", "0.5237077", "0.5228972", "0.52264357", "0.5212329", "0.5208986", "0.5200871", "0.52007043", "0.51877826", "0.51791203", "0.517614", "0.5171506", "0.51712334", "0.51685745", "0.5157414", "0.5154121", "0.51498795", "0.5145783", "0.5141792", "0.5140381", "0.51273084", "0.5125588", "0.5119891", "0.5119764", "0.511874", "0.5114836", "0.5114608", "0.5107018", "0.51018584", "0.50971556", "0.50913876", "0.5091066", "0.5083165", "0.50757164", "0.5066626", "0.5061206", "0.5057793", "0.504074", "0.5038483", "0.50363505", "0.502691", "0.5023615", "0.50227624", "0.5022684", "0.50205106", "0.50204504", "0.5016126", "0.5009863", "0.5006414", "0.5001657", "0.49982217", "0.49903914", "0.498605", "0.49853784" ]
0.71315
0
General search for customers to make reservations:
public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException { String sql = "SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0"; PreparedStatement pStmt = connection.prepareStatement(sql); pStmt.clearParameters(); setPartySize(party_size); pStmt.setInt(1, getPartySize()); setCity(city); pStmt.setString(2, getCity()); pStmt.setString(3, check_in.toString()); pStmt.setString(4, check_out.toString()); ResultSet rs = null; try { System.out.printf(" Hotels available: "); System.out.println("+------------------------------------------------------------------------------+"); rs = pStmt.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1) + " " + rs.getInt(2) + " " + rs.getString(3) + " " + rs.getInt(4)); } } catch (SQLException e) { e.printStackTrace(); } finally { pStmt.close(); if (rs != null){ rs.close(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer search(String login);", "public void searchCustomerReservations(Connection connection, int CID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT res_num FROM Reservation WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setCID(CID);\n pStmt.setInt(1, getCID());\n\n try {\n\n System.out.printf(\" Reservations for C_ID (%d):\\n\", getCID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\"Reservation number: \" + rs.getInt(1));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Override\r\n\tpublic Customer search(String name) {\n\t\treturn null;\r\n\t}", "public ArrayList<Customer> findCustomer(String searchText) {\r\n\t\tsearchText = searchText.toLowerCase();\r\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\r\n\t\ttry (ResultSet result = manager.performSql(\"SELECT id FROM Customer WHERE LOWER(first_name || ' ' || last_name) LIKE '%\" + searchText + \"%'\")) {\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tcustomers.add(manager.getCustomer(result.getInt(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customers;\r\n\t}", "@Test\n public void findByCustomerTest() {\n Set<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n Mockito.when(reservationDao.findByCustomerId(Mockito.anyLong())).thenReturn(expected);\n Collection<Reservation> result = reservationService.findByCustomer(10L);\n Assert.assertEquals(result.size(), 2);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n }", "List<CustDataNotesResponseDTO> searchForCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;", "List<Customers> selectByCustomers(Customers customers);", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "@Override\n\tpublic List<Customer> searchCustomerByName(String name) throws BusinessException {\n\t\treturn customerViewAllDAO.searchCustomerByName(name);\n\t}", "public Object getAllCustomers(HttpServletRequest req);", "Set<Customer> getCustomers(final CustomerQueryFilter filter);", "public List<Reservation> getAllEventsForCustomer() {\n\t\tString currentUsername = null;\n\t\ttry {\n\t\t\tcurrentUsername = customerService.getCurrentUserAccount().getUsername();\n\t\t} catch (AnonymusUserException e) {\n\t\t\tLOG.error(\"Cannot get reservations for Customer. Cause: \" + e.getMessage());\n\t\t}\n\t\treturn reservationRepository.findAllByUsername(currentUsername);\n\t}", "@GetMapping(\"/search\")\r\n\tpublic String searchCustomers(@RequestParam(\"theSearchName\") String theSearchName,\r\n\t\t\t\t\t\t\t\t\tModel theModel) {\n\t\tList<Customer> theCustomers = customerService.searchCustomers(theSearchName);\r\n\t\t\t\t\r\n\t\t// add the customers to the model\r\n\t\ttheModel.addAttribute(\"customers\", theCustomers);\r\n\r\n\t\treturn \"list-customers\";\t\t\r\n\t}", "@Override\r\n\tpublic List<Client> search(HttpServletRequest request) throws ParseException {\n\t\tClientSearchBean searchBean = new ClientSearchBean();\r\n\t\tsearchBean.setNameLike(getStringFilter(\"name\", request));\r\n\t\tsearchBean.setGender(getStringFilter(GENDER, request));\r\n\t\tDateTime[] birthdate = getDateRangeFilter(BIRTH_DATE, request);//TODO add ranges like fhir do http://hl7.org/fhir/search.html\r\n\t\tDateTime[] deathdate = getDateRangeFilter(DEATH_DATE, request);\r\n\t\tif (birthdate != null) {\r\n\t\t\tsearchBean.setBirthdateFrom(birthdate[0]);\r\n\t\t\tsearchBean.setBirthdateTo(birthdate[1]);\r\n\t\t}\r\n\t\tif (deathdate != null) {\r\n\t\t\tsearchBean.setDeathdateFrom(deathdate[0]);\r\n\t\t\tsearchBean.setDeathdateTo(deathdate[1]);\r\n\t\t}\r\n\t\t\r\n\t\tString clientId = getStringFilter(\"identifier\", request);\r\n\t\tif (!StringUtils.isEmptyOrWhitespaceOnly(clientId)) {\r\n\t\t\tClient c = clientService.find(clientId);\r\n\t\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\t\tclients.add(c);\r\n\t\t\treturn clients;\r\n\t\t}\r\n\t\t\r\n\t\tAddressSearchBean addressSearchBean = new AddressSearchBean();\r\n\t\taddressSearchBean.setAddressType(getStringFilter(ADDRESS_TYPE, request));\r\n\t\taddressSearchBean.setCountry(getStringFilter(COUNTRY, request));\r\n\t\taddressSearchBean.setStateProvince(getStringFilter(STATE_PROVINCE, request));\r\n\t\taddressSearchBean.setCityVillage(getStringFilter(CITY_VILLAGE, request));\r\n\t\taddressSearchBean.setCountyDistrict(getStringFilter(COUNTY_DISTRICT, request));\r\n\t\taddressSearchBean.setSubDistrict(getStringFilter(SUB_DISTRICT, request));\r\n\t\taddressSearchBean.setTown(getStringFilter(TOWN, request));\r\n\t\taddressSearchBean.setSubTown(getStringFilter(SUB_TOWN, request));\r\n\t\tDateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id\r\n\t\t//TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a\r\n\t\tString attributes = getStringFilter(\"attribute\", request);\r\n\t\tsearchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[0]);\r\n\t\tsearchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[1]);\r\n\t\t\r\n\t\treturn clientService.findByCriteria(searchBean, addressSearchBean, lastEdit == null ? null : lastEdit[0],\r\n\t\t lastEdit == null ? null : lastEdit[1]);\r\n\t}", "public static void searchCustomers(ArrayList<Customer> customerList) throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\t// Contains the list of customers to display to the user\r\n\t\tArrayList<Customer> printList = new ArrayList<Customer>();\r\n\t\t\r\n\t\tSystem.out.println(\"[CUSTOMER SEARCH]\\n\");\r\n\t\tSystem.out.println(\"Enter a name to search for.\");\r\n\t\t\r\n\t\t// Gets user search input\r\n\t\tString searchString = inputString(false);\r\n\t\t\r\n\t\t// If a customer's name contains searchString, add it to the list of customers to be printed\r\n\t\tfor(Customer c : customerList)\r\n\t\t\tif(c.getName().toLowerCase().contains(searchString.toLowerCase().subSequence(0, searchString.length())))\r\n\t\t\t\tprintList.add(c);\r\n\t\t\r\n\t\teditCustomers(printList);\r\n\t}", "public void searchFlights();", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "public abstract List<CustomerType> findCustomerTypebyCustomerTypeNumber(String searchString);", "@Override\n\tpublic List<Customer> searchCustomers(String theSearchName) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\tQuery theQuery = null;\n\t\t\n\t\t// only search by name if theSearchName is not empty\n\t\tif(theSearchName != null && theSearchName.trim().length() > 0) {\n\t\t\ttheQuery = currentSession.createQuery(\"from Customer where \"\n\t\t\t\t\t+ \"lower(firstName) like :theName or lower(lastName) \"\n\t\t\t\t\t+ \"like :theName\", Customer.class);\n\t\t\t\n\t\t\ttheQuery.setParameter(\"theName\", \"%\" + theSearchName.toLowerCase() + \"%\");\n\t\t}\n\t\telse {\n\t\t\t// theSearchName is empty, so get all the customers\n\t\t\ttheQuery=currentSession.createQuery(\"from Customer\", Customer.class);\n\t\t}\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\n\t\treturn customers;\n\t}", "private void query(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString name = req.getParameter(\"name\");\n\t\tString phone = req.getParameter(\"phone\");\n\t\tString address = req.getParameter(\"address\");\n\t\t\n\t\t//2. encapsulate parameters into a CriteriaCustomer object\n\t\tCriteriaCustomer cc = new CriteriaCustomer(name, address, phone);\n\t\t//3. call customerDAO.getListByCriteria() to retrieve a list of all the customers\n\t\tList<Customer> customers = customerDAO.getListByCriteria(cc);\n\t\t//4. put the list into request\n\t\treq.setAttribute(\"customers\", customers);\n\t\t//5. forward to index.jsp\n\t\treq.getRequestDispatcher(\"/index.jsp\").forward(req, resp);\n\t}", "public List<Customer> findAutoCompleteCustomers(String key) {\n\t\tTypedQuery<Customer> query = em.createQuery(\n\t\t\t\t\"select distinct c from Customer c \"\n\t\t\t\t\t\t+ \" where upper(concat(c.customerName1,' ', c.customerName2,' ', c.customerName3,' ', c.customerName4)) like :name\",\n\t\t\t\tCustomer.class);\n\t\tquery.setParameter(\"name\", \"%\" + key.toUpperCase() + \"%\");\n\t\tList<Customer> customers = query.setFirstResult(0).setMaxResults(10).getResultList();\n\n\t\treturn customers;\n\t}", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "public List<Customer> getCustomerList() {\r\n\t\tList<Object> columnList = null;\r\n\t\tList<Object> valueList = null;\r\n\t\tList<Customer> customers = new ArrayList<Customer>();\r\n\r\n\t\tif (searchValue != null && !searchValue.trim().equals(\"\")) {\r\n\t\t\tcolumnList = new ArrayList<Object>();\r\n\t\t\tvalueList = new ArrayList<Object>();\r\n\t\t\tcolumnList.add(searchColumn);\r\n\t\t\tvalueList.add(searchValue);\r\n\t\t}\r\n\t\tcustomers = customerService.searchCustomer(columnList, valueList,\r\n\t\t\t\tfirst, pageSize);\r\n\t\t\r\n\r\n\t\treturn customers;\r\n\t}", "List<Customer> findByAddressStreet(String name);", "@Override\r\n\tpublic List<Reservation> rechercherReservation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}", "public static String searchCustomer(String filter)\n\t{\n\t\tfor (Customer customer : customerList)\n\t\t{\n\t\t\tif (customer.getFirstName().contains(filter))\n\t\t\t{\n\t\t\t\tcustomerSearch.add(customerList.indexOf(customer));\n\t\t\t}\n\t\t}\n\t\treturn String.format(\"Records found: %d\", customerSearch.size());\n\t}", "@GetMapping(\"/search/results\")\n public String showClientsByNameAndLastName(Model model, @ModelAttribute(CUSTOMER) CustomerDTO customerDTO) {\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n model.addAttribute(CUSTOMERS, customerService.findByNameAndLastName(customer.getFirstName(), customer.getLastName()));\n return CUSTOMERS_INDEX;\n }", "@FXML\n void search(ActionEvent event) {\n if(idSearch.getText().isEmpty())\n \talert.reportError(\"Please fill in with clients id before searching!\");\n else {\n \tthis.list = resHandler.getReservation(idSearch.getText().toString(),list);\n reservationsTable.setItems(list);\n }\n\t}", "public String searchCustomerOfPromotion() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tif (promotionId == null || promotionId <= 0) {\n\t\t\tresult.put(\"rows\", new ArrayList<PromotionCustomerVO>());\n\t\t\tresult.put(\"total\", 0);\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tPromotionCustomerFilter filter = new PromotionCustomerFilter();\n\t\t\tfilter.setPromotionId(promotionId);\n\t\t\tfilter.setCode(code);\n\t\t\tfilter.setName(name);\n\t\t\tfilter.setAddress(address);\n\t\t\tfilter.setIsCustomerOnly(false);\n\t\t\tif (shopId == null || shopId == 0) {\n\t\t\t\tfilter.setStrListShopId(getStrListShopId());\n\t\t\t} else {\n\t\t\t\tfilter.setShopId(shopId);\n\t\t\t}\n\t\t\tObjectVO<PromotionCustomerVO> obj = promotionProgramMgr.getCustomerInPromotionProgram(filter);\n\t\t\tList<PromotionCustomerVO> lst = obj.getLstObject();\n\n\t\t\tList<TreeGridNode<PromotionCustomerVO>> tree = new ArrayList<TreeGridNode<PromotionCustomerVO>>();\n\t\t\tif (lst == null || lst.size() == 0) {\n\t\t\t\tresult.put(\"rows\", tree);\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\t// Tao cay\n\t\t\tint i, sz = lst.size();\n\t\t\tPromotionCustomerVO vo = null;\n\t\t\tLong shId = currentUser.getShopRoot().getShopId();\n\t\t\tfor (i = 0; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\t\t\t\tif (vo.getIsCustomer() == 0 && shId.equals(vo.getId())) {\n\t\t\t\t\ti++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//PromotionStaffVO vo = lst.get(0);\n\t\t\tTreeGridNode<PromotionCustomerVO> node = new TreeGridNode<PromotionCustomerVO>();\n\t\t\tnode.setNodeId(\"sh\" + vo.getId());\n\t\t\tnode.setAttr(vo);\n\t\t\tnode.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\tnode.setText(vo.getCustomerCode() + \" - \" + vo.getCustomerName());\n\t\t\tList<TreeGridNode<PromotionCustomerVO>> chidren = new ArrayList<TreeGridNode<PromotionCustomerVO>>();\n\t\t\tnode.setChildren(chidren);\n\t\t\ttree.add(node);\n\n\t\t\tTreeGridNode<PromotionCustomerVO> tmp;\n\t\t\tTreeGridNode<PromotionCustomerVO> tmp2;\n\t\t\tfor (; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\n\t\t\t\ttmp2 = getNodeFromTree(tree, \"sh\" + vo.getParentId());\n\t\t\t\tif (tmp2 != null) {\n\t\t\t\t\ttmp = new TreeGridNode<PromotionCustomerVO>();\n\t\t\t\t\ttmp.setAttr(vo);\n\t\t\t\t\tif (0 == vo.getIsCustomer()) {\n\t\t\t\t\t\ttmp.setNodeId(\"sh\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttmp.setNodeId(\"st\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_LEAF);\n\t\t\t\t\t}\n\t\t\t\t\ttmp.setText(vo.getCustomerCode() + \" - \" + vo.getCustomerName());\n\n\t\t\t\t\tif (tmp2.getChildren() == null) {\n\t\t\t\t\t\ttmp2.setChildren(new ArrayList<TreeGridNode<PromotionCustomerVO>>());\n\t\t\t\t\t}\n\t\t\t\t\ttmp2.getChildren().add(tmp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.put(\"rows\", tree);\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.searchCustomerOfPromotion\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}", "public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);", "List<ShipmentInfoPODDTO> search(String query);", "public void searchCustomerName(String str) {\n\n sendTextToElement(searchCustomerField,str);\n }", "public PlaceReserveInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "List<Corretor> search(String query);", "List<ResultsView1> findByCadd(String addrs);", "public List<Customer> findByName(String n) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE LOWER(name) LIKE LOWER(?)\");\n ppst.setString(1, \"%\" + n + \"%\");\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "public Customer getCustomerByName(String customerName);", "List<Revenue> search(String query);", "public List<Menu> searchCustomers(String theSearchName) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\r\n\t\tQuery theQuery = null;\r\n\r\n\t\t//\r\n\t\t// only search by name if theSearchName is not empty\r\n\t\t//\r\n\t\tif (theSearchName != null && theSearchName.trim().length() > 0) {\r\n\r\n\t\t\t// search for firstName or lastName ... case insensitive\r\n\t\t\ttheQuery = currentSession.createQuery(\r\n\t\t\t\t\t\"from Menu where lower(mname) like :theName or lower(munit) like :theName\", Menu.class);\r\n\t\t\ttheQuery.setParameter(\"theName\", \"%\" + theSearchName.toLowerCase() + \"%\");\r\n\r\n\t\t} else {\r\n\t\t\t// theSearchName is empty ... so just get all customers\r\n\t\t\ttheQuery = currentSession.createQuery(\"from Menu\", Menu.class);\r\n\t\t}\r\n\r\n\t\t// execute query and get result list\r\n\t\tList<Menu> theMenu = theQuery.getResultList();\r\n\r\n\t\t// return the results\r\n\t\treturn theMenu;\r\n\r\n\t}", "@RequestMapping(value = \"/_search/customerOrders/{query:.+}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerOrder> searchCustomerOrders(@PathVariable String query) {\n log.debug(\"REST request to search CustomerOrders for query {}\", query);\n return StreamSupport\n .stream(customerOrderSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "List<CustomersNotVisitedDTO> getCustomersNotVisited(CustomersNotVisitedCriteria criteria);", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleLocation() {\n\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"bus\", \"A/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0776\", \"car\", \"nonA/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyVehicleLocation(\"chennai\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyVehicleLocation(\"chennai\");\n\t\tassertEquals(1, cust3.size());\n\t}", "public abstract Page<CustomerOrder> findByCustomer(Customer customer, GlobalSearch globalSearch, Pageable pageable);", "public List<CustomersListSearchConditionsDTO> findAll();", "@SuppressWarnings(\"rawtypes\")\n public MapList getCustomerCRs(Context context, String[] args) throws Exception {\n\n Pattern relationship_pattern = new Pattern(TigerConstants.RELATIONSHIP_PSS_SUBPROGRAMPROJECT);\n relationship_pattern.addPattern(TigerConstants.RELATIONSHIP_PSS_CONNECTEDPCMDATA);\n\n Pattern type_pattern = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n type_pattern.addPattern(TigerConstants.TYPE_PSS_PROGRAMPROJECT);\n\n Pattern finalType = new Pattern(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n\n try {\n\n StringList slselectObjStmts = getSLCTableSelectables(context);\n\n Map programMap = (Map) JPO.unpackArgs(args);\n String strProgProjId = (String) programMap.get(\"objectId\");\n // TIGTK-16801 : 30-08-2018 : START\n boolean bAdminOrPMCMEditAllow = isAdminOrPMCMofRelatedPP(context, strProgProjId);\n StringBuffer sbObjectWhere = new StringBuffer();\n sbObjectWhere.append(\"(type==\\\"\");\n sbObjectWhere.append(TigerConstants.TYPE_PSS_CHANGEREQUEST);\n sbObjectWhere.append(\"\\\"&&attribute[\");\n sbObjectWhere.append(TigerConstants.ATTRIBUTE_PSS_CRORIGINTYPE);\n sbObjectWhere.append(\"] == \");\n sbObjectWhere.append(\"\\\"\");\n sbObjectWhere.append(\"Customer\");\n sbObjectWhere.append(\"\\\")\");\n // TIGTK-16801 : 30-08-2018 : END\n\n DomainObject domainObj = DomainObject.newInstance(context, strProgProjId);\n\n MapList mapList = domainObj.getRelatedObjects(context, relationship_pattern.getPattern(), // relationship pattern\n type_pattern.getPattern(), // object pattern\n slselectObjStmts, // object selects\n null, // relationship selects\n false, // to direction\n true, // from direction\n (short) 0, // recursion level\n sbObjectWhere.toString(), // object where clause\n null, (short) 0, false, // checkHidden\n true, // preventDuplicates\n (short) 1000, // pageSize\n finalType, // Postpattern\n null, null, null);\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:Start\n if (mapList.size() > 1) {\n // return sortCRListByState(context, mapList);\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:START\n MapList mlReturn = sortCRListByState(context, mapList);\n\n Iterator<Map<String, String>> itrCR = mlReturn.iterator();\n while (itrCR.hasNext()) {\n Map tempMap = itrCR.next();\n String strCRId = (String) tempMap.get(DomainConstants.SELECT_ID);\n MapList mlIA = getImpactAnalysis(context, strCRId);\n\n String strIAId = \"\";\n if (!mlIA.isEmpty()) {\n Map mpIA = (Map) mlIA.get(0);\n strIAId = (String) mpIA.get(DomainConstants.SELECT_ID);\n }\n tempMap.put(\"LatestRevIAObjectId\", strIAId);\n // TIGTK-16801 : 30-08-2018 : START\n tempMap.put(\"bAdminOrPMCMEditAllow\", bAdminOrPMCMEditAllow);\n // TIGTK-16801 : 30-08-2018 : END\n }\n return mlReturn;\n // PCM2.0 Spr4:TIGTK-6894:19/9/2017:END\n } else {\n return mapList;\n }\n // TIGTK_3961:Sort CR data according to CR state :23/1/2017:Rutuja Ekatpure:End\n } catch (Exception ex) {\n logger.error(\"Error in getCustomerCRs: \", ex);\n throw ex;\n }\n }", "List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);", "public void search() {\r\n \t\r\n }", "private void searchFunction() {\n\t\t\r\n\t}", "@Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);", "@Test\n public void whenFindingCustomersItShouldReturnAllCustomers() {\n given(repository.findAll()).willReturn(Arrays.asList(CUSTOMER1, CUSTOMER2));\n // When looking for all customers, it should contain only CUSTOMER1 and CUSTOMER2\n assertThat(controller.findCustomers()).containsOnly(CUSTOMER1,CUSTOMER2);\n }", "SearchProductsResult searchProducts(SearchProductsRequest searchProductsRequest);", "@GetMapping( value = CustomerRestURIConstants.GET_CUSTOMERS_BY_SEARCH )\n\tpublic ResponseEntity<List<Customer>> getCustomerBySearchParameter(@PathVariable(\"searchInput\") String searchInput) {\n\t\tList<Customer> custList = customerService.getCustomerBySearchParameter(searchInput);\n\t\treturn ResponseEntity.ok().body(custList);\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }", "private void createSampleSearch() {\n String userNameToFind = \"mweston\";\n CustomUser user = userService.findByUserName(userNameToFind);\n List<Search> searches = user.getSearches();\n long mwestonUserId = user.getId();\n\n /**\n * The below check is done because when using a Postgres database I will not be using the\n * create-drop but instead validate so I do not want to make too many sample API requests\n * (such as every time I start up this application).\n */\n if(searches.size() > 0) {\n return ;\n }\n\n Search search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n Search secondSearch = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS_TWO);\n searchService.saveSearch(secondSearch, mwestonUserId);\n\n searchService.createSearch(SpringJPABootstrap.STONERIDGE_MALL_RD_SAMPLE_ADDRESS);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n\n search = searchService.createSearch(SpringJPABootstrap.SAMPLE_ADDRESS);\n searchService.saveSearch(search, mwestonUserId);\n }", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "public Iterator<R> reservationsByName(String name){\n // Return an iterator of active reservations for a name.\n //loop through the arrayList\n for(Reservation r: listR){\n //if we find the name that equals our given name, add that reservation to our temp list\n if(r.getName().equals(name)){\n newList.add(r);\n }\n }\n //return iterator for temp list\n IterName iter = new IterName();\n return iter;\n }", "abstract public void search();", "public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }", "@Override\r\npublic Collection<Customer> getCustomersByCity(String city) \r\n{ \r\n\tlogger.info(\"---DAO getCustomersByCity \"+city);\r\n\t //String searchClause = email.toLowerCase();\r\n\t //String qryString = \"from City where LOWER(cityName) LIKE :param\";\r\n\t //String qryString = \"from Customer, Address, City where City.city_id = Address.city_id and Address.address_id = Customer.address_id and LOWER(City.city) = :param\";\r\n\t\tString qryString = \"from Customer cu, Address a, City ci where ci.city_id = a.city_id and a.address_id = cu.address_id and LOWER(ci.city) = :param\";\r\n\t \t \r\n\t EntityManager em = emf.createEntityManager();\r\n\t Query qry = em.createQuery(qryString);\r\n\t qry.setParameter(\"param\", city.toLowerCase());//binding parameter to mitigate SQL Injection attacks\r\n\t \r\n\t List resultList = qry.setMaxResults(ProjectConstants.MAX_RESULTS_PAGE)\r\n\t\t\t \t\t\t .getResultList();\r\n\t \r\n\t logger.info(\"------------resultList.size() \"+resultList.size());\r\n\t \r\n\t if(resultList == null || resultList.size() == 0)\r\n\t {\r\n\t\t return null;\r\n\t }\t \t \r\n\t \r\n\t return resultList;\t\r\n}", "@RequestMapping(value = \"/customer-addres\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerAddres> getAllCustomerAddres() {\n log.debug(\"REST request to get all CustomerAddres\");\n List<CustomerAddres> customerAddres = customerAddresRepository.findAll();\n return customerAddres;\n }", "Reservation createReservation();", "public List<Reservation> findByReservationUser_Id(@Param(\"id\") int id);", "List<Customer> getCustomers();", "public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);", "List<Cemetery> search(String query);", "@Override\n\tpublic List<Appointment> findCustCarAppoinmentX(int cust_id) {\n\t\treturn appointmentMapper.findCustCarAppoinmentX(cust_id);\n\t}", "public void customerQuery(){\n }", "protected void showReservations() {\n storageDao.findAllRented()\n .forEach(System.out::println);\n }", "List<Reservation> findByMovie(Movie movie);", "public ArrayList<Customer> getAllCustomers();", "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleType() {\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyType(\"car\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyType(\"car\");\n\t\tassertEquals(1, cust3.size());\n\t}", "@Override\n\tpublic void findIt(MyCustomer c ,String product){\n\t\tfor(int i=0; i<c.customerNeeds.size(); i++){\n\t\t\tif(product == c.customerNeeds.get(i)){\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void searchCliente(JTextField txt, TextAutoCompleter match){\n match.removeAllItems(); // Remover todos los elementos del Autocompletador. \n cl = clientes();//Inserta todos los clientes en el vector. \n cl.forEach(item -> { //Agrega al autocompletador nombre e ID de los clientes \n match.addItem(item.getNombreCliente()+ \" \" + item.getApellidoPaterno() + \" \" + String.valueOf(item.getID_Cliente()));\n match.addItem(String.valueOf(item.getID_Cliente()));\n });\n }", "public static ArrayList<HashMap<String, String>> getDoCustomersWithSalesmanIdSearch(\r\n\t\t\tint start, int length, String search, int id) {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tHashMap<String, String> map = null;\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_do_customers_with_salesman_id_search(?,?,?,?)}\");\r\n\t\t\tcall.setInt(1, start);\r\n\t\t\tcall.setInt(2, length);\r\n\t\t\tcall.setString(3, search);\r\n\t\t\tcall.setInt(4, id);\r\n\t\t\trs = call.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmap = new HashMap<>();\r\n\t\t\t\tmap.put(\"customerId\", rs.getInt(\"customer_id\") + \"\");\r\n\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\tmap.put(\"customerCnic\", rs.getString(\"customer_cnic\"));\r\n\t\t\t\tmap.put(\"customerDateOfBirth\", rs.getDate(\"date_of_birth\") + \"\");\r\n\t\t\t\tmap.put(\"customerAddress\", rs.getString(\"customer_address\"));\r\n\t\t\t\tmap.put(\"customerCity\", rs.getInt(\"customer_city\") + \"\");\r\n\t\t\t\tmap.put(\"customerPhone\", rs.getString(\"customer_phone\"));\r\n\t\t\t\tmap.put(\"customerPhone2\", rs.getString(\"customer_phone2\"));\r\n\t\t\t\tmap.put(\"customerImage\", rs.getBlob(\"customr_image\") + \"\");\r\n\t\t\t\tmap.put(\"customerFatherName\", rs.getString(\"father_name\"));\r\n\t\t\t\tmap.put(\"customerMotherName\", rs.getString(\"mother_name\"));\r\n\t\t\t\t/* map.put(\"customerEmail\", rs.getString(\"email\")); */\r\n\t\t\t\tmap.put(\"customerGender\", rs.getString(\"gender\"));\r\n\t\t\t\tmap.put(\"customerAge\", rs.getInt(\"age\") + \"\");\r\n\t\t\t\tmap.put(\"customerCreated\", rs.getString(\"created_on\"));\r\n\t\t\t\tmap.put(\"customerOccupation\", rs.getString(\"occupation\"));\r\n\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "@Override\n public List<Client> filterByName(String searchString){\n log.trace(\"filterByName -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).filter((c)->c.getName().contains(searchString)).collect(Collectors.toList());\n log.trace(\"filterByName: result = {}\", result);\n return result;\n\n }", "@Override\n\tpublic List<Reservation> selectionnerReservations(final ContexteConsommation contexte)\n\t\t\tthrows IllegalArgumentException, ContexteConsommationInvalideException {\n\t\treturn null;\n\t}", "public boolean makeReservation(String startDate, String endDate, String customerName, int customerCount, String hotelName) {\n Hotel hotel = databaseManager.findHotelByName(hotelName);\n return SocketManager.makeReservation(hotel.getIp(), hotel.getPort(), startDate, endDate, customerName, customerCount);\n }", "public List<Customer> findAllCustomers() throws DatabaseOperationException;", "void search();", "void search();", "List<OwnerOperatorDTO> search(String query);", "@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }", "public static ArrayList<CustomerInfoBean> getCutomers_Filtered(\r\n\t\t\tString districtfiltered, String salesman_name, String startdate,\r\n\t\t\tString endtime, String payment) throws java.text.ParseException {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tString STARTDATE = null;\r\n\t\tString ENDDATE = null;\r\n\r\n\t\t// System.out.println(newDateString);\r\n\r\n\t\t// (1) create a SimpleDateFormat object with the desired format.\r\n\t\t// this is the format/pattern we're expecting to receive.\r\n\t\tString expectedPattern = \"MM/dd/yyyy\";\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(expectedPattern);\r\n\t\ttry {\r\n\t\t\t// (2) give the formatter a String that matches the SimpleDateFormat\r\n\t\t\t// pattern\r\n\r\n\t\t\tDate strtdate = formatter.parse(startdate);\r\n\t\t\tDate endddate = formatter.parse(endtime);\r\n\r\n\t\t\t// (3) prints out \"Tue Sep 22 00:00:00 EDT 2009\"\r\n\t\t\tSystem.out.println(\"Date \" + strtdate);\r\n\t\t\tSTARTDATE = new SimpleDateFormat(\"yyyy-MM-dd\").format(strtdate);\r\n\t\t\tENDDATE = new SimpleDateFormat(\"yyyy-MM-dd\").format(endddate);\r\n\r\n\t\t} catch (ParseException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\t// execution will come here if the String that is given\r\n\t\t\t// does not match the expected format.\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// System.out.println(\"enddate1 Date SERVER \"+date2);\r\n\r\n\t\tSystem.out.println(\"districtfiltered+ \" + districtfiltered);\r\n\t\tSystem.out.println(\"salesman_name+ \" + salesman_name);\r\n\t\tSystem.out.println(\"startdate+ \" + startdate);\r\n\t\tSystem.out.println(\"endtime+ \" + endtime);\r\n\t\tSystem.out.println(\"payment+ \" + payment);\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, sal.salary_range, a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, a.appliance_name, e.status FROM eligibility e \\n\"\r\n\t\t\t\t\t+ \"INNER JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \"INNER JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \"INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \"join sold_to sld on cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \"JOIN do_salesman ds ON s.salesman_id=ds.salesman_id\\n\"\r\n\t\t\t\t\t+ \"JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \"JOIN city_district cd ON c.city_id=cd.city_id\\n\"\r\n\t\t\t\t\t+ \"JOIN salary sal ON cs.customer_monthly_income=sal.salary_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\"where cd.district_id IN (\"\r\n\t\t\t\t\t+ districtfiltered\r\n\t\t\t\t\t+ \") and s.salesman_name LIKE '\"\r\n\t\t\t\t\t+ salesman_name\r\n\t\t\t\t\t+ \"%' and s.salesman_name like '%\"\r\n\t\t\t\t\t+ salesman_name\r\n\t\t\t\t\t+ \"' and cs.created_on BETWEEN '\"\r\n\t\t\t\t\t+ STARTDATE\r\n\t\t\t\t\t+ \"' AND '\"\r\n\t\t\t\t\t+ ENDDATE\r\n\t\t\t\t\t+ \"' and sld.payement_option IN (\"\r\n\t\t\t\t\t+ payment\r\n\t\t\t\t\t+ \")\\n\" + \"order by cs.customer_name\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\tSystem.out.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public void searchByAccount() {\n\t\t\n\t\tlog.log(Level.INFO, \"Please Enter the account number you want to search: \");\n\t\tint searchAccountNumber = scan.nextInt();\n\t\tbankop.search(searchAccountNumber);\n\n\t}", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "Page<ConsultationInfoDTO> search(String query, Pageable pageable);", "@RequestMapping(value = \"list/page/filter/{itemsPerPage}/{pageNo}\", method = { RequestMethod.GET })\n\t@ResponseBody\n\tpublic Object listCustomerForPageAndFilter(@PathVariable(\"itemsPerPage\") Integer itemsPerPage,\n\t\t\t@PathVariable(\"pageNo\") Integer pageNo, HttpServletRequest request) {\n\t\tMap<String, Object> customer = new HashMap<String, Object>();\n\n\t\tString serviceUrl = getMainDomain(request) + RedSunURLs.CLIENT_URL_SERVICE_FILTER + itemsPerPage + \"/\" + pageNo;\n\t\treturn RestAPIHelper.post(serviceUrl, customer);\n\t}", "public void action_consultar(ActionEvent actionEvent) throws GWorkException {\r\n\t\ttry {\r\n\r\n\t\t\tConsultsService consultsService = new ConsultsServiceImpl();\r\n\r\n\t\t\tboolean esValido = true;\r\n\r\n\t\t\tif (criterio != null && criterio.trim().length() != 0)\r\n\t\t\t\tesValido = Util.validarPlaca(criterio);\r\n\r\n\t\t\tif (!esValido)\r\n\t\t\t\tthrow new GWorkException(Util\r\n\t\t\t\t\t\t.loadErrorMessageValue(\"CRITERIO.CARACTER\"));\r\n\r\n\t\t\t// List<Users> users = new UsersDAO().find\r\n\t\t\tlistUsers = consultsService.usuariosCiat(criterio.toUpperCase(),\r\n\t\t\t\t\tcriterio.toUpperCase(), criterio.toUpperCase());\r\n\t\t\tif (listUsers != null && listUsers.size() > 0) {\r\n\t\t\t\tsetListUsers(listUsers);\r\n\t\t\t\tsetMostrarTabla(true);\r\n\t\t\t} else\r\n\t\t\t\tthrow new GWorkException(Util\r\n\t\t\t\t\t\t.loadErrorMessageValue(\"search.not.found\"));\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetListUsers(null);\r\n\t\t\tmostrarMensaje(e.getMessage(), false);\r\n\t\t}\r\n\t}", "List<Customer> getCustomerList();", "CurrentReservation createCurrentReservation();", "@Override\n\tpublic Page<Customer> findCustomerList(Integer page, Integer rows, String custName, String custSource,\n\t\t\tString custIndusty, String custLevel) {\n\t\treturn null;\n\t}", "private void loadReservation() {\n email = getIntent().getStringExtra(\"USER_EMAIL\");\n list = new ArrayList<>();\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n /*\n Get list reservations of current customer\n */\n db.collection(\"customers\")\n .whereEqualTo(\"customerEmail\", email)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<QuerySnapshot> task) {\n if (task.isSuccessful() && !task.getResult().isEmpty()) {\n DocumentSnapshot doc = task.getResult().getDocuments().get(0);\n String docID = doc.getId();\n db.collection(\"reservations\")\n .whereEqualTo(\"customerId\", docID)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n Reservation res = document.toObject(Reservation.class);\n res.setReservationId(document.getId());\n list.add(res);\n }\n /*\n Binding data to recyclerview\n */\n reserAdap = new ReservationAdapter(list, CancelReservation.this); //Call LecturerAdapter to set data set and show data\n LinearLayoutManager manager = new LinearLayoutManager(CancelReservation.this); //Linear Layout Manager use to handling layout for each Lecturer\n recyclerView.setAdapter(reserAdap);\n recyclerView.setLayoutManager(manager);\n } else {\n\n }\n }\n });\n }\n\n }\n });\n\n }", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested_Super() {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE e.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_suggested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=3\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void findByNullCustomerTest() {\n reservationService.findByCustomer(null);\n }", "private List<AdhocCustomer> getSearchUniverseSearchAdhocCustomerDataSet() {\n // The initialization of the result list must be done here\n //\n //\n return AdhocCustomer.findAll().collect(Collectors.toList());\n }", "Customers createCustomers();" ]
[ "0.66019833", "0.64752567", "0.6364929", "0.61334336", "0.60758233", "0.6001897", "0.5977062", "0.59770554", "0.59724987", "0.5923115", "0.5915634", "0.5906466", "0.5899099", "0.58910334", "0.5875793", "0.58694047", "0.5858801", "0.58379924", "0.58073175", "0.57945436", "0.5750308", "0.57484514", "0.5741995", "0.5736024", "0.5724122", "0.569934", "0.56492364", "0.56462806", "0.5634136", "0.56268585", "0.56115806", "0.56086326", "0.5597953", "0.5597816", "0.5591249", "0.55866474", "0.55770284", "0.5557798", "0.5533242", "0.55137056", "0.5511726", "0.550368", "0.54788697", "0.5473809", "0.54713273", "0.54636854", "0.5458639", "0.54444516", "0.5438405", "0.5437966", "0.5426357", "0.5426006", "0.5421496", "0.5412026", "0.54062307", "0.5383638", "0.5377007", "0.5371517", "0.5369692", "0.5369692", "0.5362721", "0.53622466", "0.534868", "0.5343702", "0.5341475", "0.5340252", "0.5339791", "0.53351414", "0.53326154", "0.5330599", "0.5330144", "0.53233707", "0.5322884", "0.5315521", "0.53146684", "0.5295383", "0.5295081", "0.5292664", "0.5291153", "0.5274343", "0.52660584", "0.52619064", "0.52547807", "0.52547807", "0.52491045", "0.5244454", "0.52421886", "0.5239093", "0.5229864", "0.52255917", "0.5224718", "0.5216372", "0.52089447", "0.5205565", "0.5200673", "0.5200534", "0.5198182", "0.5197001", "0.51947105", "0.5191981", "0.5188254" ]
0.0
-1
///////////////////////////////////////////////////////////////////////////// Command Line GUI // ///////////////////////////////////////////////////////////////////////////// Prints the main menu interface for user display:
public void mainMenu() { System.out.println("\n HOTEL RESERVATION SYSTEM"); System.out.println("+------------------------------------------------------------------------------+"); System.out.println(" COMMANDS:"); System.out.println(" - View Tables\t\t(1)"); System.out.println(" - Add Records\t\t(2)"); System.out.println(" - Update Records\t(3)"); System.out.println(" - Delete Records\t(4)"); System.out.println(" - Search Records\t(5)"); System.out.println("+------------------------------------------------------------------------------+"); System.out.print(" > "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "private static void printMainMenu() {\n\t\tprintln(\"Main Menu:\");\n\t\tprintln(\"\\tI: Import Movie <Title>\");\n\t\tprintln(\"\\tD: Delete Movie <Title>\");\n\t\tprintln(\"\\tS: Sort Movies\");\n\t\tprintln(\"\\tA: Sort Actors\");\n\t\tprintln(\"\\tQ: Quit\");\n\t}", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "void printMainMenu(){\n\t\tSystem.out.println(\"\\n\\nMarketo Music\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"1. Create Playlist: create <playlist name>\");\n\t\tSystem.out.println(\"2. Edit Playlist: edit <playlist id>\");\n\t\tSystem.out.println(\"3. Print Song: song <song id>\");\n\t\tSystem.out.println(\"4. Print Playlist: playlist <playlist id>\");\n\t\tSystem.out.println(\"5. Print All Songs or Playlists: print song/playlist\");\n\t\tSystem.out.println(\"6. Search Song: search artist/title <string of words to be searched>\");\n\t\tSystem.out.println(\"7. Sort songs: sort artist/title\");\n\t\tSystem.out.println(\"8. Quit: quit\");\n\t\tSystem.out.print(\"Enter a Command : \");\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "public static void WriteMainMenu(){\r\n System.out.println(\"\\n=================Welcome to McDonalds=================\");\r\n System.out.println(\"1. Take Order \\n2. Edit McDonalds Menu \\n3. Exit application \");\r\n }", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "public static void displayMainMenu() {\n\t\tSystem.out.println(\"1.) Scan network\");//looks for IP address\n\t\tSystem.out.println(\"2.) Wait for connections\");//server\n\t\tSystem.out.println(\"3.) Connect to client\");//client\n\t\tSystem.out.println(\"4.) Exit\");\n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "public static void main(String[] args) {\n System.out.println(\"\\t\\t____________________________________\"); \r\n System.out.println(\"\\t\\t| |\");\r\n System.out.println(\"\\t\\t| Maintain Delivery man module |\");\r\n System.out.println(\"\\t\\t|____________________________________|\\n\\n\");\r\n mainMenu(); //call main menu \r\n }", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "static void DisplayMainMenu()\n {\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Menu\");\n \tSystem.out.println(\"******\");\n \tSystem.out.println(\"Enter Selection\");\n \tSystem.out.println(\"1) Send Message\");\n \tSystem.out.println(\"2) Receive Message\");\n \tSystem.out.println(\"3) Run regression test\");\n }", "private void printMainMenu() {\n\t\tSystem.out.println(\"1. Go adventuring\");\n\t\tSystem.out.println(\"2. Enter tavern\");\n\t\tSystem.out.println(\"3. Show details about your character\");\n\t\tSystem.out.println(\"4. Exit game\");\n\t}", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "private static void displayRepoMenu() {\n\t\tSystem.out.println(\"\\t Repo Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"su <username> : To subcribe users to repo \\n\"\n\t\t\t\t+ \"ci: To check in changes \\n\"\n\t\t\t\t+ \"co: To check out changes \\n\"\n\t\t\t\t+ \"rc: To review change \\n\"\n\t\t\t\t+ \"vh: To get revision history \\n\"\n\t\t\t\t+ \"re: To revert to previous version \\n\"\n\t\t\t\t+ \"ld : To list documents \\n\"\n\t\t\t\t+ \"ed <docname>: To edit doc \\n\"\n\t\t\t\t+ \"ad <docname>: To add doc \\n\"\n\t\t\t\t+ \"dd <docname>: To delete doc \\n\"\n\t\t\t\t+ \"vd <docname>: To view doc \\n\"\n\t\t\t\t+ \"qu : To quit \\n\" \n\t\t\t\t+ \"====================================\\n\");\n\t}", "public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "public static void main(String[] args) {\n Graphics.graphicsMainMenu();\r\n //Print main menu\r\n Menu.mainMenu();\r\n }", "private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\n\n Menu.displayMenu();\n }", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "public static void displayMenu(){\n //*Displays the Menu\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Food Item\", \"Size\", \"Options\", \"Price\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"---------\", \"----\", \"-------\", \"-----\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Drink\", \"S,M,L\", \"Sprite, Rootbeer, and Orange Fanta\", \"$5.50 for small, +$.50 for each size increase\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Burger\", \"N/A\", \"Extra Patty, bacon, cheese, lettuce\", \"$3.00 for a burger, +$.50 for additional toppings\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"tomato, pickles, onions\", \"\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Pizza\", \"S,M,L\", \"Pepperoni, sausage, peppers, chicken\", \"$5.00 for small, +$2.50 for each size increase,\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"salami, tomatoes, olives, anchovies\", \"+$1.00 for each extra topping\" );\n }", "private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE + ChatMaintainer.CS().getPartner());\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}", "public void printMenu()\n\t{\n\t\tSystem.out.println(SearchMenu.MENU_HEAD);\n\t\tSystem.out.println(SearchMenu.TYPE_MESSAGE );\n\t\tSystem.out.println(SearchMenu.QUIT);\n\t\tSystem.out.println(SearchMenu.MENU_TAIL);\n\t\tSystem.out.println(SearchMenu.INPUT_PROMPT);\n\t}", "public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public void showMenu() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\t1. Show vertices\");\n\t\tSystem.out.println(\"\\t2. Show adjacent vertices\");\n\t\tSystem.out.println(\"\\t3. Get vertex count\");\n\t\tSystem.out.println(\"\\t4. Get edge count\");\n\t\tSystem.out.println(\"\\t5. Add vertex\");\n\t\tSystem.out.println(\"\\t6. Add edge\");\n\t\tSystem.out.println(\"\\t7. Remove vertex\");\n\t\tSystem.out.println(\"\\t8. Remove edge\");\n\t\tSystem.out.println(\"\\t9. Check connectivity\");\n\t\tSystem.out.println(\"\\t0. Check adjacency\");\n\t\tSystem.out.println(\"\\tTRAVERSAL ALGORITHMS\");\n\t\tSystem.out.println(\"\\t11. Depth-first traversal\");\n\t\tSystem.out.println(\"\\t12. Breadth-first traversal\");\n\t\t\n\t\tSystem.out.println(\"\\tINPUT -1 TO EXIT\");\n\t\tSystem.out.println();\n\t}", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "public static void printMenu()\r\n\t{\r\n\t\tSystem.out.println(\"A) Add Scene\");\r\n\t\tSystem.out.println(\"R) Remove Scene\");\r\n\t\tSystem.out.println(\"S) Show Current Scene\");\r\n\t\tSystem.out.println(\"P) Print Adventure Tree\");\r\n\t\tSystem.out.println(\"B) Go Back A Scene\");\r\n\t\tSystem.out.println(\"F) Go Forward A Scene \");\r\n\t\tSystem.out.println(\"G) Play Game\");\r\n\t\tSystem.out.println(\"N) Print Path To Cursor\");\r\n\t\tSystem.out.println(\"M) Move Scene\");\r\n\t\tSystem.out.println(\"Q) Quit\");\r\n\t\tSystem.out.println();\r\n\t}", "public void printMenu()\n\t{\n\t\tSystem.out.println(ChatMenu.MENU_HEAD);\n\t\tSystem.out.println(ChatMenu.TYPE_MESSAGE);\n\t\tSystem.out.println(ChatMenu.QUIT);\n\t\tSystem.out.println(ChatMenu.MENU_TAIL);\n\t\tSystem.out.println(ChatMenu.INPUT_PROMPT);\n\t}", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "public void displayMenu() {\r\n\t\tSystem.out.println(\"Enter a number between 0 and 8 as explained below: \\n\");\r\n\t\tSystem.out.println(\"[\" + ADD_CUSTOMER + \"] Add a customer.\");\r\n\t\tSystem.out.println(\"[\" + ADD_MODEL + \"] Add a model.\");\r\n\t\tSystem.out.println(\"[\" + ADD_TO_INVENTORY + \"] Add a washer to inventory.\");\r\n\t\tSystem.out.println(\"[\" + PURCHASE + \"] Purchase a washer.\");\r\n\t\tSystem.out.println(\"[\" + LIST_CUSTOMERS + \"] Display all customers.\");\r\n\t\tSystem.out.println(\"[\" + LIST_WASHERS + \"] Display all washers.\");\r\n\t\tSystem.out.println(\"[\" + DISPLAY_TOTAL + \"] Display total sales.\");\r\n\t\tSystem.out.println(\"[\" + SAVE + \"] Save data.\");\r\n\t\tSystem.out.println(\"[\" + EXIT + \"] to Exit\");\r\n\t}", "public static void main(String[] args) {\n\t\tnew menu().InitUI();\r\n\t}", "public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public static void main(String[] args){\n\n main_menu();\n\n }", "private static void mostrarMenu() {\n\t\tSystem.out.println(\"AVAILABLE ORDERS\");\n\t\tSystem.out.println(\"================\");\n\t\tSystem.out\n\t\t\t\t.println(\"HELP - shows information on \" +\n\t\t\t\t\t\t\"available orders\");\n\t\tSystem.out\n\t\t\t\t.println(\"DIR - displays the content \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t .println(\"DIRGALL - displays the content\" +\n\t\t\t\t \" of current directory\");\n System.out\n\t\t .println(\" and all its internal\" +\n\t\t\t\t \" subdirectories\"); \t\t\n\t\tSystem.out\n\t\t\t\t.println(\"CD dir - changes the current \" +\n\t\t\t\t\t\t\"directory to its subdirectory [dir]\");\n\t\tSystem.out\n\t\t\t\t.println(\"CD .. - changes the current \" +\n\t\t\t\t\t\t\"directory to its father directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"WHERE - shows the path and name \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"FIND text - shows all the images \" +\n\t\t\t\t\t\t\"whose name includes [text]\");\n\t\tSystem.out\n\t\t\t\t.println(\"DEL text - information and delete \" +\n\t\t\t\t\t\t\"a picture named [text] of current \" +\n\t\t\t\t\t\t\"directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"MOVE text - move an image named \" +\n\t\t\t\t\t\t\"[text] to another directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMG time - displays a carousel \" +\n\t\t\t\t\t\t\"with the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" each image is displayed\" +\n\t\t\t\t\t\t\" [time] seconds\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMGALL time - displays a carousel with\" +\n\t\t\t\t\t\t\" the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" and in all its internal\" +\n\t\t\t\t\t\t\" subdirectories; each image is\");\n\t\tSystem.out.println(\" displayed [time] \" +\n\t\t\t\t\"seconds\");\n\t\tSystem.out.println(\"BIGIMG - displays the bigest image int the current\" +\n\t\t\t\t\"directory\");\n\t\tSystem.out.println(\"END - ends of program \" +\n\t\t\t\t\"execution\");\n\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }", "public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }", "public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }", "public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "private void printLoggedInMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \n\t\t\"1.Search Users\", \"2.Search Movies\", \"3.View Feed\", \"4.View Profile\", \"5.Logout\", \"6.Exit\");\n\t}", "private String print_Menu()\n\t{\n\t\tSystem.out.println(\"\\n----------CS542 Link State Routing Simulator----------\");\n\t\tSystem.out.println(\"(1) Create a Network Topology\");\n\t\tSystem.out.println(\"(2) Build a Forward Table\");\n\t\tSystem.out.println(\"(3) Shortest Path to Destination Router\");\n\t\tSystem.out.println(\"(4) Modify a Topology (Change the status of the Router)\");\n\t\tSystem.out.println(\"(5) Best Router for Broadcast\");\n\t\tSystem.out.println(\"(6) Exit\");\n\t\tSystem.out.print(\"Master Command: \");\n\n\t\treturn scan.next();\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }", "private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }", "public static void main(String[] args) {\n\t\tnew MainMenuGUI();\n\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "public static void archMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Architect Profile\");\n System.out.println(\"2 - Search for Architect Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void main(String[] args) {\n System.out.print(\"-======================================================================-\");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" CAL'S DINER \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.print(\"-======================================================================-\");\n \n \n //Display 3 special on menu\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\" Today's Special\");\n System.out.println(\" $26.00.......... 8oz Steak\");\n System.out.println(\" $16.00...........Spaghetti and Meatballs\");\n System.out.println(\" $17.00..........Homestyle Chicken Sandwich\");\n \n }", "private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }", "private static void helpMenuLines(){\n setMenuLines(\"\",7,9,11,13,15,16,18,20);\n setMenuLines(\"Welcome to Ben's CMR program. Here are the main commands:\",1);\n setMenuLines(HIGHLIGHT_COLOR + \"new lead\" + ANSI_RESET + \" - Creates a new Lead\",4);\n setMenuLines(HIGHLIGHT_COLOR + \"convert <ID>\" + ANSI_RESET + \" - Converts a Lead into an Opportunity\",6);\n setMenuLines(HIGHLIGHT_COLOR + \"close-won <ID>\" + ANSI_RESET + \" - Close Won Opportunity\",8);\n setMenuLines(HIGHLIGHT_COLOR + \"close-lost <ID>\" + ANSI_RESET + \" - Close Lost Opportunity\",10);\n setMenuLines(HIGHLIGHT_COLOR + \"lookup <OBJECT> <ID>\" + ANSI_RESET + \" - Search for specific Lead, Opportunity, Account or Contact\",12);\n setMenuLines(HIGHLIGHT_COLOR + \"show <OBJECT PLURAL>\" + ANSI_RESET + \" - List all Leads, Opportunities, Accounts or Contacts\",14);\n setMenuLines(HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" - Explains usage of available commands\",17);\n setMenuLines(HIGHLIGHT_COLOR + \"save\" + ANSI_RESET + \" - Saves the changed data\",19);\n setMenuLines(HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" - Saves and exits the program\",21);\n }", "public static void main(String[] args){\n JFrame jTest = new JFrame(\"Menu Bar Test\");\n jTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jTest.setLayout(new GridLayout(0,1));\n String[] s = {\"Customer Number\",\"Simulation Time\"};\n menuSequence m = new menuSequence(\"Termination Method: \",s);\n jTest.add(m);\n jTest.setSize(500,500);\n jTest.setVisible(true);\n }", "public void displayMenu() {\n\t\tSystem.out.println(\"\\n1 to see vehicles in a date interval\");\n\t\tSystem.out.println(\"2 to see a specific reservation\");\n\t\tSystem.out.println(\"3 to see all reservations\");\n\t\tSystem.out.println(\"9 to exit\\n\");\n\t\ttry {\n\t\t\tString in = reader.readLine();\n\t\t\tswitch (in) {\n\t\t\tcase \"1\":\n\t\t\t\tdisplayCarsInInterval();\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdisplaySpecificBooking();\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdisplayBookings();\n\t\t\t\tbreak;\n\t\t\tcase \"9\":\n\t\t\t\tSystem.out.println(\"Client application terminated\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Please insert a valid number\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unexpected problem with reading your input, please try again.\");\n\t\t}\n\t\tdisplayMenu();\n\t}", "public static void proManMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Project Manager Profile\");\n System.out.println(\"2 - Search for Project Manager Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void main( String[] args )\n{\n\tJFrame frame = new JFrame(\"MainMenu\");\n\tframe.setContentPane(new MainMenu().rootPanel);\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\tframe.setVisible(true);\n\tframe.setLocationRelativeTo(null);\n\tframe.pack();\n}", "public static void main(String[] args) {\n\n UIController.getInstance().setMain(new SelectionMenuUI());\n UIController.getInstance().startUI();\n\n }", "public static void main(String[] args) {\n mainMenu();\n }", "public static void cusMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Customer Profile\");\n System.out.println(\"2 - Search for Customer Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }", "public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }", "public static void main(String[] args)\r\n {\n\t\t System.out.println(\"************* Welocome To My Application ************* \");\r\n\t\t MainMenu();\r\n }", "static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }", "public static void main(String[] args) \n\t{\n\t\tMenu();// calls menu method\n\t}" ]
[ "0.798581", "0.7844938", "0.77456725", "0.77109504", "0.7680352", "0.7587829", "0.7562537", "0.7502393", "0.7497406", "0.7440301", "0.74396896", "0.74394417", "0.7398685", "0.738605", "0.73757803", "0.7373146", "0.7352839", "0.7350373", "0.7345084", "0.7343485", "0.73278946", "0.7320817", "0.73074174", "0.7293164", "0.7262321", "0.72614753", "0.7253798", "0.7234677", "0.7223599", "0.7213762", "0.7200005", "0.71859354", "0.7182755", "0.71790725", "0.71638566", "0.71459955", "0.7143082", "0.7126688", "0.71246475", "0.71234584", "0.7115182", "0.7101515", "0.70961565", "0.7083826", "0.70732605", "0.70678365", "0.7048649", "0.7033424", "0.70282185", "0.7011426", "0.7007899", "0.7006047", "0.70038974", "0.69972056", "0.6986599", "0.69701564", "0.6962891", "0.69445837", "0.6928694", "0.69082475", "0.6901938", "0.68846023", "0.6883225", "0.6866491", "0.6859737", "0.6857576", "0.68489337", "0.683703", "0.68290854", "0.68280995", "0.6822856", "0.68126583", "0.68067765", "0.680472", "0.6783802", "0.678295", "0.6776149", "0.6765443", "0.67488873", "0.6745974", "0.67421514", "0.6736296", "0.6726133", "0.67211854", "0.67142", "0.67117906", "0.6705529", "0.6689537", "0.6689499", "0.6684493", "0.6671707", "0.66627455", "0.66492", "0.6649058", "0.66397464", "0.6636327", "0.66315", "0.66267866", "0.66262686", "0.66166204" ]
0.78720456
1
///////////////////////////////////////////////////////////////////////////// Getter and Setter Methods // /////////////////////////////////////////////////////////////////////////////
public String getCity() { return this.city; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public int\t\tget() { return value; }", "public V get() {\n return value;\n }", "@Override\n String get();", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public void get() {\n }", "public Object get()\n {\n return m_internalValue;\n }", "public String get();", "public String get()\n {\n return this.string;\n }", "public Object getValue() { return _value; }", "public byte[] get(){\n return this.value;\n }", "public String get() {\n return value;\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public Object getValue(){\n \treturn this.value;\n }", "String setValue();", "public int value() { \n return this.value; \n }", "public abstract String get();", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public Object getValue() { return this.value; }", "public Object getNewValue()\n {\n return newValue;\n }", "public String get() {\n return this.value;\n }", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public Object getValue()\n {\n\treturn value;\n }", "public int get () { return rating; }", "public Value getValue(){\n return this.value;\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "V getValue() {\n return value;\n }", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "protected abstract Set method_1559();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public String get()\n {\n return val;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "String getValue() {\n return mValue;\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public S getValue() { return value; }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public int value(){\n return this.value;\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public String getValue(){\n return this.value;\n }", "public int getSet() {\n return set;\n }", "@Override\n public int getValue() {\n return super.getValue();\n }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "@Override\n public String getValue() {\n return value;\n }", "public int getValue() \n {\n return value;\n }", "public void setAge(int age) { this.age = age; }", "@Override\n public int get()\n { \n return this.pr;\n }", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public final Object get() {\n return getValue();\n }", "public int getValue(){\n return this.value;\n }", "@Override\n Derived get();", "public int getAge() {return age;}", "public String getName () { return this.name; }", "private ReadProperty()\r\n {\r\n\r\n }", "public int getIntValue()\n {\n return value;\n }", "public int getIntValue()\n {\n return value;\n }", "public void setdat()\n {\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public void setPrice(double price){this.price=price;}", "public String getValue () { return value; }", "@Override\n public C get() {\n return content;\n }", "public Object get_KeyValue(){return\t\t\t Id;}", "public int value() \n {\n return value;\n }", "public void setValue(Object value) { this.value = value; }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object getValue()\n {\n return value;\n }", "public Object getVal()\n { return val; }", "public int getValue(){\n return value;\n }", "String getName(){return this.name;}", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "int getBlue(){\n\n return this.blue;\n }", "String get();", "String get();", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "boolean get();", "public double getPrice(){return price;}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public Object get() {\r\n\treturn bgclip;\r\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public int getAge(){\n return age;\n }", "protected V getValue() {\n return this.value;\n }", "public Book getBook() \t\t{ return this.myBook; }", "public String get_name(){\n return _name;\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();" ]
[ "0.71759343", "0.7073191", "0.68533075", "0.68533075", "0.6837904", "0.67205787", "0.6712476", "0.66932213", "0.6632896", "0.6607207", "0.65712476", "0.6567102", "0.6528377", "0.6511175", "0.6495054", "0.6491604", "0.64664686", "0.6459886", "0.6454273", "0.64386123", "0.6429045", "0.64217967", "0.64214855", "0.6396936", "0.6379872", "0.63689685", "0.6365922", "0.6362837", "0.63394344", "0.6308672", "0.62970746", "0.6282908", "0.6259408", "0.6256556", "0.6256556", "0.62550694", "0.62542814", "0.62526727", "0.6240631", "0.62277204", "0.6212697", "0.61348325", "0.6134661", "0.61157626", "0.611424", "0.61095405", "0.61018795", "0.609502", "0.6074997", "0.6055409", "0.60534376", "0.6051601", "0.60420454", "0.60401267", "0.6034559", "0.60336155", "0.60287285", "0.6021921", "0.6021572", "0.601425", "0.6012272", "0.60094047", "0.60089755", "0.59935063", "0.59935063", "0.59907323", "0.59902656", "0.5989987", "0.59858733", "0.59819645", "0.5975346", "0.5972358", "0.59715986", "0.5969678", "0.59631336", "0.5946686", "0.59460443", "0.5942342", "0.5940659", "0.593791", "0.59192455", "0.59192455", "0.5910775", "0.5909464", "0.5909367", "0.59092206", "0.5908886", "0.5908151", "0.59058577", "0.59056354", "0.5904531", "0.590389", "0.59022003", "0.5897574", "0.58800733", "0.58778197", "0.58757794", "0.58757794", "0.5874806", "0.5874806", "0.5874806" ]
0.0
-1
/ renamed from: a
public gd mo2403a(au auVar) { return new pl(this, getContext()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public boolean mo2467a() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
public boolean mo2468b() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: c
public boolean mo2469c() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "abstract String mo1748c();", "private void kk12() {\n\n\t}", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "public abstract void mo70710a(String str, C24343db c24343db);", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "byte mo30283c();", "public final void mo11687c() {\n }", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public abstract String mo11611b();", "public interface C9223b {\n }", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo72113b();", "public interface C0764b {\n}", "void mo1749a(C0288c cVar);", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C0938b {\n }", "void mo80455b();", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}" ]
[ "0.646023", "0.6441935", "0.6431023", "0.6417576", "0.6412886", "0.6397014", "0.62504345", "0.6247425", "0.62438375", "0.6231897", "0.61910754", "0.6165594", "0.61528003", "0.6149262", "0.6138536", "0.61364913", "0.61308527", "0.61036843", "0.609853", "0.6076961", "0.6061939", "0.6050559", "0.60471463", "0.6030308", "0.6027267", "0.60085833", "0.5998003", "0.59780973", "0.59565556", "0.5948767", "0.5937481", "0.5911918", "0.5905917", "0.5902594", "0.58840746", "0.5872173", "0.58655053", "0.5850816", "0.5819776", "0.581646", "0.5801529", "0.5789546", "0.57865655", "0.5778088", "0.57634664", "0.5734382", "0.5734083", "0.5727698", "0.5723496", "0.5713694", "0.5708715", "0.5707952", "0.5698559", "0.56980413", "0.5691187", "0.56878", "0.56878", "0.56761485", "0.56749475", "0.5659746", "0.5658919", "0.5657985", "0.5653132", "0.5653119", "0.56492734", "0.5641236", "0.56386966", "0.5638344", "0.56308514", "0.5630626", "0.5618713", "0.5617213", "0.5610731", "0.55965334", "0.55904454", "0.5581427", "0.5580782", "0.5573293", "0.5572724", "0.5569311", "0.5569131", "0.55623966", "0.55600923", "0.55567914", "0.5552629", "0.5550099", "0.5547118", "0.55451196", "0.55393326", "0.5536628", "0.5531286", "0.5528421", "0.55193967", "0.55183125", "0.5517036", "0.5516213", "0.55144805", "0.55136347", "0.55095464", "0.55040264", "0.54992807" ]
0.0
-1
/ renamed from: d
public void mo2470d() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void d() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public abstract int d();", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public int d()\n {\n return 1;\n }", "public interface C19512d {\n /* renamed from: dd */\n void mo34676dd(int i, int i2);\n }", "void mo21073d();", "@Override\n public boolean d() {\n return false;\n }", "int getD();", "public void dor(){\n }", "public int getD() {\n\t\treturn d;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public String getD() {\n return d;\n }", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "public D() {}", "void mo17013d();", "public int getD() {\n return d_;\n }", "void mo83705a(C32458d<T> dVar);", "public void d() {\n\t\tSystem.out.println(\"d method\");\n\t}", "double d();", "public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }", "protected DNA(Population pop, DNA d) {\n\t\t// TODO: implement this\n\t}", "public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }", "public abstract C17954dh<E> mo45842a();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}", "public abstract void mo56925d();", "void mo54435d();", "public void mo21779D() {\n }", "public void d() {\n this.f20599d.a(this.f20598c);\n this.f20598c.a(this);\n this.f20601f = new a(new d());\n d.a(this.f20596a, this.f20597b, this.f20601f);\n this.f20596a.setLayoutManager(new NPALinearLayoutManager(getContext()));\n ((s) this.f20596a.getItemAnimator()).setSupportsChangeAnimations(false);\n this.f20596a.setAdapter(this.f20601f);\n this.f20598c.a(this.f20602g);\n }", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "void mo28307a(zzgd zzgd);", "List<String> d();", "d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }", "public int getD() {\n return d_;\n }", "public void addDField(String d){\n\t\tdfield.add(d);\n\t}", "public void mo3749d() {\n }", "public a dD() {\n return new a(this.HG);\n }", "public String amd_to_dma(java.sql.Date d)\n {\n String resp = \"\";\n if (d!=null)\n {\n String sdat = d.toString();\n String sano = sdat.substring(0,4);\n String smes = sdat.substring(5,7);\n String sdia = sdat.substring(8,10);\n resp = sdia+\"/\"+smes+\"/\"+sano;\n }\n return resp;\n }", "public void mo130970a(double d) {\n SinkDefaults.m149818a(this, d);\n }", "public abstract int getDx();", "public void mo97908d() {\n }", "public com.c.a.d.d d() {\n return this.k;\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "public boolean d() {\n return false;\n }", "void mo17023d();", "String dibujar();", "@Override\n\tpublic void setDurchmesser(int d) {\n\n\t}", "public abstract VH mo102583a(ViewGroup viewGroup, D d);", "public abstract String mo41079d();", "public void setD ( boolean d ) {\n\n\tthis.d = d;\n }", "public Dx getDx() {\n/* 32 */ return this.dx;\n/* */ }", "DoubleNode(int d) {\n\t data = d; }", "DD createDD();", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }", "public int d()\r\n {\r\n return 20;\r\n }", "float getD();", "public static int m22546b(double d) {\n return 8;\n }", "void mo12650d();", "String mo20732d();", "static void feladat4() {\n\t}", "void mo130799a(double d);", "public void mo2198g(C0317d dVar) {\n }", "@Override\n public void d(String TAG, String msg) {\n }", "private double convert(double d){\n\t\tDecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\",symbols); \n\t\treturn Double.valueOf(df.format(d));\n\t}", "public void d(String str) {\n ((b.b) this.b).g(str);\n }", "public abstract void mo42329d();", "public abstract long mo9229aD();", "public abstract String getDnForPerson(String inum);", "public interface ddd {\n public String dan();\n\n}", "@Override\n public void func_104112_b() {\n \n }", "public Nodo (String d){\n\t\tthis.dato = d;\n\t\tthis.siguiente = null; //para que apunte el nodo creado a nulo\n\t}", "public void mo5117a(C0371d c0371d, double d) {\n new C0369b(this, c0371d, d).start();\n }", "public interface C27442s {\n /* renamed from: d */\n List<EffectPointModel> mo70331d();\n}", "public final void m22595a(double d) {\n mo4383c(Double.doubleToRawLongBits(d));\n }", "public void d() {\n this.f23522d.a(this.f23521c);\n this.f23521c.a(this);\n this.i = new a();\n this.i.a(new ae(this.f23519a));\n this.f23519a.setAdapter(this.i);\n this.f23519a.setOnItemClickListener(this);\n this.f23521c.e();\n this.h.a(hashCode(), this.f23520b);\n }", "public Vector2d(double d) {\n\t\tthis.x = d;\n\t\tthis.y = d;\n\t}", "DomainHelper dh();", "private Pares(PLoc p, PLoc s, int d){\n\t\t\tprimero=p;\n\t\t\tsegundo=s;\n\t\t\tdistancia=d;\n\t\t}", "static double DEG_to_RAD(double d) {\n return d * Math.PI / 180.0;\n }", "@java.lang.Override\n public float getD() {\n return d_;\n }", "private final VH m112826b(ViewGroup viewGroup, D d) {\n return mo102583a(viewGroup, d);\n }", "public Double getDx();", "public void m25658a(double d) {\n if (d <= 0.0d) {\n d = 1.0d;\n }\n this.f19276f = (float) (50.0d / d);\n this.f19277g = new C4658a(this, this.f19273c);\n }", "boolean hasD();", "public abstract void mo27386d();", "MergedMDD() {\n }", "@ReflectiveMethod(name = \"d\", types = {})\n public void d(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "@Override\n public Chunk d(int i0, int i1) {\n return null;\n }", "public void d(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 47: */ {\r\n/* 48: 68 */ BlockPosition localdt = paramdt.offset(((EnumDirection)parambec.getData(a)).opposite());\r\n/* 49: 69 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 50: 70 */ if (((localbec.getType() instanceof bdq)) && (((Boolean)localbec.getData(bdq.b)).booleanValue())) {\r\n/* 51: 71 */ paramaqu.g(localdt);\r\n/* 52: */ }\r\n/* 53: */ }", "double defendre();", "public static int setDimension( int d ) {\n int temp = DPoint.d;\n DPoint.d = d;\n return temp;\n }", "public Datum(Datum d) {\n this.dan = d.dan;\n this.mesec = d.mesec;\n this.godina = d.godina;\n }", "public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}" ]
[ "0.63810617", "0.616207", "0.6071929", "0.59959275", "0.5877492", "0.58719957", "0.5825175", "0.57585526", "0.5701679", "0.5661244", "0.5651699", "0.56362265", "0.562437", "0.5615328", "0.56114155", "0.56114155", "0.5605659", "0.56001145", "0.5589302", "0.5571578", "0.5559222", "0.5541367", "0.5534182", "0.55326", "0.550431", "0.55041796", "0.5500838", "0.54946786", "0.5475938", "0.5466879", "0.5449981", "0.5449007", "0.54464436", "0.5439673", "0.543565", "0.5430978", "0.5428843", "0.5423923", "0.542273", "0.541701", "0.5416963", "0.54093426", "0.53927654", "0.53906536", "0.53793144", "0.53732955", "0.53695524", "0.5366731", "0.53530186", "0.535299", "0.53408253", "0.5333639", "0.5326304", "0.53214055", "0.53208005", "0.5316437", "0.53121597", "0.52979535", "0.52763224", "0.5270543", "0.526045", "0.5247397", "0.5244388", "0.5243049", "0.5241726", "0.5241194", "0.523402", "0.5232349", "0.5231111", "0.5230985", "0.5219358", "0.52145815", "0.5214168", "0.5209237", "0.52059376", "0.51952434", "0.5193699", "0.51873696", "0.5179743", "0.5178796", "0.51700175", "0.5164517", "0.51595956", "0.5158281", "0.51572365", "0.5156627", "0.5155795", "0.51548296", "0.51545656", "0.5154071", "0.51532024", "0.5151545", "0.5143571", "0.5142079", "0.5140048", "0.51377696", "0.5133826", "0.5128858", "0.5125679", "0.5121545" ]
0.53250664
53
/ renamed from: e
public void mo2471e() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void e() {\n\n\t}", "public void e() {\n }", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\n public void e(String TAG, String msg) {\n }", "public String toString()\r\n {\r\n return e.toString();\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public Object element() { return e; }", "@Override\n public void e(int i0, int i1) {\n\n }", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "private static Throwable handle(final Throwable e) {\r\n\t\te.printStackTrace();\r\n\r\n\t\tif (e.getCause() != null) {\r\n\t\t\te.getCause().printStackTrace();\r\n\t\t}\r\n\t\tif (e instanceof SAXException) {\r\n\t\t\t((SAXException) e).getException().printStackTrace();\r\n\t\t}\r\n\t\treturn e;\r\n\t}", "void event(Event e) throws Exception;", "Event getE();", "public int getE() {\n return e_;\n }", "@Override\n\tpublic void onException(Exception e) {\n\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(2));\r\n\t\t\t}", "public byte e()\r\n/* 84: */ {\r\n/* 85:86 */ return this.e;\r\n/* 86: */ }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(1));\r\n\t\t\t}", "public void toss(Exception e);", "private void log(IndexObjectException e) {\n\t\t\r\n\t}", "public int getE() {\n return e_;\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}", "protected void processEdge(Edge e) {\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"E \" + super.toString();\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(0));\r\n\t\t\t}", "public Element getElement() {\n/* 78 */ return this.e;\n/* */ }", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "void mo57276a(Exception exc);", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "public Throwable getOriginalException()\n/* 28: */ {\n/* 29:56 */ return this.originalE;\n/* 30: */ }", "@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}", "private void sendOldError(Exception e) {\n }", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void processMouseEvent(MouseEvent e) {\n super.processMouseEvent(e);\n }", "private void printInfo(SAXParseException e) {\n\t}", "@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}", "String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }", "public <E> E getE(E e){\n return e;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vE\")\n private void vE(NamedEntity e) {\n sig.add(e);\n }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}", "void showResultMoError(String e);", "public int E() {\n \treturn E;\n }", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }", "@Override\n public String toString() {\n return \"[E]\" + super.toString() + \"(at: \" + details + \")\";\n }", "public static void error(boolean e) {\n E = e;\n }", "public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}", "public void m58944a(E e) {\n this.f48622a = e;\n }", "void mo43357a(C16726e eVar) throws RemoteException;", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\n\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }", "public RuntimeException processException(RuntimeException e)\n\n {\n\treturn new RuntimeException(e);\n }", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t}", "@java.lang.Override\n public java.lang.String getE() {\n java.lang.Object ref = e_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n e_ = s;\n return s;\n }\n }", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void logException(Exception e) {\r\n if (log.isErrorEnabled()) {\r\n log.logError(LogCodes.WPH2004E, e, e.getClass().getName() + \" processing field \");\r\n }\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public e o() {\r\n return k();\r\n }", "@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.72328156", "0.66032064", "0.6412127", "0.6362734", "0.633999", "0.62543726", "0.6232265", "0.6159535", "0.61226326", "0.61226326", "0.60798717", "0.6049423", "0.60396963", "0.60011584", "0.5998842", "0.59709895", "0.59551716", "0.5937381", "0.58854383", "0.5870234", "0.5863486", "0.58606255", "0.58570576", "0.5832809", "0.57954526", "0.5784194", "0.57723534", "0.576802", "0.57466", "0.57258075", "0.5722709", "0.5722404", "0.57134414", "0.56987166", "0.5683048", "0.5671214", "0.5650087", "0.56173986", "0.56142104", "0.56100404", "0.5604611", "0.55978096", "0.5597681", "0.55941516", "0.55941516", "0.55941516", "0.5578516", "0.55689955", "0.5568649", "0.5564652", "0.5561944", "0.5561737", "0.5560318", "0.555748", "0.5550611", "0.5550611", "0.5550611", "0.5550611", "0.5547971", "0.55252135", "0.5523029", "0.55208814", "0.5516037", "0.5512", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118424", "0.55118227", "0.5509796", "0.5509671", "0.5503605", "0.55015326", "0.5499632", "0.54921895", "0.54892236", "0.5483562", "0.5483562", "0.5482999", "0.54812574", "0.5479943", "0.54787004", "0.54778624", "0.5472073", "0.54695076", "0.54695076", "0.54695076", "0.54695076", "0.54695076", "0.54695076", "0.54695076", "0.54695076", "0.5468417", "0.54673034", "0.54645115" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e(TAG, "onCreate"); IntentFilter filter = new IntentFilter(); filter.addAction(END_CAMERA_ACTIVITY_BROADCAST); filter.addAction(GET_CAPTURE_RESULT_DATA_BROADCAST); registerReceiver(mReceiver, filter); Intent it = this.getIntent(); if(it != null){ deviceId = it.getIntExtra("cameraID", -1); } Log.e(TAG, "CAMERA_ID = " + deviceId); Intent localIntent; localIntent = new Intent(); localIntent.setAction(Intent.ACTION_MAIN); localIntent.setClassName("com.mediatek.stereocamera","com.mediatek.stereocamera.StereoCamera"); localIntent.putExtra("cameraID",deviceId); localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Gionee zhangke 20160422 modify for CR01673305 start try { startActivityForResult(localIntent, 0); } catch (Exception e) { Log.e(TAG, "ActivityNotFoundException"); Log.v(TAG, Log.getStackTraceString(e)); } ((AutoMMI) getApplication()).recordResult(TAG, "", "0"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onStart() { super.onStart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onStop() { super.onStop(); Log.e(TAG, "onStop"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onDestroy() { Log.e(TAG, "onDestroy"); unregisterReceiver(mReceiver); super.onDestroy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Programa principal. Se leen los datos almacenados en el archivo "datos.txt" y se guardan en el LinkedList "al".
public static void main(String [] args) { MarcoDeDatos ldd = new MarcoDeDatos(); System.out.println("Voy a leer los datos"); ldd.leerDatos("NOTAS ST0242.csv"); ldd.leerDatos("NOTAS ST0245.csv"); ldd.leerDatos("NOTAS ST0247.csv"); System.out.println("Ya leí los datos"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void LoadTxt(File Arquivo) {\n if (Arquivo.exists()) {\r\n\r\n try {\r\n\r\n FileReader FR = new FileReader(Arquivo);\r\n BufferedReader BW = new BufferedReader(new InputStreamReader(new FileInputStream(Arquivo.getAbsolutePath()), \"ISO-8859-1\"));\r\n\r\n //BufferedReader BW = new BufferedReader(FR);\r\n\r\n String dados;\r\n String[] paraArray = new String[3];\r\n String matricula;\r\n \r\n String serie = Arquivo.getName();\r\n int pos = serie.lastIndexOf(\".\");\r\n if (pos > 0) {\r\n serie = serie.substring(0, pos);\r\n }\r\n\r\n Sala novaSala = new Sala(serie); //CRIANDO SALA COM NOME DE TURMA\r\n salas2.add(novaSala); // ADICIONANDO SALA NA LISTA DE SALAS\r\n while ((dados = BW.readLine()) != null) {\r\n paraArray = dados.split(\";\");\r\n\r\n matricula = /*Integer.parseInt*/ (paraArray[0]);\r\n //senha = /*Integer.parseInt*/(paraArray[2]);\r\n Dados novoDado = new Dados(matricula, paraArray[1], paraArray[2]);\r\n\r\n novoDado.setSerie(serie); //ADICIONANDO TURMA AO DADO\r\n novaSala.getDadosalas().add(novoDado); //ADICIONANDO DADOS A LISTA DE DADOS QUE ESTA EM SALA\r\n\r\n }\r\n \r\n\r\n BW.close();\r\n FR.close();\r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Erro ao carregar arquivo acima\");\r\n System.out.println(e.getMessage());\r\n\r\n }\r\n\r\n } else {\r\n System.out.println(\"Nenhum arquivo de dados encontrado\");\r\n }\r\n\r\n }", "public void ler()\n {\n lerDados( AxellIO.readLine(\"\") );\n }", "public void llenDic(){\r\n ArrayList<String> wor= new ArrayList<String>();\r\n ArrayList<Association<String,String> >asociaciones= new ArrayList<Association<String,String>>();\r\n \r\n try {\r\n \r\n arch = new File (\"diccionario.txt\");\r\n fr = new FileReader (arch);\r\n br = new BufferedReader(fr);\r\n\r\n \r\n String lin;\r\n \r\n while((lin=br.readLine())!=null){\r\n wor.add(lin);\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n \r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n \r\n //Ciclo para separar y obtener la palabra en ingles y español\r\n for(int i=0; i<wor.size()-1;i++){\r\n int lugar=wor.get(i).indexOf(',');\r\n String ing=wor.get(i).substring(0,lugar);\r\n String esp=wor.get(i).substring(lugar+1,wor.get(i).length());\r\n asociaciones.add(new Association(ing, esp));\r\n }\r\n \r\n rz.setValue(asociaciones.get(0));\r\n for (int i=1; i<asociaciones.size(); i++){\r\n insertarNodo(rz, asociaciones.get(i));\r\n }\r\n }", "public LinkedList InicioListaConstructor(){\n\t\t String sCurrentLine, AreaTrab;\n\t\t LinkedList<String> lista= new LinkedList<String>();\n\t\t boolean flag=true;\n\t\t int contador1, contador3;\n\t\t try{\n\t\t\t BufferedReader leer = new BufferedReader(new FileReader(\"Maq.txt\"));\n\t\t\t contador3=1;\n\t\t\t sCurrentLine = leer.readLine();\n\t\t\t AreaTrab= sCurrentLine;\n\t\t\t lista.add(AreaTrab);\n\t\t\t contador1=1; //Elementos que faltaron por revisar.\n\t\t\t while ((sCurrentLine = leer.readLine()) != null) {\n\t\t\t\t if(flag==true){\n\t\t\t\t\t if(contador1%3==0){\n\t\t \t\t\tif(sCurrentLine.equals(AreaTrab)==false){\n\t\t \t\t\t\tflag=false;\n\t\t \t\t\t}\n\t\t \t\t}else if(contador1%3==1 |contador1%3==2){\n\t\t \t\t\tlista.add(sCurrentLine);\n\t\t \t\t}\n\t\t\t\t\t contador1++;\n\t\t\t\t }\n\t \tcontador3++;\t\n\t \t}\n\t\t\t System.out.println(\"*****\");\n\t\t\t leer.close();\n\t\t\t for(int i=0; i<lista.size(); i++){\n\t\t\t\t System.out.println(lista.get(i));\n\t\t\t }\n\t\t\t System.out.println(\"*****\");\n\t\t\t\t //Quedan elementos:\n\t\t\t lista.add(String.valueOf(contador1));\n\t\t\t lista.add(String.valueOf(contador3));\n\t\t\t\t return lista;\n\t\t\t\n\t\t }catch (IOException e) {\n\t System.out.println(\"File not found\");\n\t return null;\n\t\t }\n\t}", "public static void RT() {////cada clase que tiene informacion en un archivo txt tiene este metodo para leer el respectivo archivoy guardarlo en su hashmap\n\t\treadTxt(\"peliculas.txt\", pelisList);\n\t}", "public void guardaLlista() throws IOException {\n ctrl_Persistencia.guardaLlista(\"@../../Dades/\"+list.getNomLlista()+\".llista\",list);\n }", "private ArrayList<Alimento> initLista() {\n try {\n File file = new File(\"C:\\\\Users\\\\Gabri\\\\OneDrive\\\\Ambiente de Trabalho\\\\Calorie\\\\src\\\\Assets\\\\alimentos.txt\");\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n\n ArrayList<Alimento> lista = new ArrayList<>();\n\n int noLines = Integer.parseInt(br.readLine());\n for(int l=0; l<noLines; l++) {\n String[] alimTks = (br.readLine()).split(\",\");\n\n Alimento alimento = new Alimento(idAlimCounter++,alimTks[0],100,Integer.parseInt(alimTks[1]),Float.parseFloat(alimTks[2]),Float.parseFloat(alimTks[3]),Float.parseFloat(alimTks[4]));\n lista.add(alimento);\n }\n\n return lista;\n }catch (Exception e) {\n System.out.println(\"Sistema - getLista() : \"+e.toString());\n }\n return null;\n }", "private void limpiarDatos() {\n\t\t\n\t}", "private void skaitymasIsFailo() {\n try {\n String eilute = _bufferis.readLine();\n while (eilute != null) {\n eilute = _bufferis.readLine();\n varduSarasas.add(eilute);\n }\n _bufferis.close();\n _in.close();\n } catch (Exception e) {\n\n }\n }", "private void leerOracion(){\r\n\tString wor=\"\";\r\n\r\n try {\r\n\r\n arch = new File (\"texto.txt\");\r\n fr = new FileReader (arch);\r\n br = new BufferedReader(fr);\r\n\r\n String lin;\r\n int ind=0;\r\n while((lin=br.readLine())!=null){\r\n \twor=lin;\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n\r\n\twhile(wor.compareTo(\"\")!=0){\r\n\tint lugar=wor.indexOf(' ');\r\n if(lugar!=-1){\r\n orac.add(wor.substring(0,lugar));\r\n wor=wor.substring(lugar+1);\r\n }else{\r\n orac.add(wor);\r\n wor=\"\";\r\n }\r\n }\r\n }", "public void lesBok(String filen)throws Exception\n {\n liste.add(new Ord(\"null\"));//se siste linje i finnOrd-metod\n Scanner inn = new Scanner(new File(filen));//henter ord fra filen anngitt i kallet paa metode lesBok og legger det inn i scanner inn\n while (inn.hasNextLine())\n {\n String tempOrd = inn.nextLine();\n leggeTilOrd(tempOrd);//sender ord fra scanner via string til metode legeTilOrd\n }\n }", "public void leituraMapa() throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(caminho+\"/caminho.txt\"));\n String linha = br.readLine();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n dm.addElement(array[1]);\n nomeJanela[contador] = array[0];\n contador++;\n linha = br.readLine();\n }\n br.close();\n }", "private void importarDatos() {\r\n // Cabecera\r\n System.out.println(\"Importación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (\r\n FileReader fr = new FileReader(DEF_NOMBRE_FICHERO);\r\n BufferedReader br = new BufferedReader(fr)) {\r\n // Colección Auxiliar\r\n final List<Item> AUX = new ArrayList<>();\r\n\r\n // Bucle de Lectura\r\n boolean lecturaOK = true;\r\n do {\r\n // Lectura Linea Actual\r\n String linea = br.readLine();\r\n\r\n // Procesar Lectura\r\n if (linea != null) {\r\n // String > Array\r\n String[] items = linea.split(REG_CSV_LECT);\r\n\r\n // Campo 0 - id ( int )\r\n int id = Integer.parseInt(items[DEF_INDICE_ID]);\r\n\r\n // Campo 1 - nombre ( String )\r\n String nombre = items[DEF_INDICE_NOMBRE].trim();\r\n\r\n // Campo 2 - precio ( double )\r\n double precio = Double.parseDouble(items[DEF_INDICE_PRECIO].trim());\r\n\r\n // Campo 3 - color ( Color )\r\n Color color = UtilesGraficos.generarColor(items[DEF_INDICE_COLOR].trim());\r\n\r\n // Generar Nuevo Item\r\n Item item = new Item(id, nombre, precio, color);\r\n\r\n // Item > Carrito\r\n AUX.add(item);\r\n// System.out.println(\"Importado: \" + item);\r\n } else {\r\n lecturaOK = false;\r\n }\r\n } while (lecturaOK);\r\n\r\n // Vaciar Carrito\r\n CARRITO.clear();\r\n\r\n // AUX > CARRITO\r\n CARRITO.addAll(AUX);\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos importados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }", "public void leeArchivo() throws IOException {\n // defino el objeto de Entrada para tomar datos\n BufferedReader brwEntrada;\n try {\n // creo el objeto de entrada a partir de un archivo de texto\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n } catch (FileNotFoundException e) {\n // si marca error es que el archivo no existia entonces lo creo\n File filPuntos = new File(\"datos.txt\");\n PrintWriter prwSalida = new PrintWriter(filPuntos);\n // le pongo datos ficticios o de default\n // lo cierro para que se grabe lo que meti al archivo\n prwSalida.close();\n // lo vuelvo a abrir porque el objetivo es leer datos\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n }\n // con el archivo abierto leo los datos que estan guardados\n brwEntrada.close();\n }", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void RT() {//metodo para leer la informacion del txt , presente en todas las clases que se guardan en un txt\n\t\treadTxt(\"usuarios.txt\", usersList);\n\t}", "public void Horas() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n \r\n \r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (a==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (a==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null)\r\n if (leerHora == contador){\r\n comparar = linea.substring(0,2);\r\n \r\n if (\"09\".equals(comparar)){\r\n nueve++;\r\n }\r\n if (\"10\".equals(comparar)){\r\n diez++;\r\n }\r\n if (\"11\".equals(comparar)){\r\n once++;\r\n }\r\n if (\"13\".equals(comparar)){\r\n una++;\r\n }\r\n if (\"14\".equals(comparar)){\r\n dos++;\r\n }\r\n if (\"15\".equals(comparar)){\r\n tres++;\r\n }\r\n if (\"16\".equals(comparar)){\r\n cuatro++;\r\n }\r\n \r\n contador +=1;\r\n leerHora += 6;\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "public void abrirDatos() throws IOException {\n ControladorDatosSolucion CntrlDS = new ControladorDatosSolucion();\n CntrlDS.abrirArchivoSoluciones();\n\n String[][] ret = CntrlDS.leerSoluciones();\n soluciones = new ArrayList<Solucion>();\n for (int i = 0; i < ret.length; i++) {\n String[] sitems = ret[i][3].split(\" \");\n ArrayList<Integer> items = new ArrayList<Integer>();\n for (int j = 0; j < sitems.length; j++) {\n items.add(Integer.parseInt(sitems[j]));\n }\n Solucion sol = new Solucion(ret[i][0], Double.parseDouble(ret[i][1]), Double.parseDouble(ret[i][2]), items);\n soluciones.add(sol);\n }\n CntrlDS.cerrarArchivoSoluciones();\n }", "public static void cargarMedicos() {\n medicos = new LinkedList<>();\n try {\n File f = new File(\"medicos.txt\");\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n String line = s.nextLine();\n String[] texto = line.split(\",\");\n Medico m = new Medico(texto[0], texto[1], texto[2], Integer.parseInt(texto[3]));\n int idPuesto = Integer.valueOf(texto[4].trim());\n if (idPuesto!=0) {\n Puesto pt = puestoPorId(idPuesto);\n if(pt == null){\n pt = new Puesto();\n puestos.add(pt);\n }\n m.setPuesto(pt);\n pt.setMedico(m);\n }\n else{\n m.setPuesto(null);\n }\n medicos.add(m);\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"El archivo no existe...\");\n }\n }", "public void Fecha() throws FileNotFoundException, IOException {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (b=0;b<5;b++){\r\n if (b==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (b==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (b==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (b==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (b==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerFecha == contador){\r\n errorFecha = linea.substring(1,2);\r\n if (errorFecha.equals(\"/\")){\r\n comparar = linea.substring(0, 1);\r\n if (\"1\".equals(comparar)){\r\n d1++;\r\n }\r\n if (\"2\".equals(comparar)){\r\n d2++;\r\n }\r\n if (\"3\".equals(comparar)){\r\n d3++;\r\n }\r\n if (\"4\".equals(comparar)){\r\n d4++;\r\n }\r\n if (\"5\".equals(comparar)){\r\n d5++;\r\n }\r\n if (\"6\".equals(comparar)){\r\n d6++;\r\n }\r\n if (\"7\".equals(comparar)){\r\n d7++;\r\n }\r\n if (\"8\".equals(comparar)){\r\n d8++;\r\n }\r\n if (\"9\".equals(comparar)){\r\n d9++;\r\n }\r\n } \r\n else{\r\n comparar1=linea.substring(0, 2);\r\n if (\"10\".equals(comparar1)){\r\n d10++;\r\n }\r\n if (\"11\".equals(comparar1)){\r\n d11++;\r\n }\r\n if (\"12\".equals(comparar1)){\r\n d12++;\r\n }\r\n if (\"13\".equals(comparar1)){\r\n d13++;\r\n }\r\n if (\"14\".equals(comparar1)){\r\n d14++;\r\n }\r\n if (\"15\".equals(comparar1)){\r\n d15++;\r\n }\r\n if (\"16\".equals(comparar1)){\r\n d16++;\r\n }\r\n if (\"17\".equals(comparar1)){\r\n d17++;\r\n }\r\n if (\"18\".equals(comparar1)){\r\n d18++;\r\n }\r\n if (\"19\".equals(comparar1)){\r\n d19++;\r\n }\r\n if (\"20\".equals(comparar1)){\r\n d20++;\r\n }\r\n if (\"21\".equals(comparar1)){\r\n d21++;\r\n }\r\n if (\"22\".equals(comparar1)){\r\n d22++;\r\n }\r\n if (\"23\".equals(comparar1)){\r\n d23++;\r\n }\r\n if (\"24\".equals(comparar1)){\r\n d24++;\r\n }\r\n if (\"25\".equals(comparar1)){\r\n d25++;\r\n }\r\n if (\"26\".equals(comparar1)){\r\n d26++;\r\n }\r\n if (\"27\".equals(comparar1)){\r\n d27++;\r\n }\r\n if (\"28\".equals(comparar1)){\r\n d28++;\r\n }\r\n if (\"29\".equals(comparar1)){\r\n d29++;\r\n }\r\n if (\"30\".equals(comparar1)){\r\n d30++;\r\n }\r\n if (\"31\".equals(comparar1)){\r\n d31++;\r\n }\r\n \r\n }\r\n leerFecha+=6;\r\n contador += 1;\r\n }\r\n \r\n else{\r\n contador += 1;\r\n \r\n \r\n }\r\n } \r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "LinkedList<Data> getDataConfirm(){\r\n FileInputStream xx = null;\r\n try {\r\n xx = new FileInputStream(\"dataConfirm.xml\");\r\n // harus diingat objek apa yang dahulu disimpan di file \r\n // program untuk membaca harus sinkron dengan program\r\n // yang dahulu digunakan untuk menyimpannya\r\n int isi;\r\n char charnya;\r\n String stringnya;\r\n // isi file dikembalikan menjadi string\r\n stringnya =\"\";\r\n while ((isi = xx.read()) != -1) {\r\n charnya= (char) isi;\r\n stringnya = stringnya + charnya;\r\n } \r\n // string isi file dikembalikan menjadi larik double\r\n return (LinkedList<Data>) xstream.fromXML(stringnya);\t \r\n }\r\n catch (Exception e){\r\n System.err.println(\"test: \"+e.getMessage());\r\n }\r\n finally{\r\n if(xx != null){\r\n try{\r\n xx.close();\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n } \r\n } \r\n return null;\r\n \r\n }", "public static void cargarPacientes() {\n pacientes = new LinkedList<>();\n lpriorPacientes = new PriorityQueue<>((Paciente p1, Paciente p2) -> p1.getSintoma().getPrioridad() - p2.getSintoma().getPrioridad());\n File f = new File(\"pacientes.txt\");\n try {\n Scanner sc = new Scanner(f);\n while (sc.hasNextLine()) {\n String linea = sc.nextLine();\n String[] texto = linea.split(\",\");\n Paciente p = new Paciente(texto[0], texto[1], texto[2], texto[3], Integer.parseInt(texto[4]), sintomaPorNombre(texto[5]));\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Paciente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void leerDeFichero() {\n try\n {\n Scanner sc = new Scanner(new File(\"texto.txt\"));\n while (sc.hasNextLine() && !textoCompleto())\n addFrase(sc.nextLine());\n sc.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\n\n }", "public Listas_simplemente_enlazada(){\r\n inicio=null; // este constructor me va servir para apuntar el elemento\r\n fin=null;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\tBufferedReader entrada = new BufferedReader(new FileReader(\"src\\\\ListaEnlazada3\\\\F.txt\"));\n\t\t\tPrintWriter salida = new PrintWriter(new FileWriter(\"src\\\\ListaEnlazada3\\\\Fsalida.txt\"));\n\t\t\tPilaEnListaEnlazada pila = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada pila2 = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada result = new PilaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola = new ColaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola2 = new ColaEnListaEnlazada();\n\t\t\tString str;\n\t\t\tint linea=0;\n\t\t\tint lleva=0;\n\t\t\twhile(entrada.ready())\n\t\t\t{\n\t\t\t\tstr = entrada.readLine();\n\t\t\t\tlinea++;\n\t\t\t\tif(linea==1)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));//guarda el primer caracter de la cadena de texto.\n\t\t\t\t\t\t\t //En la pila, e incrementa el contador.\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException eq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(linea==2)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 2, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse//De no cumplise las condiciones anterirores entramos a este ciclo else.\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!pila2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)pila.pop()+(int)pila2.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);//sacamos el residuo del numero y lo guardamos en la cola\n\t\t\t\t\t\tlleva=1;//Incrementamos el lleva en 1, ya que hay un exceso en el numero.\n\t\t\t\t\t}\n\t\t\t\t\telse//Si el numero no es mayor que 9.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);//Se guarda el numero sin sacarle su residuo.\n\t\t\t\t\t\tlleva=0;//le bajamos el valor del lleva a 0, para evitar problemas de acarreo posteriores.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||pila2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(pila.size()>pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()<pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()&&pila2.isEmpty()&&lleva==1)//Si la pila, la pila2 estan vacias y el lleva ==1 \n\t\t\t\t\t\t //significa que no hay un numero para sumar, pero estoy llevando \n\t\t\t\t\t\t //un acarreo\n\t\t\t\t\t\t //el cual tengo que tener en cuenta para la sig suma.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!cola.isEmpty()&&!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)cola.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()||cola.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\tint numero = (int)cola2.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||cola2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola2.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola2.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola2.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sirve para invertir los valores y mostrarlos como una suma normal.\n\t\t\twhile(!cola.isEmpty()||!cola2.isEmpty()||!pila.isEmpty())\n\t\t\t{\n\t\t\t\tif(!cola.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola2.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)pila.pop());\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(!result.isEmpty())\n\t\t\t{\n\t\t\t\tcola2.enqueue((int)result.pop());\n\t\t\t}\n\t\t\tSystem.out.print(\"Suma: \"+cola2.toString());\n\t\t\tsalida.print(\"Suma total:\"+cola2.toString());\n\t\t\tentrada.close();\n\t\t\tsalida.close();\n\t}", "private void lesFil()\n\t{\n\t\tDATAFIL = datafil(false);\n\n\t\ttry ( ObjectInputStream innfil = new ObjectInputStream( new FileInputStream( DATAFIL ) ) )\n\t\t{\n\t\t\tbr = (Boligregister) innfil.readObject();\n\t\t\tvisMelding( \"Data er hentet fra fil.\" );\n\t\t}\n\t\tcatch(ClassNotFoundException cnfe)\n\t\t{\n\t\t\tvisMelding( \"<html>Feil:<br><br>\" + cnfe.getMessage() + \"<br><br>Oppretter tom datafil. Tar vare p&aring; gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(FileNotFoundException fne)\n\t\t{\n\t\t\tvisMelding( \"Ingen datafil funnet. Oppretter tom datafil.\" );\n\t\t\ttomtRegister();\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t\tvisMelding( \"<html>Innlesingsfeil. Oppretter tom datafil. Tar vare p&aring; gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t}", "public TiendaVideojuegos(String datos)\n {\n listaDeVideojuegos = new ArrayList<Videojuegos>();\n codVideojuego = 0;\n try{\n File archivo = new File(datos);\n Scanner sc = new Scanner(archivo);\n while (sc.hasNextLine()) {\n String[] datosVideojuego = sc.nextLine().split(\"#\");\n String titulo = datosVideojuego[0];\n String plataforma = datosVideojuego[1];\n int dia = Integer.parseInt(datosVideojuego[2]);\n int mes = Integer.parseInt(datosVideojuego[3]);\n int anyo = Integer.parseInt(datosVideojuego[4]);\n addVideojuego(titulo, dia, mes, anyo, plataforma);\n }\n \n sc.close();\n }\n catch (FileNotFoundException a) {\n a.printStackTrace();\n }\n \n }", "public void schreibeDaten() throws IOException{\r\n\t\tav.schreibeDaten(dateipfad + \"ARTIKEL.txt\"); \r\n\t\tkv.schreibeDaten(dateipfad + \"KUNDEN.txt\");\r\n\t\tmv.schreibeDaten(dateipfad + \"MITARBEITER.txt\");\r\n\t\tev.schreibeDaten(dateipfad + \"EREIGNISSE.txt\");\r\n\t}", "public void mostrarlistafininicio(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=fin;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.anterior;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de fin a inicio\",JOptionPane.INFORMATION_MESSAGE);\n }}", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "public void mostrarlistainciofin(){\n if(!estavacia()){\n String datos=\"<=>\";\n nododoble auxiliar=inicio;\n while(auxiliar!=null){\n datos=datos+\"[\"+auxiliar.dato+\"]<=>\";\n auxiliar=auxiliar.siguiente;\n }\n JOptionPane.showMessageDialog(null,datos,\n \"Mostraando lista de incio a fin\",JOptionPane.INFORMATION_MESSAGE);\n } }", "public static void main(String[] args) {\n LinkedList<String> daftar= new LinkedList<String>();\r\n //menambahkan elemen pada linked list\r\n daftar.add(\"A\");\r\n daftar.add(\"B\");\r\n daftar.addLast(\"C\");\r\n daftar.addFirst(\"D\");\r\n daftar.add(3, \"B\");\r\n daftar.add(\"F\");\r\n daftar.add(\"G\");\r\n System.out.println(\"Linked List: \"+daftar);\r\n //menghapus elemen dari linked list\r\n daftar.remove(\"B\");\r\n daftar.remove(3);\r\n daftar.removeFirst();\r\n daftar.removeLast();\r\n System.out.println(\"Linked list setelah dihapus: \"+daftar);\r\n //menemukan elemen pada linked list\r\n boolean status=daftar.contains(\"E\");\r\n if(status)\r\n System.out.println(\"Di list terdapat elemen 'E'\");\r\n else\r\n System.out.println(\"Di list tidak terdapat elemen 'E'\");\r\n \r\n //ukuran dari elemen pada linked list\r\n int size=daftar.size();\r\n System.out.println(\"Ukuran dari linked list: \"+size);\r\n \r\n //menunjukkan dam memberi nilai elemen dari linked list\r\n Object elemen=daftar.get(2);\r\n System.out.println(\"elemen ditunjui oleh get(): \"+elemen);\r\n daftar.set(2, \"Y\");\r\n System.out.println(\"Linked list pasca perubahan: \"+daftar);\r\n }", "public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }", "public Admin()\n {\n File f1 = new File(\"adm1.txt\");//checking whether file exists or not\n\t\tif(f1.exists())\n\t\t{\n try{\n \tadd_admin(\"1\", \"1\", \"1\", \"CO1\", 123, \"878451\",true,\"1\", \"1\");\n \tFileInputStream file = new FileInputStream(f1);\n BufferedInputStream b=new BufferedInputStream(file);\n b.mark(0);\n b.reset();\n ObjectInputStream obj = new ObjectInputStream(b);\n \n Admin e=null;\n e=(Admin) obj.readObject();//reading object from the file \n adm_list.insert(e);//inserting in the current linked list and appending the data in the file\n \n if(file.markSupported())//marking the pointer in the file to start the traversal\n file.reset();\n obj.close();//closing the streams\n file.close(); \n }\n catch(Exception e)//catching exceptions\n {\n \n }\n \n\t\t} \n }", "public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void readGraph() throws FileNotFoundException{ \n\n @SuppressWarnings(\"resource\")\n\tScanner scan = new Scanner (new FileReader(file)); \n scan.nextLine();\n\n while (scan.hasNextLine()){\n \n String ligne = scan.nextLine();\n\n if (ligne.equals(\"$\")){break;}\n\n \n String num1=ligne.substring(0,4);\n String num2=ligne.substring(4,ligne.length());\n\n Station st = new Station (num1,num2);\n //remplir les stations voisines ds le tableau Array\n ParisMetro.voisins[Integer.parseInt(st.getStationNum())]= st;\n //remplir les stations \n ParisMetro.stations.add(st);\n \n }\n \n\n while(scan.hasNextLine()){\n String temp = scan.nextLine();\n \n StringTokenizer st; \n\t\t st=new StringTokenizer(temp);\n\t\t \n\t\t int num =Integer.parseInt(st.nextToken());\n\t\t int voisinNum =Integer.parseInt(st.nextToken());\n\t\t int time=Integer.parseInt(st.nextToken());\n\t\t\n \n Chemin che = new Chemin (ParisMetro.voisins[num],ParisMetro.voisins[voisinNum],time);//create a new edge\n \n \n //ajout des chemins\n ParisMetro.chemins.add(che); \n //ajout des sorties stations voisines\n ParisMetro.voisins[num].addSortie(che);\n //ajout des sorties stations voisines\n ParisMetro.voisins[voisinNum].addArrivee(che);\n }\n \n }", "Lista_Simple datos(File tipo1) {\n \n SAXBuilder builder = new SAXBuilder();\n try {\n \n \n \n\n \n //Se obtiene la lista de hijos de la raiz 'tables'\n Document document = builder.build(tipo1);\n Element rootNode = document.getRootElement(); \n // JOptionPane.showMessageDialog(null,\" e1: \"+(rootNode.getChildText(\"dimension\"))); \n tam= Integer.parseInt(rootNode.getChildText(\"dimension\"));\n Element dobles = rootNode.getChild(\"dobles\");\n \n List list = dobles.getChildren(\"casilla\");\n for ( int i = 0; i < list.size(); i++ )\n {\n Element tabla = (Element) list.get(i);\n d1.enlistar(tabla.getChildTextTrim(\"x\"));\n \n d1.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n \n \n Element triples = rootNode.getChild(\"triples\");\n \n List listt = triples.getChildren(\"casilla\");\n for ( int i = 0; i < listt.size(); i++ )\n {\n Element tabla = (Element) listt.get(i);\n d2.enlistar(tabla.getChildTextTrim(\"x\"));\n d2.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n Element dicc = rootNode.getChild(\"diccionario\");\n List dic = dicc.getChildren();\n\n for ( int i = 0; i < dic.size(); i++ )\n {\n Element tabla = (Element) dic.get(i);\n //JOptionPane.showMessageDialog(null,\"\"+tabla.getText().toString());\n d.enlistar(tabla.getText().toString());\n \n \n \n } \n \n }catch (JDOMException | IOException | NumberFormatException | HeadlessException e){\n JOptionPane.showMessageDialog(null,\" error de archivo\");\n }\n return d;\n \n}", "public void Leer() throws FileNotFoundException\n {\n // se crea una nueva ruta en donde se va a ir a leer el archivo\n String ruta = new File(\"datos.txt\").getAbsolutePath(); \n archivo=new File(ruta); \n }", "private void leituraTexto() {\n try {\n Context context = getApplicationContext();\n\n InputStream arquivo = context.getResources().openRawResource(R.raw.catalogo_restaurantes);\n InputStreamReader isr = new InputStreamReader(arquivo);\n\n BufferedReader br = new BufferedReader(isr);\n\n String linha = \"\";\n restaurantes = new ArrayList<>();\n\n while ((linha = br.readLine()) != null) {\n restaurante = new Restaurante(linha);\n String id = Biblioteca.parserNome(restaurante.getId());\n String nome = Biblioteca.parserNome(restaurante.getNome());\n String descricao = Biblioteca.parserNome(restaurante.getDescricao());\n// Log.i(\"NOME\", nome);\n String rank = Biblioteca.parserNome(restaurante.getRank());\n int imagem = context.getResources().getIdentifier(nome, \"mipmap\", context.getPackageName());\n restaurante.setLogo(imagem);\n\n int imgrank = context.getResources().getIdentifier(rank, \"drawable\", context.getPackageName());\n restaurante.setRank(String.valueOf(imgrank));\n\n restaurantes.add(restaurante);\n }\n carregarListView();\n br.close();\n isr.close();\n arquivo.close();\n// Log.i(\"Quantidade\", \"\" + produtos.size());\n } catch (Exception erro) {\n Log.e(\"FRUTARIA Erro\", erro.getMessage());\n }\n\n }", "public void arbolize() {\n //generando arbol desde nodos\n while (this.size > 1) {\n NodoCaracter smallest, smaller, ncAux;\n int aux;\n smallest = new NodoCaracter(inicio);\n smaller = new NodoCaracter(inicio.siguiente);\n aux = smallest.getFreq() + smaller.getFreq();\n this.eliminaInicio();\n this.eliminaInicio();\n ncAux = new NodoCaracter(aux, smallest, smaller);\n insertaOrdenado(ncAux);\n }\n \n //transferencia de nodo(s) a arbol\n System.out.println(\"Arbol generado\");\n System.out.println(inicio.getFreq() + \" es la frecuencia total sumada\");\n }", "public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }", "public ArrayList<Task> loadData() throws IOException {\n DateTimeFormatter validFormat = DateTimeFormatter.ofPattern(\"MMM dd yyyy HH:mm\");\n ArrayList<Task> orderList = new ArrayList<>();\n\n try {\n File dataStorage = new File(filePath);\n Scanner s = new Scanner(dataStorage);\n while (s.hasNext()) {\n String curr = s.nextLine();\n String[] currTask = curr.split(\" \\\\| \");\n assert currTask.length >= 3;\n Boolean isDone = currTask[1].equals(\"1\");\n switch (currTask[0]) {\n case \"T\":\n orderList.add(new Todo(currTask[2], isDone));\n break;\n case \"D\":\n orderList.add(new Deadline(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n case \"E\":\n orderList.add(new Event(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n }\n }\n } catch (FileNotFoundException e) {\n if (new File(\"data\").mkdir()) {\n System.out.println(\"folder data does not exist yet.\");\n } else if (new File(filePath).createNewFile()) {\n System.out.println(\"File duke.txt does not exist yet.\");\n }\n }\n return orderList;\n\n }", "public static void importToFile() throws IOException {\n String fileName = \"Prova.txt\";\n ArrayList<String> fileLines = new ArrayList<>();\n int libriImported = 0;\n try (BufferedReader inputStream = new BufferedReader(new FileReader(fileName))) {\n String l;\n while ((l = inputStream.readLine()) != null) {\n fileLines.add(l);\n }\n for (String s : fileLines) {\n String[] splitter = s.split(\";\");\n Libro lib = LibroConvert(splitter);\n Biblioteca.getBiblioteca().add(lib);\n libriImported++;\n }\n }\n System.out.println(\"Ho importato \" + libriImported + \"libri\");\n }", "public void agregar_Alinicio(int elemento){\n inicio=new Nodo(elemento, inicio);// creando un nodo para que se inserte otro elemnto en la lista\r\n if (fin==null){ // si fin esta vacia entonces vuelve al inicio \r\n fin=inicio; // esto me sirve al agregar otro elemento al final del nodo se recorre al inicio y asi sucesivamnete\r\n \r\n }\r\n \r\n }", "public static void main(String[] args) {\n\t\tLinkedList<String> sujungtasSarasas = new LinkedList<String>();\n\t\t// i sarasa dedami\n\t\t \n\t\tsujungtasSarasas.add(\"vasaris\");\n\t\tsujungtasSarasas.add(\"kovas\");\n\t\tsujungtasSarasas.add(\"balandis\");\n\t\tsujungtasSarasas.add(\"geguze\");\n\t\tSystem.out.println(sujungtasSarasas);\n\t\t\n\t\t// idedame elementus i sarso i pradzia ir i\n\t\t// pabaigas\n\t\tsujungtasSarasas.addFirst(\"SAUSIS\");\n\t\tsujungtasSarasas.addLast(\"BIRZELIS\");\n\t\tSystem.out.println(sujungtasSarasas);\n\t\t\n\t\t// istriname pirma ir paskutini\n\t\t// elementus\n\t\tsujungtasSarasas.removeFirst();\n\t\tsujungtasSarasas.removeLast();\n\t\tSystem.out.println(sujungtasSarasas);\n\t\t\n\t\tSystem.out.println(sujungtasSarasas.removeFirst());\n\t\tSystem.out.println(sujungtasSarasas.removeLast());\n\t\tSystem.out.println(sujungtasSarasas);\n\t\tsujungtasSarasas.push(\"Rugpjutis\");\n\t\tSystem.out.println(sujungtasSarasas);\n\t\tsujungtasSarasas.pop();\n\t\tSystem.out.println(sujungtasSarasas);\n\t\tSystem.out.println(sujungtasSarasas.pop());\n//\t\t\n//\t\t// idedame ir istriname pagal indeksa \n//\t\tsujungtasSarasas.add(0, \"Dar vienas menuo\");\n//\t\tsujungtasSarasas.remove(2);// dar yra removeFirst() ir removeLast()\n//\t\t// metodai, // kurie istrina pirma ir paskutini elementus\n//\t\tSystem.out.println(sujungtasSarasas);\n//\t\t// grazina saraso pirmaji\n//\t\t// elementa ir ji istrina is saraso\n//\t\tString menuo = sujungtasSarasas.poll();\n//\t\tSystem.out.println(menuo);\n//\t\tSystem.out.println(sujungtasSarasas);\n//\t\t//\n//\t\t// grazina saraso pirmaji elementa ir ji istrina is saraso\n//\t\tmenuo = sujungtasSarasas.pollFirst();\n//\t\tSystem.out.println(menuo);\n//\t\tSystem.out.println(sujungtasSarasas);\n//\t\t\n//\t\t// grazina saraso pirmaji elementa ir ji istrina is saraso\n//\t\tmenuo = sujungtasSarasas.pollLast();\n//\t\tSystem.out.println(menuo);\n//\t\tSystem.out.println(sujungtasSarasas);\n\n\t}", "private void updateListaInformacaoSalva(){\n try(Stream<String> lines = Files.lines(Paths.get(this.path))){\n this.listaInformacaoSalva = lines\n .map(SalvaCsv::pelaLinha)\n .collect(Collectors.toList());\n\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws Exception{\n System.out.println(\"prueba conexion\");\n Conexion conexion = new Conexion();\n System.out.println(\"conecto\");\n String csvFile = \"./temporal.txt\";\n BufferedReader br = null;\n String line = \"\";\n boolean bandera = true;\n ArrayList<Administradora> guardado = new ArrayList<>();\n String cvsSplitBy = \";\";\n List<String> errores = new ArrayList<>();\n int seq = 0;\n try {\n System.out.println(\"leyendo\");\n br = new BufferedReader(new FileReader(csvFile));\n System.out.println(\"empezando lineas\");\n while ((line = br.readLine()) != null) {\n System.out.println(\"line: \" + line.toString());\n String[] datos = line.split(cvsSplitBy);\n if(revisionLetras(datos[0])){\n if(revisionLetras(datos[1])){\n if(revisionTipoIdentificacion(datos[2])){\n if(revisionNumeros(datos[3])){\n if(revisionNatural(datos[4])){\n java.util.Date fecha = new Date();\n Administradora elemento = new Administradora(seq,datos[0],datos[1],datos[2],datos[3],datos[4],revisionX(datos[5]),revisionX(datos[6]),revisionX(datos[7]),fecha);\n guardado.add(elemento);\n }\n else{\n errores.add(\"Se ha encontrado problemas en: \" + datos.toString() + \" en la naturaleza\");\n bandera = false;\n }\n }\n else{\n errores.add(\"Se ha encontrado problemas en: \" + datos.toString() + \" en la identificacion\");\n bandera = false;\n }\n }\n else{\n errores.add(\"Se ha encontrado problemas en: \" + datos.toString() + \" en el tipo de identificacion\");\n bandera = false;\n }\n }\n else{\n errores.add(\"Se ha encontrado problemas en: \" + datos.toString() + \" en el nombre\");\n bandera = false;\n }\n }\n else{\n errores.add(\"Se ha encontrado problemas en: \" + datos.toString() + \" en el codigo\");\n bandera = false;\n }\n }\n if(bandera==true){\n //guardado\n errores.add(\"guardados satisfactoriamente\");\n }else{\n errores.add(\"Motivos por lo que no se guardo\");\n }\n System.out.println(\"errores: \" + errores);\n errores(errores);\n guardar(conexion.connectDatabase(\"localhost\", \"3306\", \"practica\", \"root\", \"\"), guardado);\n System.out.println(\"guardado\");\n } catch (Exception e) {\n System.out.println(\"catch\");\n } finally {\n if (null != br) {\n br.close();\n System.out.println(\"finally\");\n } \n }\n }", "public void skrivInn(String filnavn) throws Exception{\r\n Scanner filScan = new Scanner(new File(filnavn));\r\n Person person;\r\n String next = filScan.nextLine().toLowerCase();\r\n\r\n //forst registrerer jeg personene\r\n while(!next.equals(\"-\"))\r\n {\r\n\r\n if(!personListe.containsKey(next)) {\r\n personListe.put(next , new Person(next));\r\n }\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n\r\n //og saa legger jeg til dvdene til de personene som ble registrert\r\n while (filScan.hasNextLine()) {\r\n\r\n if(filScan.hasNextLine()) {\r\n next = filScan.nextLine().toLowerCase();\r\n }\r\n\r\n if (next.startsWith(\"-\") && filScan.hasNextLine()) {\r\n person = personListe.get(filScan.nextLine().toLowerCase());\r\n }\r\n\r\n else if(next.startsWith(\"*\")) {\r\n String tittel = next.substring(1).toLowerCase();\r\n\r\n if(!dvdListe.containsKey(tittel)) {\r\n DVD dvd = new DVD(tittel, person);\r\n String laner = filScan.nextLine().toLowerCase();\r\n Person laaner = personListe.get(laner);\r\n\r\n if(personListe.containsKey(laner)) {\r\n dvdListe.put(tittel,dvd);\r\n person.leggTilutlaant(dvd);\r\n laaner.leggTilLaaner(dvd);\r\n }\r\n\r\n }\r\n }\r\n\r\n else {\r\n if(!dvdListe.containsKey(next) && !next.equals(\"-\")) {\r\n DVD dvd = new DVD(next, person);\r\n person.leggTilDVD(dvd);\r\n dvdListe.put(next, dvd);\r\n }\r\n }\r\n }\r\n }", "private static void checkFile()\n {\n if( !datei.exists() )\n {\n System.out.println(\"Herje! Noch nichts da? Kein Problem, Du bekommst jetzt einfach mal was\");\n new ErstelleFelder().createFarm();\n saveCSV();\n }\n // Wenn JA, auslesen\n else\n {\n System.out.println(\"Oha, da haben wir ja bereits ein paar Pflanzen. Komm' mit, ich zeige die Dir\\n\");\n try\n {\n new LeseAusDatei().leseCsv();\n\n BufferedReader br = null;\n try\n {\n br = new BufferedReader(new FileReader(datei));\n }\n catch(FileNotFoundException e)\n {\n System.err.println(e);\n }\n\n String currLine;\n maisFeld.clear();\n weizenFeld.clear();\n\n while( (currLine = br.readLine()) != null )\n {\n String[] currLineSplit = currLine.split(\";\");\n int laufendeNummer = Integer.parseInt(currLineSplit[0]);\n String pflanzenArt = currLineSplit[1];\n double pflanzenHoehe = Double.parseDouble(currLineSplit[2]);\n\n System.out.println(laufendeNummer + \" \" + pflanzenArt + \" \" + format(pflanzenHoehe));\n\n if( pflanzenArt.equals(\"Mais\") )\n {\n maisFeld.add(new Mais(pflanzenHoehe));\n }\n if( pflanzenArt.equals(\"Weizen\") )\n {\n weizenFeld.add(new Weizen(pflanzenHoehe));\n }\n }\n System.out.println(\"\");\n System.out.println(\"Wir haben \" + maisFeld.size() + \" Maiskölbchen und \" + weizenFeld.size() + \" Weizenhalme.\\n\");\n br.close();\n }\n catch(IOException e)\n {\n System.err.println(e);\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tString chaine=\"\";\n\t\tString fichier =\"./BDCarte.txt\";\n\t\t\n\t\tEquipe e1 = new Equipe(\"Lol\", 0, new ArrayList<CarteS>());\n\t\t\n\t\tArrayList<CarteS> al = new ArrayList<CarteS>();\n\t\t\n\t\t\n\t\t//lecture du fichier texte\t\n\t\ttry{\n\t\t\tInputStream ips=new FileInputStream(fichier); \n\t\t\tInputStreamReader ipsr=new InputStreamReader(ips);\n\t\t\tBufferedReader br=new BufferedReader(ipsr);\n\t\t\tString ligne;\n\t\t\twhile ((ligne=br.readLine())!=null){\n\t\t\t\tString[] s = ligne.split(\":\");\n\t\t\t\t\n\t\t\t\tSystem.out.println(s[0]);\n\t\t\t\t\n\t\t\t\tal.add(new CarteS(s[0], s[1], s[2]));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close(); \n\t\t}\t\t\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.toString());\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(al.size());\n\t\t\n\t\tint max = al.size()-1;\n\t\tint min = 0;\n\t\t\n\t\tint random = 0;//(int) (Math.random() * ( max - min ));\n\t\t\n\t\t//System.out.println(random);\n\t\t\n\t\t//System.out.println(al.get(random));\n\n\t}", "public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }", "public static void inicia() throws IOException {\r\n int op=0;\r\n do {\r\n System.out.println(\"\\n\\n<<< COLAS >>>\");\r\n System.out.println(\"1.- Altas\");\r\n System.out.println(\"2.- Eliminar\");\r\n System.out.println(\"3.- Mostrar\");\r\n System.out.println(\"0.- Salir\");\r\n System.out.print(\"Opcion? ---> \");\r\n op=getInt();\r\n \r\n switch(op) {\r\n case 1 : Altas(); break;\r\n case 2 : Cola.Eliminar(); break;\r\n case 3 : Cola.Mostrar(); break;\r\n }\r\n }while(op!=0);\r\n }", "public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }", "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\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\r\n\t\t\t\t}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void run() {\n\t\tfinal Reader r1 = new InputStreamReader(System.in);\r\n\t\tfinal BufferedReader teclado = new BufferedReader(r1);\r\n\t\tString linea;\r\n\t\ttry {\r\n\t\twhile ((linea = teclado.readLine()) != null) { \r\n\t\t\t// lee un String del teclado\r\n\t\t\tthis.sincronizarPila.addDato(linea);\r\n\t\t}\r\n\t\t} catch (final IOException x) { x.printStackTrace(System.err); }\r\n\t}", "public void mostrarlistafininicio(){\n if(!estaVacia()){\n String datos = \"<=>\";\n NodoBus auxiliar = fin;\n while(auxiliar!=null){\n datos = datos + \"(\" + auxiliar.dato +\")->\";\n auxiliar = auxiliar.ant;\n JOptionPane.showMessageDialog(null, datos, \"Mostrando lista de fin a inicio\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n }", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public ifrm_historial() {\n initComponents();\n this.setTitle(\"Historial bitacoraCalculadora.txt\");\n File archivo;\n try{\n final BufferedReader lector = new BufferedReader(new FileReader(\"bitacoraCalculadora.txt\"));\n String line = \"\";\n while ((line = lector.readLine()) != null){\n //txt_mostrar.setText(line);\n txt_mostrar.append(line +\"\\n\");\n }lector.close();\n }catch(FileNotFoundException e){\n e.printStackTrace();\n } catch(IOException e){\n e.printStackTrace();\n }\n }", "private void limpa() {\n\t\t// limpa Alfabeto\n\t\tsimbolos.limpar();\n\t\t// limpa conjunto de estados\n\t\testados.limpar();\n\t\t// limpa Funcao Programa\n\t\tfuncaoPrograma.limpar();\n\t\t// Limpa estados finais\n\t\testadosFinais.limpar();\n\t}", "private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void readFile() {\n try\n {\n tasksList.clear();\n\n FileInputStream file = new FileInputStream(\"./tasksList.txt\");\n ObjectInputStream in = new ObjectInputStream(file);\n\n boolean cont = true;\n while(cont){\n Task readTask = null;\n try {\n readTask = (Task)in.readObject();\n } catch (Exception e) {\n }\n if(readTask != null)\n tasksList.add(readTask);\n else\n cont = false;\n }\n\n if(tasksList.isEmpty()) System.out.println(\"There are no todos.\");\n in.close();\n file.close();\n }\n\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public void inicializarPalabra () { \r\n palabra = \"\"; \r\n palabraErrada = \"\"; \r\n mensaje = \"\"; \r\n intentosErrados = 0; \r\n \r\n try { \r\n //Variable para almacenar la cantidad de palabras que hay en el archivo adjunto \r\n int contadorPalabras = 0; \r\n \r\n //Obtener la palabra del txt \r\n File archivo = new File(\"palabritas.txt\"); \r\n BufferedReader entrada; \r\n \r\n //En el primer recorrido determinamos cuantas palabras tengo en palabritas \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n String palabraTemp = \"\"; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n contadorPalabras ++; \r\n } \r\n System.out.println(\"Cantidad:\"+contadorPalabras); \r\n \r\n //Con la cantidad de palabras realizamos el random \r\n //Lo multiplicamos x 100 y agarramos el residuo de dividirlo entre la cantidad de palabras \r\n //Le sumamos 1 xq el cero no juega \r\n int numeroLineaEscogida = ((int) (Math.random() * 100) % contadorPalabras) + 1; \r\n \r\n //Nos posicionamos en el numero del random y obtenemos la palabra \r\n entrada = new BufferedReader(new FileReader(archivo)); \r\n int numeroLineaActual = 1; \r\n while(entrada.ready()){ \r\n palabraTemp = entrada.readLine(); \r\n if (palabraTemp.length()>cantMaximaCaracteres) continue; //Validamos el tama帽o de caracteres \r\n if ( numeroLineaActual == numeroLineaEscogida ){ \r\n palabra = palabraTemp; \r\n break; \r\n }else{ \r\n numeroLineaActual++; \r\n } \r\n } \r\n \r\n System.out.println(\"palabra:\"+palabra); \r\n // En el arreglo de caracteres que contendra el resultado lo llenamos de espacio \r\n letras = new char[palabra.length()]; \r\n for (int i = 0; i <= palabra.length() - 1; i++) { \r\n if ( palabra.substring(i, i+1).equals(\" \") ){ \r\n letras[i] = ' '; \r\n }else{ \r\n letras[i] = '_'; \r\n } \r\n } \r\n \r\n //inicializamos el arreglo de intentos errados \r\n letrasErradas = new char[intentosPermitidos]; \r\n \r\n } catch (Exception e) { \r\n e.printStackTrace(); \r\n mensaje = \"No se encuentra el archivo 'palabritas.txt'\"; \r\n } \r\n }", "public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }", "public void loadDictionary() {\r\n\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/English.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t// Aggiungere parola alla struttura dati\r\n\t \t\t\r\n\t \t\tthis.dictionary.add(word);\r\n\t \t\t\r\n\t\t}\r\n\t\tbr .close();\r\n\t\t} catch (IOException e ){\r\n\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t try {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/Italian.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t\t// Aggiungere parola alla struttura dati\r\n\t\t \t\t\r\n\t\t \t\tthis.dizionario.add(word);\r\n\t\t \t\t\r\n\t\t\t}\r\n\t\t\tbr .close();\r\n\t\t\t} catch (IOException e ){\r\n\t\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public void cargarListaNegra(String rutaArchivo) throws FileNotFoundException, IOException {\n String cadena;\n FileReader fr = new FileReader(rutaArchivo);\n BufferedReader br = new BufferedReader(fr);\n while((cadena = br.readLine()) != null) {\n \tthis.listaNegra.add(cadena);\n }\n br.close();\n fr.close();\n }", "public void lecture() throws FileNotFoundException, IOException {\n \n //ouverture du fichier en lecture\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(adresseFichier);\n InputStreamReader ir = new InputStreamReader(is);\n BufferedReader fichier = new BufferedReader(ir);\n \n //Lecture ligne à ligne\n String ligne;\n int numLigne = 0;\n while((ligne = fichier.readLine()) != null){\n //parsage de la ligne\n this.parseLigne(numLigne, ligne);\n numLigne++;\n }\n }", "private void printInfo() {\n System.out.println(\"\\nThis program reads the file lab4.dat and \" +\n \"inserts the elements into a linked list in non descending \"\n + \"order.\\n\" + \"The contents of the linked list are then \" +\n \"displayed to the user in column form.\\n\");\n }", "public List<Cuenta> leerArchivoToList(InputStream archivo);", "public void cadastrarOfertasQuad1(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q1.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine();\n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(1);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas1LazyModel = null;\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n } \n }", "public void acomodaBloques() throws IOException {\n try { // checa si encontro el archivo\n // se lee el archivo\n bfrEntrada = new BufferedReader(new FileReader(\"coordenadas.txt\"));\n } catch (FileNotFoundException fnfEx) { // si no lo encuentra\n // Se crea el archivo con los datos iniciales del juego\n PrintWriter prwSalida\n = new PrintWriter(new FileWriter(\"coordenadas.txt\"));\n prwSalida.println(\"29,174\");\n prwSalida.println(\"62,182\");\n prwSalida.println(\"95,70\");\n prwSalida.println(\"95,127\");\n prwSalida.println(\"95,184\");\n prwSalida.println(\"128,72\");\n prwSalida.println(\"128,129\");\n prwSalida.println(\"128,186\");\n prwSalida.println(\"161,76\");\n prwSalida.println(\"161,131\");\n prwSalida.println(\"161,188\");\n prwSalida.println(\"194,78\");\n prwSalida.println(\"194,133\");\n prwSalida.println(\"194,190\");\n prwSalida.println(\"227,78\");\n prwSalida.println(\"227,133\");\n prwSalida.println(\"227,190\");\n prwSalida.println(\"260,76\");\n prwSalida.println(\"260,131\");\n prwSalida.println(\"260,188\");\n prwSalida.println(\"293,72\");\n prwSalida.println(\"293,129\");\n prwSalida.println(\"293,186\");\n prwSalida.println(\"326,70\");\n prwSalida.println(\"326,127\");\n prwSalida.println(\"326,184\");\n prwSalida.println(\"359,182\");\n prwSalida.println(\"392,174\");\n prwSalida.println(\"95,267\");\n prwSalida.println(\"128,267\");\n prwSalida.println(\"161,267\");\n prwSalida.println(\"194,286\");\n prwSalida.println(\"227,286\");\n prwSalida.println(\"260,267\");\n prwSalida.println(\"293,267\");\n prwSalida.println(\"326,267\");\n prwSalida.println(\"100,324\");\n prwSalida.println(\"133,324\");\n prwSalida.println(\"166,324\");\n prwSalida.println(\"255,324\");\n prwSalida.println(\"288,324\");\n prwSalida.println(\"321,324\");\n prwSalida.println(\"111,440\");\n prwSalida.println(\"144,411\");\n prwSalida.println(\"177,411\");\n prwSalida.println(\"210,425\");\n prwSalida.println(\"243,411\");\n prwSalida.println(\"276,411\");\n prwSalida.println(\"309,440\");\n prwSalida.println(\"144,468\");\n prwSalida.println(\"177,497\");\n prwSalida.println(\"210,516\");\n prwSalida.println(\"243,497\");\n prwSalida.println(\"276,468\");\n prwSalida.close();\n // se lee el archivo\n bfrEntrada = new BufferedReader(new FileReader(\"coordenadas.txt\"));\n }\n // se llena la lista de bloques\n for (int iI = 0; iI < iNumBloques; iI++) {\n // se carga la imagen del alien corredor\n URL urlImagenCaminador\n = this.getClass().getResource(\"barrilBB.png\");\n // se crea un alien corredor\n Objeto objBloque = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenCaminador));\n\n // Se lee la primera linea (vidas)\n String sDato = bfrEntrada.readLine();\n // se dividen los datos en un arreglo\n strArrDatos = sDato.split(\",\");\n // se asigna el primer dato a la posX\n objBloque.setX((Integer.parseInt(strArrDatos[0])));\n // se asigna el segundo dato a la posX\n objBloque.setY((Integer.parseInt(strArrDatos[1])));\n // Se agrega al caminador a la lista de corredores\n lnkBloques.add(objBloque);\n }\n //Se le agrega poderes a bloques al azar\n //Se le agrega poderes a bloques al azar\n for(int iI=0; iI<lnkBloques.size(); iI++) {\n if(1 == ((int) (1 + Math.random() * 2))) {\n Objeto objPoderosos = (Objeto) lnkBloques.get((int) \n (1 + Math.random() * 50));\n objPoderosos.setPoder((int) (1 + Math.random() * 3));\n }\n \n }\n }", "private static void ListaProduto() throws IOException {\n \n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n }\n \n \n\t\tFileWriter arq = new FileWriter(\"lista_produto.txt\"); // cria o arquivo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// será criado o\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// arquivo para\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// armazenar os\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados\n\t\tPrintWriter gravarArq = new PrintWriter(arq); // imprimi no arquivo \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dados.\n\n\t\tString relatorio = \"\";\n\n\t\tgravarArq.printf(\"+--LISTA DE PRODUTOS--+\\r\\n\");\n\n\t\tfor (int i = 0; i < ListaDProduto.size(); i++) {\n\t\t\tProduto Lista = ListaDProduto.get(i);\n\t\t\t\n\n\t\t\tgravarArq.printf(\n\t\t\t\t\t\" - |Codigo: %d |NOME: %s | VALOR COMPRA: %s | VALOR VENDA: %s | INFORMAÇÕES DO PRODUTO: %s | INFORMAÇÕES TÉCNICAS: %s\\r\\n\",\n\t\t\t\t\tLista.getCodigo(), Lista.getNome(), Lista.getPrecoComprado(),\n\t\t\t\t\tLista.getPrecoVenda(), Lista.getInformacaoProduto(), Lista.getInformacaoTecnicas()); // formatação dos dados no arquivos\n \n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\n\n\t\t\trelatorio += \"\\nCódigo: \" + Lista.getCodigo() +\n \"\\nNome: \" + Lista.getNome() +\n\t\t\t\t \"\\nValor de Compra: \" + Lista.getPrecoComprado() + \n \"\\nValor de Venda: \" + Lista.getPrecoVenda() +\n \"\\nInformações do Produto: \" + Lista.getInformacaoProduto() +\n \"\\nInformações Técnicas: \" + Lista.getInformacaoTecnicas() +\n \"\\n------------------------------------------------\";\n\n\t\t}\n \n \n\n\t\tgravarArq.printf(\"+------FIM------+\\r\\n\");\n\t\tgravarArq.close();\n\n\t\tSaidaDados(relatorio);\n\n\t}", "static void inicializarentrada(){\n try {\n archivo_entrada= new FileInputStream(\"src/serializacion/salida.txt\");\n } catch (FileNotFoundException ex) {\n System.out.println(\"Error al abrir el archivo\");\n }\n \n try {\n lector= new ObjectInputStream(archivo_entrada);\n } catch (IOException ex) {\n System.out.println(\"Error al acceder al archivo\");\n }\n }", "public static void aggiungiAlunni(List<String> listaNomi, File fileDaLeggere, BasicTextEncryptor ekrittik){\r\n\t\ttry {\r\n\t\t\t//Inizializzo i controlli\r\n\t\t\tFileInputStream lettoreIniziale = new FileInputStream(fileDaLeggere);\r\n\t\t\tBufferedReader lettoreFinale = new BufferedReader(new InputStreamReader(lettoreIniziale));\r\n\r\n\t\t\twhile(true){\r\n\t\t\t\tString nomeAlunno = lettoreFinale.readLine();\r\n\t\t\t\tif (nomeAlunno != null){\r\n\t\t\t\t\tlistaNomi.add(ekrittik.decrypt(nomeAlunno));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlettoreFinale.close();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException Errore) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Impossibile interagire con il file \" + fileDaLeggere + \". Errore: \\n\" + Errore);\r\n\t\t}\r\n\t}", "public static void main(String []args){\n miFichero = new Fichero(\"peliculas.xml\");\n //cargamos los datos del fichero\n misPeliculas = (ListaPeliculas) miFichero.leer();\n\n //si no habia fichero\n\n if(misPeliculas == null) {\n misPeliculas = new ListaPeliculas();\n }\n int opcion;\n do{\n mostrarMenu();\n opcion = InputData.pedirEntero(\"algo\");\n switch (opcion){\n case 1:\n altaPelicula();\n break;\n case 2:\n break;\n case 3:\n break;\n case 4:\n break;\n }\n\n }while(opcion!= 0);\n }", "private static void cargarLista(String linea, TraductorDesdeLista grafo)\r\n\t\t\tthrows IllegalArgumentException\r\n\t{\r\n\t\tint vertice = Integer.parseInt(linea.substring(0,1));\t\t// Guarda el vertice\r\n\t\tlinea = linea.substring(3);\t\t\t\t\t\t\t\t\t// Guarda los vertices sucesores \r\n\t\tString[] lista = linea.split(\" \");\t\t\t\t\t\t\t// Almacena los vertices sucesores en un arreglo\r\n\r\n\t\t// Agrega vertice en la matriz de adyacencia\r\n\t\tgrafo.agregarVertice(vertice);\r\n\r\n\t\t// Itera sobre los vertices sucesores al vertice agregado agregando los arcos en la matriz de adyacencia\r\n\t\tfor(int i=0;i<lista.length;i++){\r\n\t\t\tgrafo.agregarArco(vertice, Integer.parseInt(lista[i]));\r\n\t\t}\r\n\r\n\t}", "public GestorAtracciones()\n {\n gestor_trabajadores = new GestorTrabajadores();\n atracciones = new ArrayList<>();\n lectura = new Scanner(System.in);\n crearAtracciones();\n calculoTipoAtraccion();\n calculoPersonal();\n }", "public static String cargarPreguntas(String fileName){\n String line = null; \n try {\n //Para lectura del archivo\n FileReader fileReader =\n new FileReader(fileName); \n \n //BufferedReader para optimización de recursos\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n \n// Lee línea por línea, verifica que tengan algo de texto\n while(((line = bufferedReader.readLine()) != null)) {\n if ((line.length() > 0) && !(line.startsWith(\"//\"))){\n// Para ignorar las líneas de comentario en el archivo de texto\n //if (!(line.startsWith(\"//\"))){\n// Crea una lista de Strings para cada línea a evaluar\n List<String> listaLinea = new ArrayList<>(Arrays.asList(line.split(\";\")));\n// Impresión de prueba del ArrayList(descomentar)\n// System.out.println(listaLinea);\n \n //Obtiene lista de Respuestas, en tipo String\n List <String >resp = listaLinea.subList(1,listaLinea.size());\n //Creación de Respuestas (bajo el debido constructor) en un HashSet\n HashSet<Respuesta> respuestas = new HashSet(); \n for (int i = 0; i < resp.size();i++){\n if (i == 0){\n //Identifica la respuesta correcta\n respuestas.add(new Respuesta(resp.get(i), true));\n }\n else{\n //Identifica las respuestas incorrectas\n respuestas.add(new Respuesta(resp.get(i), false));\n } \n }\n //System.out.println(resp); Impresión de prueba (descomentar)\n \n //Agrega Preguntas y Respuestas a nuestro HashSet y HashMap\n Almacenamiento.getPreguntas().add(new Pregunta(listaLinea.get(0)));\n Almacenamiento.getMapaPR().put(new Pregunta(listaLinea.get(0)), respuestas); \n //}\n }\n }\n //Impresiones de prueba, descomentar.\n// for(Pregunta p: Almacenamiento.getPreguntas()){\n// System.out.println(p.toString()); \n// } \n// Almacenamiento.getMapaPR().forEach((k,v)-> System.out.println(k+\", \"+v));\n \n // Siempre cerrar archivo, para optimizar recursos\n bufferedReader.close(); \n }\n //Detalle de exception impreso en consola\n catch(FileNotFoundException ex) {\n System.out.println(\n \"No se pudo abrir archivo '\" +\n fileName + \"'\"); \n }\n //Detalle de exception impreso en consola\n catch(IOException ex) {\n System.out.println(\n \"Error leyendo archivo '\"\n + fileName + \"'\"); \n }\n return null;\n }", "public void FermerAgd() {\n //on essaye d'ouvrir un fichier dans lequel enregistrer le contenu de l'agenda\n try {\n Formatter agd_a_enreg = new Formatter(\"C:\\\\Projet_Agenda_ING3\\\\saved_agendas\");\n\n for (RdV el : this.getAgenda()) {\n //on enregistre 1 rdv par ligne\n //faire gaffe aux formats : %..\n agd_a_enreg.format(\"%s/%s/%s de %s a %s : %s , %s\\n\",\n el.getDate().getDayOfMonth(), el.getDate().getMonthValue(),\n el.getDate().getYear(), el.getHdebut(),\n el.getHfin(), el.getLibelle(), el.getRappel());\n //on supprime le rdv de l'arraylist d'agenda \n this.suppressionRdV(el);\n }\n //on ferme le fichier en ecriture\n agd_a_enreg.close();\n //on met l'attribut agenda à null une fois qu'il est \"vidé\"\n this.agd = null;\n } //en cas de probleme dans l'ouverture du fichier on affiche une erreur\n catch (Exception e) {\n System.out.print(\"Erreur d'ouverture du fichier en ecriture\\n\");\n }\n\n }", "public void MostrarListafINInicio() {\n if(!estVacia()){\n String datos=\"<=>\";\n NodoDoble current=fin;\n while(current!=null){\n datos += \"[\"+current.dato+\"]<=>\";\n current = current.anterior;\n }\n JOptionPane.showMessageDialog(null, datos, \"Mostrando Lista de inicio a Fin\",JOptionPane.INFORMATION_MESSAGE);\n }\n }", "public void imprimir_etiquetas() {\n\n\t\tLinkedList l = new LinkedList();\n\t\tString q=\"select id,isnull(idarticulo,''),isnull(descripcion,''),isnull(cantidad,0),isnull(especial,0),isnull(especial_width,0),isnull(especial_height,0),isnull(quitarprefijo,0) from b_etiquetas where isnull(impresa,0)=0 order by id \";\n\t\tList<String> ids=new ArrayList<String>();\t\n\t\tObject[][] results=data.getResults(q);\n\t\tif (results!=null){\n\t\t\tif (results.length>0){\n\t\t\t\tif (_debug>0) System.out.println(\"Etiquetas para imprimir=\"+results.length);\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tString idarticulo = \"\";\n\t\t\t\t\tString id = \"\";\n\t\t\t\t\tString descripcion = \"\";\n\t\t\t\t\tString cant = \"\";\n\t\t\t\t\tString width = \"\";\n\t\t\t\t\tString height = \"\";\n\t\t\t\t\tString prefijo = \"\";\n\t\t\t\t\tint _width=40;\n\t\t\t\t\tint _height=40;\n\t\t\t\t\tdouble _cant = 0.0;\n\t\t\t\t\tboolean especial=false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tid = (String) results[i][0];\n\t\t\t\t\t\tidarticulo = (String) results[i][1];\n\t\t\t\t\t\tdescripcion = (String) results[i][2];\n\t\t\t\t\t\tcant = (String) results[i][3];\n\t\t\t\t\t\tespecial = ((String) results[i][4]).compareTo(\"1\")==0;\n\t\t\t\t\t\twidth = (String) results[i][5];\n\t\t\t\t\t\theight = (String) results[i][6];\n\t\t\t\t\t\tprefijo = (String) results[i][7];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t_width=new Integer(width);\n\t\t\t\t\t\t} catch (Exception 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}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t_height=new Integer(height);\n\t\t\t\t\t\t} catch (Exception 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}\n\t\t\t\t\t\t_cant = new Double(cant);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tids.add(id);\n\t\t\t\t\tif (_cant >= 1) {\n\t\t\t\t\t\tif (idarticulo.compareTo(\"\")!=0){\n\t\t\t\t\t\t\tif (descripcion.compareTo(\"\")!=0){\n\t\t\t\t\t\t\t\tdescripcion.replaceAll(\"'\", \"\");\n\t\t\t\t\t\t\t\tStrEtiqueta str_etiqueta = new StrEtiqueta();\n\t\t\t\t\t\t\t\tstr_etiqueta.setCodigo(idarticulo);\n\t\t\t\t\t\t\t\tstr_etiqueta.setDescripcion(descripcion);\n\t\t\t\t\t\t\t\tstr_etiqueta.setCantidad(new Double(_cant).intValue());\n\t\t\t\t\t\t\t\tstr_etiqueta.setEspecial(especial);\n\t\t\t\t\t\t\t\tstr_etiqueta.setWidth(_width);\n\t\t\t\t\t\t\t\tstr_etiqueta.setHeight(_height);\n\t\t\t\t\t\t\t\tstr_etiqueta.setQuitar_prefijo(prefijo.compareTo(\"1\")==0);\n\t\t\t\t\t\t\t\tl.add(str_etiqueta);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (l.size() > 0) {\n\n\t\t\t\t\t// ImpresionCodigoDeBarras PI=new ImpresionCodigoDeBarras();\n\n\t\t\t\t\t\tprinting pi = this.getPrintingInterface();\n\t\t\t\t\t\tpi.setPrintList(l);\n\t\t\t\t\t\tpi.setDebug(false);\n\t\t\t\t\t\tboolean ok = pi.print_job();\n\t\t\t\t\t\tif (ok){\n\t\t\t\t\t\t\tif (_printer_error>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Se Enviaron las Etiquetas Pendientes a la Impresora\");\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas Pendientes a la Impresora\", TrayIcon.MessageType.INFO);\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tthis.trayIcon.displayMessage(\"Beta Servidor de Impresion\", \"Se Enviaron las Etiquetas a la Impresora\", TrayIcon.MessageType.INFO);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=0;\n\t\t\t\t\t\t\tdata.beginTransaction();\n\t\t\t\t\t\t\tdata.clearBatch();\n\t\t\t\t\t\t\t\tfor (int i=0;i<ids.size();i++){\n\t\t\t\t\t\t\t\t\tq=\"update b_etiquetas set impresa=1 where id like '\"+ids.get(i)+\"'\";\n\t\t\t\t\t\t\t\t\tdata.addBatch(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.executeBatch();\n\t\t\t\t\t\t\t\tdata.commitTransaction();\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (_printer_error<=0){\n\t\t\t\t\t\t\t\tthis._clock_printer_error=this._clock_printer_error_reset;\n\t\t\t\t\t\t\t\tSystem.out.println(\"primer error\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_printer_error=1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t// PI.armar_secuencia();\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void main(String[] args) {\n String datas=\"\";\n try {\n File myObj = new File(\"configuracion.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n String[] partes = datas.split(\">\"); //separa el contenido del fichero en diferentes string\n String[] cambios; //y lo vuelve a separar para quitar los titulos entre <>. Ej: <Localizaciones>\n for (int i = 1; i < 4; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n //calcular num de elementos de cada parte\n int[] numelementos = new int[3];\n for (int i = 0; i < 3; i++) {\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='(')\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag1=1;\n }\n }\n }\n\n localizacionesString = new String [numelementos[0]]; //incializa la informacion de cada objeto \n personajesString = new String [numelementos[1]]; //segun el largo de los strings que hemos separado\n objetosString = new String [numelementos[2]];\n String cambio = \"\";\n int count = 0 ;\n\n //Se rellena cada string con un for propio\n //Dentro de un try para deteccion de errores\n try {\n //for para Localizaciones\n for (int i=0; count<numelementos[0]; ++i){ \n if (partes[1].charAt(i)==')'){\n localizacionesString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesString[count]=localizacionesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n if (partes[1].charAt(i)==','){ //Control de errores en el txt /*\n if(partes[1].charAt(i+1)!=' '){\n cambio=cambio+\", \";\n continue;\n }\n if(partes[1].charAt(i+1)==' '&&partes[1].charAt(i+2)==' '){\n cambio=cambio+\", \";\n ++i;\n for(;;i++){\n if(partes[1].charAt(i)!=' ')\n break;\n }\n }\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\"; \n }\n for (int f,i = 0; i < numelementos[0]; i++) {\n f=0;\n for (int j = 0; j < localizacionesString[i].length(); j++) {\n if(localizacionesString[i].charAt(j)==')'||localizacionesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count = 0;\n\n //for para Personajes\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n personajesString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n personajesString[count]=personajesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[1]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < personajesString[i].length(); j++) {\n if(personajesString[i].charAt(j)==')'||personajesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count=0;\n\n //for para Objetos\n for (int i=0; count<numelementos[2]; ++i){\n if (partes[3].charAt(i)==')'){\n objetosString[count]=\"\";\n cambio=cambio+partes[3].charAt(i);\n objetosString[count]=objetosString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[3].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[2]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < objetosString[i].length(); j++) {\n if(objetosString[i].charAt(j)==')'||objetosString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n\n \n } catch (Exception e) {\n System.out.println(\"ERROR EN LECTURA FICHERO\");\n flag1 = 1;\n }\n \n \n\n\n\n\n\n //leer fichero de objetivos(funciona igual que el de configuracion.txt)\n\n datas=\"\";\n try {\n File myObj = new File(\"objetivos.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n partes = datas.split(\">\");\n for (int i = 1; i < 3; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n numelementos = new int[2];\n for(int i=0 ; i<2 ; i++){\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='('){\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag2=1;\n }\n }\n }\n }\n\n localizacionesObjetivoString = new String [numelementos[0]];\n objetosObjetivoString = new String [numelementos[1]];\n cambio=\"\";\n\n count = 0;\n\n try {\n // for para las localizaciones objetivo\n for (int i=0; count<numelementos[0]; ++i){\n if (partes[1].charAt(i)==')'){\n localizacionesObjetivoString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesObjetivoString[count]=localizacionesObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < localizacionesObjetivoString[i].length(); j++) {\n if(localizacionesObjetivoString[i].charAt(j)==')'||localizacionesObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n count=0;\n\n // for para los objetos objetivo\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n objetosObjetivoString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n objetosObjetivoString[count]=objetosObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < objetosObjetivoString[i].length(); j++) {\n if(objetosObjetivoString[i].charAt(j)==')'||objetosObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n } catch (Exception e) {\n System.out.println(\"ERRROR EN LA LECTURA DE FICHERO\");\n flag2=1;\n }\n \n System.out.println(\"\");\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Laberinto(File f, char muro, char solucion) {\r\n\t\tthis.matriz = ReadMatrizXY(f);\r\n\t\tthis.estado_inicial = getEstadoInicial(matriz);\r\n\t\tthis.estado_final = getEstadoFinal(matriz);\r\n\t\tthis.abiertos = new ArrayList<>(); // Nodos abiertos\r\n\t\tthis.cerrados = new ArrayList<>(); // Nodos ya visitados\r\n\t\tthis.muro = muro;\r\n\t\tthis.camino = solucion;\r\n\t}", "public void cadastrarOfertasQuad2(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q2.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine(); \n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(2);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas2LazyModel = null;\n\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n }\n }", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "public void automovil(){\r\n System.out.println(\"Ingrese placa: \");\r\n placa = leer.next();\r\n System.out.println(\"Ingrese marca: \");\r\n marca = leer.next();\r\n \r\n Automovil auto = new Automovil(placa, marca, 10000);\r\n controlador.llenarVehiculo(auto);\r\n {\r\n }\r\n }", "public int Tipo() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n String linea;\r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n tipo=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n tipo=\"Regulares\";\r\n }\r\n if (a==2){\r\n tipo=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n tipo=\"Mayores\";\r\n }\r\n if (a==4){\r\n tipo=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+tipo+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerTipo == contador){\r\n errorTipo =String.valueOf(String.valueOf(leerTipo).length());\r\n if (a==0){\r\n resultadoembarazadas+=1;\r\n }\r\n if (a==1){\r\n resultadoregulares+=1;\r\n }\r\n if (a==2){\r\n resultadodiscapacitados+=1;\r\n }\r\n if (a==3){\r\n resultadomayores+=1;\r\n }\r\n if (a==4){\r\n resultadocorporativos+=1;\r\n }\r\n contador +=1;\r\n leerTipo +=6;\r\n\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n //return resultado;\r\n return 0;\r\n }", "public static void main(String[] args) {\n\t\t\r\n\tFile arxiu = null;\r\n\tFileReader fr = null; //el pipe (tub de lectura)\r\n\tBufferedReader br = null; //on emmagatzem la informació del pipe\r\n\t\r\n\t//Creem cada un dels treballadors, ja que són de tipus diferents\r\n\tAlumne_DUAL alumnedual = new Alumne_DUAL();\r\n\tTreballador_Parcial treballadorParcial = new Treballador_Parcial();\r\n\tTreballador_TempsComplet treballadorTempsComplet = new Treballador_TempsComplet();\r\n\t\r\n\tString tipus_treballador = \"\"; //Aqui guardarem el tipus de trebllador, ex: alumnedual, temps parcial...\r\n\tString agafar_preu_hora = \"\"; //Agafem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a double)\r\n\tdouble preu_hora = 0.0; //Aquí guardem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-lo a double) \r\n\tString agafar_hores_totals = \"\"; //Agafem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a int)\r\n\tint hores_totals = 0; //Aquí guardem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-les a int)\r\n\tString nom_treballador = \"\"; //Agafem el nom de cada treballador\r\n\tString nom_feina = \"\"; //Agafem l'ofici de cada treballador\r\n\r\n\t\r\n\ttry{\r\n\t\t//Obrim el fitxer\r\n\t arxiu = new File(\"nomines.txt\"); //el fitxer es diu nomines.txt\r\n\t fr = new FileReader(arxiu);\r\n\t br = new BufferedReader(fr);\r\n\t \r\n\t //Amb el bucle llegirem linia a linia\r\n\t String linia;\r\n\t\twhile((linia = br.readLine())!=null){//mentre hi ha linies per llegir\t\t\t\r\n\t\t\tint i = 0;\r\n\t \tString [] paraula = linia.split(\" \"); //dividim el text en paraula per paraula\r\n\t \twhile(i<paraula.length){\r\n\t \t\tnom_treballador = paraula[1]; //la segona paraula que llegim correspon al nom del treballador\r\n\t \t\tnom_feina = paraula[2]; //la tercera paraula que llegim correspon al nom del treball del treballador\r\n\t \t\tagafar_preu_hora = paraula[3]; //la quarta paraula que llegim correspon al preu per hora del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival al salari setmanal\r\n\t \t\tagafar_hores_totals = paraula[4]; //la cinquena paraula que llegim correspon a les hores totals del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival a les deduccions fiscals\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t\t \t\r\n\t \tpreu_hora = Double.parseDouble(agafar_preu_hora); //convertim la variable string preu_hora a tipus double per poder fer els càlculs\r\n\t \thores_totals = Integer.parseInt(agafar_hores_totals); //convertim la variable string hores_totals a numero enter per poder fer els càlculs\r\n\t \t \r\n\t \tif(linia.startsWith(\"1\")){ //si al començament de la línia hi ha un 1 es tracta del tipus de treballador temps_complet\r\n\t\t \ttipus_treballador = \"TREBALLADOR A TEMPS COMPLET\";\r\n\t\t \ttreballadorTempsComplet.setsalariSetmanal(Double.parseDouble(paraula[3])); //li assignem el salari setmanal per poder calcular quan li correspon a pagar\r\n\t\t \ttreballadorTempsComplet.deduccioFiscal(Double.parseDouble(paraula[4])); //li assignem les deduccions fiscals per poder calcular quan li correspon a pagar\r\n\t\t \t//quantitat a pagar correspon a la resta del salari setmanal - deduccions fiscals\r\n\t\t \tSystem.out.println(\"Al treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorTempsComplet.quantitatAPagar()+\" €\"); \r\n\t \t}else{\r\n\t \t\tif(linia.startsWith(\"2\")){ //si al començament de la línia hi ha un 2 es tracta del tipus de treballador temps_parcial\r\n\t \t\t\ttipus_treballador = \"TREBALLADOR A TEMPS PARCIAL\";\r\n\t \t\t\ttreballadorParcial.setPreuHora(preu_hora);\r\n\t \t\t\tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorParcial.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t\telse{\r\n\t \t\t\ttipus_treballador = \"ALUMNE DUAL\"; //si al començament de la línia hi ha un 3 es tracta del tipus de treballador alumne_dual\r\n\t \t\t\talumnedual.setPreuHora(preu_hora); \t\r\n\t\t\t \tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+alumnedual.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t}\t\r\n\t\t}\r\n\t \t\r\n\t }catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t }finally{\r\n\t \t//Entrarà al finally tant si falla com si no, per tal de tancar el fitxer\r\n\t \ttry{\r\n\t \t\tif(null!=fr){\r\n\t \t\t\tfr.close();\r\n\t \t\t}\r\n\t \t}catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t \t}\r\n\t }\r\n\t\r\n\t\t\r\n\t}", "public void listar() {\n\n if (!vacia()) {\n\n NodoEnteroSimple temp = head;\n\n int i = 0;\n\n while (temp != null) {\n\n System.out.print(i + \".[ \" + temp.getValor() + \" ]\" + \" -> \");\n\n temp = temp.getSiguiente();\n\n i++;\n }\n }\n \n }", "private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n File myFile = new File (\"d:/names.txt\");\r\n // para saber si el archivo no existe, devuelve true o false\r\n System.out.println(\"file.exists(): \" + myFile.exists());\r\n System.out.println(\"file.isDirectory(): \" + myFile.isDirectory());\r\n // para saber la fecha de modificación\r\n System.out.println(\"file.lastModified(): \" + myFile.lastModified());\r\n // para saber el nombre del archivo\r\n System.out.println(\"file.getName(): \" + myFile.getName());\r\n // para saber la ruta\r\n System.out.println(\"file.getPath(): \" + myFile.getPath());\r\n // para saber el tamaño en bytes que ocupa en disco\r\n System.out.println(\"file.length(): \" + myFile.length()+\" bytes\");\r\n // para saber si es de lectura, devuelve true o false\r\n System.out.println(\"file.canRead():\" + myFile.canRead());\r\n\r\n //File newfolder = new File(\"D:/carpeta con archivos año mío\");\r\n //System.out.println(newfolder.mkdir());\r\n\r\n // si fuera un directorio, para saber los archivos que contiene\r\n File carpeta = new File(\"D:/carpeta_con_archivos\");\r\n System.out.println(\"----listado archivos D:/carpeta_archivos------\");\r\n for (String archivo : carpeta.list()) {\r\n System.out.println(archivo);\r\n }\r\n\r\n //agregar una linea nueva a un archivo existente (METODO 1)\r\n /*try {\r\n //abra el archivo , TRUE en un forma append (agregar nuevos valores)\r\n FileWriter myFile2 = new FileWriter(\"d:/names.txt\", true);\r\n //cargar en memora ram del SO el contenido del archivo\r\n BufferedWriter dataFile = new BufferedWriter(myFile2);\r\n //agregar una nueva linea\r\n dataFile.write(\"\\nnueva linea tres\");\r\n dataFile.close();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }*/\r\n //agregar una linea nueva a un archivo existente (METODO 1 optimizado)\r\n /*try{\r\n BufferedWriter dataFile = new BufferedWriter(new FileWriter(\"d:/names.txt\",true));\r\n //agregamos la nueva linea\r\n dataFile.write(\"nueva linea sin borrar\");\r\n dataFile.close();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }*/\r\n // agregar nueva linea con metodo super optimizado en lineas (METODO FLAHS)\r\n try{\r\n PrintWriter myFile3 = new PrintWriter(new BufferedWriter(new FileWriter(\"d:/names.txt\", true)));\r\n myFile3.println(\"Otra nueva línea mezclando las dos librerías (PrintWriter + FileWriter) \");\r\n myFile3.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "public Lista(){\n inicio=null;\n fin=null;\n }", "public void laan() {\r\n if (personListe.size() > 1) {\r\n System.out.println(\"Hvem vil laane DVD'en?\");\r\n String laaner = scan.nextLine().toLowerCase();\r\n\r\n if (personListe.containsKey(laaner)) {\r\n System.out.println(\"Hvem eier DVD'en?\");\r\n String eier = scan.nextLine().toLowerCase();\r\n Person nyEier = personListe.get(eier);\r\n if (!eier.equalsIgnoreCase(laaner)) {\r\n\r\n if(personListe.containsKey(eier)) {\r\n\r\n if(personListe.get(eier).eierSize() > 0) {\r\n System.out.println(\"Hvilken DVD skal laanes?\");\r\n String tittel = scan.nextLine().toLowerCase();\r\n\r\n if(nyEier.hentEierListe().containsKey(tittel)) {\r\n\r\n if (!nyEier.hentUtlaantListe().containsKey(tittel)) {\r\n\r\n /*kaller paa laanut pa eier, laaner legger den til laaner listen,\r\n og dvd'en setter en laaner referanse */\r\n DVD dvd = nyEier.hentEierListe().get(tittel);\r\n nyEier.laanUt(dvd);\r\n personListe.get(laaner).leggTilLaaner(dvd);\r\n System.out.println(laaner + \" laaner naa \" + tittel + \" av \" + eier);\r\n }\r\n\r\n else {\r\n System.out.println(tittel + \" er allerede utlaant.\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n System.out.println(eier + \" eier ikke den DVD'en\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n System.out.println(eier + \" har ingen DVD'er aa laane ut\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n System.out.println(eier + \" finnes ikke i systemet\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n System.out.println(\"Man kan ikke laane fra seg selv!\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n System.out.println(laaner + \" finnes ikke i systemet\");\r\n }\r\n }\r\n\r\n else {\r\n System.out.println(\"Ikke nok personer til a kunne laane ut en DVD!\");\r\n }\r\n\r\n }", "public void setFils(LinkedList<Noeud> l) {\n\t\t\tthis.fils = l;\n\t\t}", "public static void main(String[] args) {\n\r\n\t\tArrayList<CorreoElectronico> correo = new ArrayList<>();\r\n\r\nPath path = Paths.get(\"src/main/resources/emails.txt\");\r\n\r\n try(BufferedReader reader = Files.newBufferedReader(path, Charset.forName(\"UTF-8\"))){ \r\n\r\n String currentLine = null;\r\n\r\n while((currentLine = reader.readLine()) != null){//while there is content on the current line\r\n\r\n \t CorreoElectronico correos = new CorreoElectronico();\r\n \t String[] linea = currentLine.split(\" , \");\r\n \t correos.setDireccion(linea[0]);\r\n \t correos.setAsunto(linea[1]);\r\n \t correo.add(correos);\r\n System.out.println(currentLine); // print the current line\r\n\r\n }\r\n\r\n }catch(IOException ex){\r\n\r\n ex.printStackTrace(); //handle an exception here\r\n\r\n }\r\nEnviadorCorreo enviador = new EnviadorCorreo();\r\nfor (CorreoElectronico coreos: correo) {\r\n\tenviador.enviarCorreo(coreos);\r\n}\r\n\r\n\t}", "private LinkedList<User> GetUserList() throws FileNotFoundException, IOException, ClassNotFoundException{\r\n File Users = new File(\"DataBase/Users/UsersDataBase.obj\");\r\n Users.createNewFile();\r\n try{\r\n FileInputStream InputFile = new FileInputStream(Users);\r\n ObjectInputStream InputObject = new ObjectInputStream(InputFile);\r\n\r\n LinkedList <User> UserList = (LinkedList <User>) InputObject.readObject();\r\n\r\n InputFile.close();\r\n InputObject.close();\r\n\r\n return UserList;\r\n }\r\n catch (EOFException e){\r\n return null; \r\n } \r\n }", "public static void imprimeUsuarios( ) {\n\t\ttry {\n\t\t\tFileInputStream arq = new FileInputStream(\"database/usuarios.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(arq);\n\t\t\tint i = 0;\n\t\t\n\t\t\tArrayList<Usuario> usuarios = new ArrayList<Usuario>();\n\t\t\t\n\t\t\ttry {\n\t\t\t for (;;) {\n\t\t\t \tUsuario aux;\n\t\t\t\t\taux = (Usuario) in.readObject();\n\t\t\t\t\tSystem.out.println(i + \"=\" + aux.getNome() + \";\" + aux.getCrm() + \";\" \n\t\t\t\t\t\t\t\t\t\t+ aux.getLogin() + \";\" + aux.getSenha());\n\t\t\t\t\tusuarios.add(aux);\n\t\t\t\t\ti++;\n\t\t\t }\n\t\t\t}\n\t\t\tcatch (EOFException exc) {\n\t\t\t // end of stream\n\t\t\t}\n\t\t\tcatch (IOException exc) {\n\t\t\t // some other I/O error: print it, log it, etc.\n\t\t\t exc.printStackTrace(); // for example\n\t\t\t}\n\t\t\t\t\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( IOException exc2 ) {\n\t\t\tSystem.out.println(\"Erro ao ler o arquivo.\");\t\t\t\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfex ) {\n\t\t\tSystem.out.println(\"Não achou a classe.\");\n\t\t}\n\t}" ]
[ "0.6773341", "0.6769814", "0.6735888", "0.67357457", "0.6638441", "0.63530374", "0.63163656", "0.629723", "0.6251591", "0.61021453", "0.6100317", "0.6095918", "0.6092166", "0.60430634", "0.6025571", "0.5957046", "0.59297085", "0.5909401", "0.59064275", "0.58964676", "0.5894259", "0.5885502", "0.58810437", "0.5879096", "0.5874781", "0.58647573", "0.5860048", "0.58532333", "0.5827462", "0.5800834", "0.5794694", "0.5794107", "0.57935226", "0.5789653", "0.5786598", "0.5765416", "0.57603407", "0.57600164", "0.5752409", "0.57331437", "0.5710182", "0.5708299", "0.5706161", "0.56994736", "0.56896394", "0.5676368", "0.5665864", "0.56570685", "0.56304157", "0.5618567", "0.5617202", "0.56058395", "0.5595837", "0.55879414", "0.5585132", "0.55788624", "0.55753565", "0.55709267", "0.5566004", "0.5565404", "0.5562105", "0.5561017", "0.55507743", "0.55440134", "0.55434823", "0.5533943", "0.55273324", "0.5525597", "0.5524368", "0.55217415", "0.551796", "0.5514245", "0.5510803", "0.5507307", "0.54879516", "0.5485165", "0.5481602", "0.547865", "0.54778206", "0.5474771", "0.5469916", "0.5467852", "0.54557097", "0.54499424", "0.54445416", "0.54330003", "0.5431008", "0.5428679", "0.5428183", "0.5428063", "0.5426685", "0.5418655", "0.54173225", "0.5409757", "0.5409376", "0.54051596", "0.5404905", "0.5402808", "0.5401424", "0.54012644", "0.5401025" ]
0.0
-1
Load all classes in package fixeh.injectutils
public static void load() throws IOException { ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader()); //System.out.println("Length:"+classPath.getTopLevelClasses("util").size()); for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClasses("util")) { Scene.v().addBasicClass(classInfo.getName(), SootClass.BODIES); sootClasses.add(classInfo.getName()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}", "public static void preLoad() {\n\t\tserviceClasses.clear();\n\t\tloadGroups(CLASS_FOLDER, null, serviceClasses);\n\t\tTracer.trace(serviceClasses.size()\n\t\t\t\t+ \" java class names loaded as services.\");\n\t\t/*\n\t\t * clean and pre-load if required\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.cachedOnes != null) {\n\t\t\t\taType.cachedOnes.clear();\n\t\t\t}\n\t\t\tif (aType.preLoaded) {\n\t\t\t\taType.loadAll();\n\t\t\t}\n\t\t}\n\t}", "ISet<Class<?>> collectAllTypeWiredServices();", "private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\n\t\tthis.sharedloader = createClassloader(\"shared\", commonloader);\n\t\tthis.catalinaloader = createClassloader(\"server\", commonloader);\n\t}", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}", "public void loadAndWait()\n {\n injector.addConfigurationInstances(this.configClassInstances);\n\n // load all @Services from @Configuration classes\n injector.activateFailOnNullInstance();\n injector.load();\n\n // detect duplicates and crash on matches\n injector.crashOnDuplicates();\n\n // branch out the dependencies, such that Service A, with dependency B, is\n // aware of all dependencies of B.\n injector.branchOutDependencyTree();\n\n // sort the services, based on dependency requirements\n injector.sortByDependencies();\n\n // instantiate services/clients and crash if any nil instances are detected\n injector.instantiateComponents();\n injector.crashOnNullInstances();\n\n // add the component instances to the ServiceContext\n injector.installServices(ctx);\n\n // instantiate clients\n //injector.instantiateClients();\n\n // invoke DepWire methods with required services & clients\n injector.findDepWireMethodsAndPopulate();\n }", "private void loadRegistredCommands() {\n ServiceLoader<Command> loader = ServiceLoader.load(Command.class);\n for (Command command : loader) {\n addCommand(command);\n }\n }", "private void inject() {\n }", "void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}", "private static Class<?>[] loadInClassloader(ClassLoader loader, Class<?>[] classes)\n throws ClassNotFoundException {\n List<Class<?>> trackingClasses = Lists.newArrayListWithExpectedSize(classes.length);\n for (Class<?> cls : classes) {\n trackingClasses.add(loadInClassloader(loader, cls));\n }\n return trackingClasses.toArray(new Class<?>[classes.length]);\n }", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "private void loadAggregationModules() {\n\t\tthis.aggregationModules = new ModuleLoader<IAggregate>(\"/Aggregation_Modules\", IAggregate.class).loadClasses();\n\t}", "public Class<?> initializeClassLoader(Class<?> clazz, boolean importAll, Class<?>... packages)\n {\n MockClassLoaderPolicy policy = new MockClassLoaderPolicy();\n Set<Class<?>> classes = new HashSet<Class<?>>();\n classes.add(clazz);\n classes.addAll(Arrays.asList(packages));\n policy.setImportAll(importAll);\n policy.setPathsAndPackageNames(classes.toArray(new Class[classes.size()]));\n\n return initializeClassLoader(clazz, policy);\n }", "public static void initializeDiContainer() {\n addDependency(new CamelCaseConverter());\n addDependency(new JavadocGenerator());\n addDependency(new TemplateResolver());\n addDependency(new PreferenceStoreProvider());\n addDependency(new CurrentShellProvider());\n addDependency(new ITypeExtractor());\n addDependency(new DialogWrapper(getDependency(CurrentShellProvider.class)));\n addDependency(new PreferencesManager(getDependency(PreferenceStoreProvider.class)));\n addDependency(new ErrorHandlerHook(getDependency(DialogWrapper.class)));\n\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new GeneratedAnnotationPredicate());\n addDependency(new GenericModifierPredicate());\n addDependency(new IsPrivatePredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsStaticPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsPublicPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new GeneratedAnnotationContainingBodyDeclarationFilter(getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new PrivateConstructorRemover(getDependency(IsPrivatePredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new BuilderClassRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class),\n getDependency(IsPrivatePredicate.class),\n getDependency(IsStaticPredicate.class),\n getDependency(PreferencesManager.class)));\n addDependency(new JsonDeserializeRemover(getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderInterfaceRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new StaticBuilderMethodRemover(getDependency(IsStaticPredicate.class), getDependency(IsPublicPredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BuilderAstRemover(getDependencyList(BuilderRemoverChainItem.class)));\n\n addDependency(new BuilderRemover(getDependency(PreferencesManager.class), getDependency(ErrorHandlerHook.class),\n getDependency(BuilderAstRemover.class)));\n addDependency(new CompilationUnitSourceSetter());\n addDependency(new HandlerUtilWrapper());\n addDependency(new WorkingCopyManager());\n addDependency(new WorkingCopyManagerWrapper(getDependency(HandlerUtilWrapper.class)));\n addDependency(new CompilationUnitParser());\n addDependency(new GeneratedAnnotationPopulator(getDependency(PreferencesManager.class)));\n addDependency(new MarkerAnnotationAttacher());\n addDependency(new ImportRepository());\n addDependency(new ImportPopulator(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new BuilderMethodNameBuilder(getDependency(CamelCaseConverter.class),\n getDependency(PreferencesManager.class),\n getDependency(TemplateResolver.class)));\n addDependency(new PrivateConstructorAdderFragment());\n addDependency(new JsonPOJOBuilderAdderFragment(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new EmptyBuilderClassGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocGenerator.class),\n getDependency(TemplateResolver.class),\n getDependency(JsonPOJOBuilderAdderFragment.class)));\n addDependency(new BuildMethodBodyCreatorFragment());\n addDependency(new BuildMethodDeclarationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(TemplateResolver.class)));\n addDependency(new JavadocAdder(getDependency(JavadocGenerator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuildMethodCreatorFragment(getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(BuildMethodBodyCreatorFragment.class)));\n addDependency(new FullyQualifiedNameExtractor());\n addDependency(new StaticMethodInvocationFragment());\n addDependency(new OptionalInitializerChainItem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new BuiltInCollectionsInitializerChainitem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new FieldDeclarationPostProcessor(getDependency(PreferencesManager.class), getDependency(FullyQualifiedNameExtractor.class),\n getDependency(ImportRepository.class), getDependencyList(FieldDeclarationPostProcessorChainItem.class)));\n addDependency(new BuilderFieldAdderFragment(getDependency(FieldDeclarationPostProcessor.class)));\n addDependency(new WithMethodParameterCreatorFragment(getDependency(PreferencesManager.class), getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new RegularBuilderWithMethodAdderFragment(getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new BuilderFieldAccessCreatorFragment());\n addDependency(new TypeDeclarationToVariableNameConverter(getDependency(CamelCaseConverter.class)));\n addDependency(new FieldSetterAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new IsRegularBuilderInstanceCopyEnabledPredicate(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderCopyInstanceConstructorAdderFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new PublicConstructorWithMandatoryFieldsAdderFragment());\n addDependency(new RegularBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(RegularBuilderWithMethodAdderFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(RegularBuilderCopyInstanceConstructorAdderFragment.class),\n getDependency(PublicConstructorWithMandatoryFieldsAdderFragment.class)));\n addDependency(new StaticBuilderMethodSignatureGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new BlockWithNewBuilderCreationFragment());\n addDependency(\n new RegularBuilderBuilderMethodCreator(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new PrivateConstructorMethodDefinitionCreationFragment(getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new SuperFieldSetterMethodAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new PrivateConstructorBodyCreationFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(FieldSetterAdderFragment.class),\n getDependency(BuilderFieldAccessCreatorFragment.class),\n getDependency(SuperFieldSetterMethodAdderFragment.class)));\n addDependency(new ConstructorInsertionFragment());\n addDependency(new PrivateInitializingConstructorCreator(\n getDependency(PrivateConstructorMethodDefinitionCreationFragment.class),\n getDependency(PrivateConstructorBodyCreationFragment.class),\n getDependency(ConstructorInsertionFragment.class)));\n addDependency(new FieldPrefixSuffixPreferenceProvider(getDependency(PreferenceStoreProvider.class)));\n addDependency(new FieldNameToBuilderFieldNameConverter(getDependency(PreferencesManager.class),\n getDependency(FieldPrefixSuffixPreferenceProvider.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new TypeDeclarationFromSuperclassExtractor(getDependency(CompilationUnitParser.class),\n getDependency(ITypeExtractor.class)));\n addDependency(new BodyDeclarationVisibleFromPredicate());\n addDependency(new ApplicableFieldVisibilityFilter(getDependency(BodyDeclarationVisibleFromPredicate.class)));\n addDependency(new ClassFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(ApplicableFieldVisibilityFilter.class)));\n addDependency(new RecordFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class)));\n addDependency(new BodyDeclarationFinderUtil(getDependency(CamelCaseConverter.class)));\n addDependency(new SuperConstructorParameterCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(BodyDeclarationVisibleFromPredicate.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new SuperClassSetterFieldCollector(getDependency(PreferencesManager.class),\n getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(CamelCaseConverter.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new ApplicableBuilderFieldExtractor(Arrays.asList(\n getDependency(SuperConstructorParameterCollector.class),\n getDependency(ClassFieldCollector.class),\n getDependency(SuperClassSetterFieldCollector.class),\n getDependency(RecordFieldCollector.class))));\n addDependency(new ActiveJavaEditorOffsetProvider());\n addDependency(new ParentITypeExtractor());\n addDependency(new IsTypeApplicableForBuilderGenerationPredicate(getDependency(ParentITypeExtractor.class)));\n addDependency(new CurrentlySelectedApplicableClassesClassNameProvider(getDependency(ActiveJavaEditorOffsetProvider.class),\n getDependency(IsTypeApplicableForBuilderGenerationPredicate.class),\n getDependency(ParentITypeExtractor.class)));\n addDependency(new BuilderOwnerClassFinder(getDependency(CurrentlySelectedApplicableClassesClassNameProvider.class),\n getDependency(PreferencesManager.class), getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new BlockWithNewCopyInstanceConstructorCreationFragment());\n addDependency(new CopyInstanceBuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new RegularBuilderCopyInstanceBuilderMethodCreator(getDependency(BlockWithNewCopyInstanceConstructorCreationFragment.class),\n getDependency(CopyInstanceBuilderMethodDefinitionCreatorFragment.class),\n getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new JsonDeserializeAdder(getDependency(ImportRepository.class)));\n addDependency(new GlobalBuilderPostProcessor(getDependency(PreferencesManager.class), getDependency(JsonDeserializeAdder.class)));\n addDependency(new DefaultConstructorAppender(getDependency(ConstructorInsertionFragment.class), getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new RegularBuilderCompilationUnitGenerator(getDependency(RegularBuilderClassCreator.class),\n getDependency(RegularBuilderCopyInstanceBuilderMethodCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(RegularBuilderBuilderMethodCreator.class), getDependency(ImportPopulator.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new RegularBuilderUserPreferenceDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new RegularBuilderDialogDataConverter());\n addDependency(new RegularBuilderUserPreferenceConverter(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderUserPreferenceProvider(getDependency(RegularBuilderUserPreferenceDialogOpener.class),\n getDependency(PreferencesManager.class),\n getDependency(RegularBuilderDialogDataConverter.class),\n getDependency(RegularBuilderUserPreferenceConverter.class)));\n addDependency(new RegularBuilderCompilationUnitGeneratorBuilderFieldCollectingDecorator(getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(RegularBuilderCompilationUnitGenerator.class),\n getDependency(RegularBuilderUserPreferenceProvider.class)));\n addDependency(new IsEventOnJavaFilePredicate(getDependency(HandlerUtilWrapper.class)));\n\n // staged builder dependencies\n addDependency(new StagedBuilderInterfaceNameProvider(getDependency(PreferencesManager.class),\n getDependency(CamelCaseConverter.class),\n getDependency(TemplateResolver.class)));\n addDependency(new StagedBuilderWithMethodDefiniationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new StagedBuilderInterfaceTypeDefinitionCreatorFragment(getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderInterfaceCreatorFragment(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new StagedBuilderCreationBuilderMethodAdder(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new NewBuilderAndWithMethodCallCreationFragment());\n addDependency(new StagedBuilderCreationWithMethodAdder(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(NewBuilderAndWithMethodCallCreationFragment.class), getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderStaticBuilderCreatorMethodCreator(getDependency(StagedBuilderCreationBuilderMethodAdder.class),\n getDependency(StagedBuilderCreationWithMethodAdder.class),\n getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderWithMethodAdderFragment(\n getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new InterfaceSetter());\n addDependency(new StagedBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(StagedBuilderWithMethodAdderFragment.class),\n getDependency(InterfaceSetter.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new StagedBuilderStagePropertyInputDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new StagedBuilderStagePropertiesProvider(getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(StagedBuilderStagePropertyInputDialogOpener.class)));\n addDependency(new StagedBuilderCompilationUnitGenerator(getDependency(StagedBuilderClassCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(StagedBuilderStaticBuilderCreatorMethodCreator.class),\n getDependency(ImportPopulator.class),\n getDependency(StagedBuilderInterfaceCreatorFragment.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new StagedBuilderCompilationUnitGeneratorFieldCollectorDecorator(\n getDependency(StagedBuilderCompilationUnitGenerator.class),\n getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(StagedBuilderStagePropertiesProvider.class)));\n\n // Generator chain\n addDependency(new GenerateBuilderExecutorImpl(getDependency(CompilationUnitParser.class),\n getDependencyList(BuilderCompilationUnitGenerator.class),\n getDependency(IsEventOnJavaFilePredicate.class), getDependency(WorkingCopyManagerWrapper.class),\n getDependency(CompilationUnitSourceSetter.class),\n getDependency(ErrorHandlerHook.class),\n getDependency(BuilderOwnerClassFinder.class)));\n addDependency(new GenerateBuilderHandlerErrorHandlerDecorator(getDependency(GenerateBuilderExecutorImpl.class),\n getDependency(ErrorHandlerHook.class)));\n addDependency(new StatefulBeanHandler(getDependency(PreferenceStoreProvider.class),\n getDependency(WorkingCopyManagerWrapper.class), getDependency(ImportRepository.class)));\n addDependency(\n new StateInitializerGenerateBuilderExecutorDecorator(\n getDependency(GenerateBuilderHandlerErrorHandlerDecorator.class),\n getDependency(StatefulBeanHandler.class)));\n }", "public static List<ClassLoader> findAllClassLoaders(final LogNode log) {\n // Need both a set and a list so we can keep them unique, but in an order that (hopefully) reflects\n // the order in which the JDK calls classloaders.\n //\n // See:\n // https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n //\n final AdditionOrderedSet<ClassLoader> classLoadersSet = new AdditionOrderedSet<>();\n\n // Look for classloaders on the call stack\n // Find the first caller in the call stack to call a method in the FastClasspathScanner package\n ClassLoader callerLoader = null;\n if (CALLER_RESOLVER == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \" could not create \"\n + CallerResolver.class.getSimpleName() + \", current SecurityManager does not grant \"\n + \"RuntimePermission(\\\"createSecurityManager\\\")\");\n }\n } else {\n final Class<?>[] callStack = CALLER_RESOLVER.getClassContext();\n if (callStack == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \": \" + CallerResolver.class.getSimpleName()\n + \"#getClassContext() returned null\");\n }\n } else {\n final String fcsPkgPrefix = FastClasspathScanner.class.getPackage().getName() + \".\";\n int fcsIdx;\n for (fcsIdx = callStack.length - 1; fcsIdx >= 0; --fcsIdx) {\n if (callStack[fcsIdx].getName().startsWith(fcsPkgPrefix)) {\n break;\n }\n }\n if (fcsIdx < 0 || fcsIdx == callStack.length - 1) {\n // Should not happen\n throw new RuntimeException(\"Could not find caller of \" + fcsPkgPrefix + \"* in call stack\");\n }\n\n // Get the caller's current classloader\n callerLoader = callStack[fcsIdx + 1].getClassLoader();\n }\n }\n boolean useCallerLoader = callerLoader != null;\n\n // Get the context classloader\n final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();\n boolean useContextLoader = contextLoader != null;\n\n // Get the system classloader\n final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();\n boolean useSystemLoader = systemLoader != null;\n\n // Establish descendancy relationships, and ignore any classloader that is an ancestor of another.\n if (useCallerLoader && useContextLoader && isDescendantOf(callerLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useCallerLoader && isDescendantOf(contextLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useSystemLoader && useContextLoader && isDescendantOf(systemLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useSystemLoader && isDescendantOf(contextLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (useSystemLoader && useCallerLoader && isDescendantOf(systemLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useCallerLoader && useSystemLoader && isDescendantOf(callerLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (!useCallerLoader && !useContextLoader && !useSystemLoader) {\n // Should not happen\n throw new RuntimeException(\"Could not find a usable ClassLoader\");\n }\n // There will generally only be one class left after this. In rare cases, you may have a separate\n // callerLoader and contextLoader, but those cases are ill-defined -- see:\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n // We specifically add the classloaders in the following order however, so that in the case that there\n // are two of them left, they are resolved in this order. The relative ordering of callerLoader and\n // contextLoader is due to the recommendation at the above URL.\n if (useSystemLoader) {\n classLoadersSet.add(systemLoader);\n }\n if (useCallerLoader) {\n classLoadersSet.add(callerLoader);\n }\n if (useContextLoader) {\n classLoadersSet.add(contextLoader);\n }\n\n final List<ClassLoader> classLoaders = classLoadersSet.getList();\n if (log != null) {\n for (final ClassLoader classLoader : classLoaders) {\n log.log(\"Found ClassLoader \" + classLoader.toString());\n }\n log.addElapsedTime();\n }\n return classLoaders;\n }", "private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}", "private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }", "public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "private static void load(){\n }", "@SuppressWarnings({\"UnstableApiUsage\", \"unchecked\"})\n\tpublic void loadAllHacks() {\n\t\tfinal ConfigurationSection hackConfigs = plugin.getConfig().getConfigurationSection(\"hacks\");\n\t\tif (hackConfigs == null) {\n\t\t\tthis.plugin.warning(\"There are no hacks defined under 'hacks' the config. Is this right?\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tfinal ClassPath getSamplersPath = ClassPath.from(plugin.exposeClassLoader());\n\t\t\tfor (final var classInfo : getSamplersPath.getTopLevelClassesRecursive(HACKS_PATH)) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal Class<?> clazz = classInfo.load();\n\t\t\t\t\tif (clazz == null || !SimpleHack.class.isAssignableFrom(clazz)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tthis.plugin.info(\"Found hack class [\" + clazz.getName() + \"]\");\n\t\t\t\t\tloadHack((Class<SimpleHack<?>>) clazz, hackConfigs.getConfigurationSection(clazz.getSimpleName()));\n\t\t\t\t}\n\t\t\t\tcatch (final NoClassDefFoundError exception) {\n\t\t\t\t\tthis.plugin.warning(\"Unable to load hack \\\"\" + classInfo.getSimpleName() + \"\\\" probably due to a \" +\n\t\t\t\t\t\t\t\"dependency / import error.\", exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t\tcatch (final Exception exception) {\n\t\t\t\t\tthis.plugin.warning(\"Failed to complete hack discovery of: \" + classInfo.getName(), exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (final Exception exception) {\n\t\t\tthis.plugin.warning(\"Failed to complete hack registration\");\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tif (this.hacks.isEmpty()) {\n\t\t\tthis.plugin.warning(\"No hacks have been loaded.\");\n\t\t\t//return;\n\t\t}\n\t}", "public static void initClasses() {\n\t // base class must be initialized first\n\t \t SoAction.initClass();\n\t \t \n\t \t SoCallbackAction.initClass();\n\t \t SoGLRenderAction.initClass();\n\t \t SoGetBoundingBoxAction.initClass();\n\t \t SoGetMatrixAction.initClass();\n\t \t SoGetPrimitiveCountAction.initClass();\n\t \t SoHandleEventAction.initClass();\n\t \t SoPickAction.initClass();\n\t \t SoRayPickAction.initClass();\n\t \t SoSearchAction.initClass();\n\t \t SoWriteAction.initClass();\n\t \t \t \t\n\t }", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void refreshModules()\n\t{\n\t\t// Scan each directory in turn to find JAR files\n\t\t// Subdirectories are not scanned\n\t\tList<File> jarFiles = new ArrayList<>();\n\n\t\tfor (File dir : moduleDirectories) {\n\t\t\tfor (File jarFile : dir.listFiles(jarFileFilter)) {\n\t\t\t\tjarFiles.add(jarFile);\n\t\t\t}\n\t\t}\n\n\t\t// Create a new class loader to ensure there are no class name clashes.\n\t\tloader = new GPIGClassLoader(jarFiles);\n\t\tfor (String className : loader.moduleVersions.keySet()) {\n\t\t\ttry {\n\t\t\t\t// Update the record of each class\n\t\t\t\tClass<? extends Interface> clz = (Class<? extends Interface>) loader.loadClass(className);\n\t\t\t\tClassRecord rec = null;\n\t\t\t\tfor (ClassRecord searchRec : modules.values()) {\n\t\t\t\t\tif (searchRec.clz.getName().equals(className)) {\n\t\t\t\t\t\trec = searchRec;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (rec != null) {\n\t\t\t\t\t// This is not an upgrade, ignore it\n\t\t\t\t\tif (rec.summary.moduleVersion >= loader.moduleVersions.get(className)) continue;\n\n\t\t\t\t\t// Otherwise update the version number stored\n\t\t\t\t\trec.summary.moduleVersion = loader.moduleVersions.get(className);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trec = new ClassRecord();\n\t\t\t\t\trec.summary = new ModuleSummary(IDGenerator.getNextID(), loader.moduleVersions.get(className),\n\t\t\t\t\t\t\tclassName);\n\t\t\t\t\tmodules.put(rec.summary.moduleID, rec);\n\t\t\t\t}\n\t\t\t\trec.clz = clz;\n\n\t\t\t\t// Update references to existing objects\n\t\t\t\tfor (StrongReference<Interface> ref : instances.values()) {\n\t\t\t\t\tif (ref.get().getClass().getName().equals(className)) {\n\t\t\t\t\t\tConstructor<? extends Interface> ctor = clz.getConstructor(Object.class);\n\t\t\t\t\t\tref.object = ctor.newInstance(ref.get());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t// Thrown when trying to find a suitable constructor\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t\t| InvocationTargetException e) {\n\t\t\t\t// All thrown by the instantiate call\n\t\t\t\tSystem.err.println(\"Unable to create new instance of class: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t// Should never occur but required to stop the compiler moaning\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}", "public static void load() {\n }", "public void loadPlugins() {\n\n ServiceLoader<Pump> serviceLoader = ServiceLoader.load(Pump.class);\n for (Pump pump : serviceLoader) {\n availablePumps.put(pump.getPumpName(), pump);\n }\n\n Pump dummy = new DummyControl();\n availablePumps.put(dummy.getName(), dummy);\n\n Pump lego = new LegoControl();\n availablePumps.put(lego.getName(), lego);\n }", "private FilterChain loadFilters() {\n\t\ttry {\n\t\t\tAnnotation.scan(\"src/main/java/com/qa/app\");\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t| InvocationTargetException | NoSuchMethodException | SecurityException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }", "public static void load() {\n for (DataSourceSwapper each : ServiceLoader.load(DataSourceSwapper.class)) {\n loadOneSwapper(each);\n }\n }", "private final void inject() {\n }", "public static void initAllHooks(de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam r13) {\n /*\n loadPrefs();\n loadPrefs();\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = sPrefs;\t Catch:{ ClassNotFoundError -> 0x009c }\n r10 = \"fingerprint_hooks\";\n r11 = \"\";\n r6 = r9.getString(r10, r11);\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = \"android.os.Build\";\n r10 = r13.classLoader;\t Catch:{ ClassNotFoundError -> 0x009c }\n r0 = de.robv.android.xposed.XposedHelpers.findClass(r9, r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = \"android.os.Build.VERSION\";\n r10 = r13.classLoader;\t Catch:{ ClassNotFoundError -> 0x009c }\n r1 = de.robv.android.xposed.XposedHelpers.findClass(r9, r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = gson;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r10 = mobi.acpm.inspeckage.hooks.entities.FingerprintList.class;\n r5 = r9.fromJson(r6, r10);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r5 = (mobi.acpm.inspeckage.hooks.entities.FingerprintList) r5;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = r5.fingerprintItems;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r10 = r9.iterator();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n L_0x0030:\n r9 = r10.hasNext();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x006d;\n L_0x0036:\n r4 = r10.next();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r4 = (mobi.acpm.inspeckage.hooks.entities.FingerprintItem) r4;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = r4.enable;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x0030;\n L_0x0040:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"BUILD\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x006e;\n L_0x004a:\n r9 = r4.name;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = r4.newValue;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n de.robv.android.xposed.XposedHelpers.setStaticObjectField(r0, r9, r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x0052:\n r3 = move-exception;\n r9 = new java.lang.StringBuilder;\t Catch:{ ClassNotFoundError -> 0x009c }\n r9.<init>();\t Catch:{ ClassNotFoundError -> 0x009c }\n r10 = \"Inspeckage_DeviceData: \";\n r9 = r9.append(r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r10 = r3.getMessage();\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = r9.append(r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = r9.toString();\t Catch:{ ClassNotFoundError -> 0x009c }\n de.robv.android.xposed.XposedBridge.log(r9);\t Catch:{ ClassNotFoundError -> 0x009c }\n L_0x006d:\n return;\n L_0x006e:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"VERSION\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x00b8;\n L_0x0078:\n r9 = r4.name;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = r4.newValue;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n de.robv.android.xposed.XposedHelpers.setStaticObjectField(r1, r9, r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x0080:\n r3 = move-exception;\n r9 = new java.lang.StringBuilder;\t Catch:{ ClassNotFoundError -> 0x009c }\n r9.<init>();\t Catch:{ ClassNotFoundError -> 0x009c }\n r10 = \"Inspeckage_DeviceData: \";\n r9 = r9.append(r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r10 = r3.getMessage();\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = r9.append(r10);\t Catch:{ ClassNotFoundError -> 0x009c }\n r9 = r9.toString();\t Catch:{ ClassNotFoundError -> 0x009c }\n de.robv.android.xposed.XposedBridge.log(r9);\t Catch:{ ClassNotFoundError -> 0x009c }\n goto L_0x006d;\n L_0x009c:\n r3 = move-exception;\n r9 = new java.lang.StringBuilder;\n r9.<init>();\n r10 = \"Inspeckage_DeviceData: \";\n r9 = r9.append(r10);\n r10 = r3.getMessage();\n r9 = r9.append(r10);\n r9 = r9.toString();\n de.robv.android.xposed.XposedBridge.log(r9);\n goto L_0x006d;\n L_0x00b8:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"TelephonyManager\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x01cc;\n L_0x00c2:\n r11 = r4.name;\t Catch:{ Exception -> 0x0145 }\n r9 = -1;\n r12 = r11.hashCode();\t Catch:{ Exception -> 0x0145 }\n switch(r12) {\n case -2075953448: goto L_0x019f;\n case -1747832408: goto L_0x01b5;\n case -956724853: goto L_0x0189;\n case -619626785: goto L_0x01aa;\n case 2250952: goto L_0x0168;\n case 2251386: goto L_0x0173;\n case 474898999: goto L_0x017e;\n case 899443941: goto L_0x0194;\n case 1655618740: goto L_0x01c0;\n default: goto L_0x00cc;\n };\t Catch:{ Exception -> 0x0145 }\n L_0x00cc:\n switch(r9) {\n case 0: goto L_0x00d1;\n case 1: goto L_0x00fb;\n case 2: goto L_0x0104;\n case 3: goto L_0x010d;\n case 4: goto L_0x0116;\n case 5: goto L_0x011f;\n case 6: goto L_0x0128;\n case 7: goto L_0x0131;\n case 8: goto L_0x013a;\n default: goto L_0x00cf;\n };\t Catch:{ Exception -> 0x0145 }\n L_0x00cf:\n goto L_0x0030;\n L_0x00d1:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getDeviceId\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n r9 = \"com.android.internal.telephony.PhoneSubInfo\";\n r11 = \"getDeviceId\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n r9 = \"com.android.internal.telephony.PhoneProxy\";\n r11 = \"getDeviceId\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n r9 = android.os.Build.VERSION.SDK_INT;\t Catch:{ Exception -> 0x0145 }\n r11 = 22;\n if (r9 >= r11) goto L_0x00fb;\n L_0x00f2:\n r9 = \"com.android.internal.telephony.gsm.GSMPhone\";\n r11 = \"getDeviceId\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x00fb:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getSubscriberId\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x0104:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getLine1Number\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x010d:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getSimSerialNumber\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x0116:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getNetworkOperator\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x011f:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getNetworkOperatorName\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x0128:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getSimCountryIso\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x0131:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getNetworkCountryIso\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n L_0x013a:\n r9 = \"android.telephony.TelephonyManager\";\n r11 = \"getSimSerialNumber\";\n r12 = r4.newValue;\t Catch:{ Exception -> 0x0145 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ Exception -> 0x0145 }\n goto L_0x0030;\n L_0x0145:\n r3 = move-exception;\n r9 = new java.lang.StringBuilder;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9.<init>();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"Inspeckage_DeviceData: \";\n r9 = r9.append(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = r4.name;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = r9.append(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = r3.getMessage();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = r9.append(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = r9.toString();\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n de.robv.android.xposed.XposedBridge.log(r9);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x0168:\n r12 = \"IMEI\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x0170:\n r9 = 0;\n goto L_0x00cc;\n L_0x0173:\n r12 = \"IMSI\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x017b:\n r9 = 1;\n goto L_0x00cc;\n L_0x017e:\n r12 = \"PhoneNumber\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x0186:\n r9 = 2;\n goto L_0x00cc;\n L_0x0189:\n r12 = \"SimSerial\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x0191:\n r9 = 3;\n goto L_0x00cc;\n L_0x0194:\n r12 = \"CarrierCode\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x019c:\n r9 = 4;\n goto L_0x00cc;\n L_0x019f:\n r12 = \"Carrier\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x01a7:\n r9 = 5;\n goto L_0x00cc;\n L_0x01aa:\n r12 = \"SimCountry\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x01b2:\n r9 = 6;\n goto L_0x00cc;\n L_0x01b5:\n r12 = \"NetworkCountry\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x01bd:\n r9 = 7;\n goto L_0x00cc;\n L_0x01c0:\n r12 = \"SimSerialNumber\";\n r11 = r11.equals(r12);\t Catch:{ Exception -> 0x0145 }\n if (r11 == 0) goto L_0x00cc;\n L_0x01c8:\n r9 = 8;\n goto L_0x00cc;\n L_0x01cc:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"Advertising\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x01e4;\n L_0x01d6:\n r9 = \"com.google.android.gms.ads.identifier.AdvertisingIdClient$Info\";\n r11 = \"getId\";\n r12 = r4.newValue;\t Catch:{ ClassNotFoundError -> 0x01e1, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ ClassNotFoundError -> 0x01e1, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x01e1:\n r9 = move-exception;\n goto L_0x0030;\n L_0x01e4:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"Wi-Fi\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x026a;\n L_0x01ee:\n r11 = r4.name;\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = -1;\n r12 = r11.hashCode();\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n switch(r12) {\n case 2343: goto L_0x021f;\n case 2554747: goto L_0x0215;\n case 63507133: goto L_0x020b;\n case 803262031: goto L_0x0229;\n default: goto L_0x01f8;\n };\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n L_0x01f8:\n switch(r9) {\n case 0: goto L_0x01fd;\n case 1: goto L_0x0233;\n case 2: goto L_0x023e;\n case 3: goto L_0x025b;\n default: goto L_0x01fb;\n };\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n L_0x01fb:\n goto L_0x0030;\n L_0x01fd:\n r9 = \"android.net.wifi.WifiInfo\";\n r11 = \"getBSSID\";\n r12 = r4.newValue;\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x0208:\n r9 = move-exception;\n goto L_0x0030;\n L_0x020b:\n r12 = \"BSSID\";\n r11 = r11.equals(r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r11 == 0) goto L_0x01f8;\n L_0x0213:\n r9 = 0;\n goto L_0x01f8;\n L_0x0215:\n r12 = \"SSID\";\n r11 = r11.equals(r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r11 == 0) goto L_0x01f8;\n L_0x021d:\n r9 = 1;\n goto L_0x01f8;\n L_0x021f:\n r12 = \"IP\";\n r11 = r11.equals(r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r11 == 0) goto L_0x01f8;\n L_0x0227:\n r9 = 2;\n goto L_0x01f8;\n L_0x0229:\n r12 = \"Android\";\n r11 = r11.equals(r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r11 == 0) goto L_0x01f8;\n L_0x0231:\n r9 = 3;\n goto L_0x01f8;\n L_0x0233:\n r9 = \"android.net.wifi.WifiInfo\";\n r11 = \"getSSID\";\n r12 = r4.newValue;\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x023e:\n r8 = 0;\n r9 = r4.newValue;\t Catch:{ UnknownHostException -> 0x0256 }\n r9 = java.net.InetAddress.getByName(r9);\t Catch:{ UnknownHostException -> 0x0256 }\n r8 = mobi.acpm.inspeckage.util.Util.inetAddressToInt(r9);\t Catch:{ UnknownHostException -> 0x0256 }\n L_0x0249:\n r9 = \"android.net.wifi.WifiInfo\";\n r11 = \"getIpAddress\";\n r12 = java.lang.Integer.valueOf(r8);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n HookFingerprintItem(r9, r13, r11, r12);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x0256:\n r2 = move-exception;\n r2.printStackTrace();\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0249;\n L_0x025b:\n r9 = r4.newValue;\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r7 = mobi.acpm.inspeckage.util.Util.macAddressToByteArr(r9);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r9 = \"java.net.NetworkInterface\";\n r11 = \"getHardwareAddress\";\n HookFingerprintItem(r9, r13, r11, r7);\t Catch:{ ClassNotFoundError -> 0x0208, JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n goto L_0x0030;\n L_0x026a:\n r9 = r4.type;\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n r11 = \"Wi-Fi\";\n r9 = r9.equals(r11);\t Catch:{ JsonSyntaxException -> 0x0052, NoSuchMethodError -> 0x0080 }\n if (r9 == 0) goto L_0x0030;\n L_0x0274:\n goto L_0x0030;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.acpm.inspeckage.hooks.FingerprintHook.initAllHooks(de.robv.android.xposed.callbacks.XC_LoadPackage$LoadPackageParam):void\");\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "protected Iterable<JStachioExtension> extensions(Jooby application) {\n return ServiceLoader.load(\n JStachioExtension.class, application.getEnvironment().getClassLoader());\n }", "private interface LoadStrategy {\n /**\n * Perform loading on the specified module.\n * \n * @param logger logs the process\n * @param moduleName the name of the process\n * @param moduleDef a module\n * @throws UnableToCompleteException\n */\n void load(TreeLogger logger, String moduleName, ModuleDef moduleDef)\n throws UnableToCompleteException;\n }", "public abstract List<String> scanAllClassNames();", "@Test\n @Disabled(\"Not work in Java >=9\")\n void printAllClassJars() {\n var sysClassLoader = org.apache.commons.io.FileUtils.class.getClassLoader();\n var urLs = ((URLClassLoader) sysClassLoader).getURLs();\n for (var url : urLs) {\n System.out.println(url.getFile());\n }\n }", "public static void loadClass(String name) {\n\n }", "public Class<?> initializeClassLoader(Class<?> clazz, ClassFilter parentFilter, boolean importAll, Class<?>... packages)\n {\n MockClassLoaderPolicy policy = new MockClassLoaderPolicy();\n Set<Class<?>> classes = new HashSet<Class<?>>();\n classes.add(clazz);\n classes.addAll(Arrays.asList(packages));\n policy.setImportAll(importAll);\n policy.setPathsAndPackageNames(classes.toArray(new Class[classes.size()]));\n return initializeClassLoader(clazz, parentFilter, policy);\n }", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }", "@Before\n public void setUp() {\n configuration.resolveAdditionalDependenciesFromClassPath(false);\n }", "protected void loadRoutesFromClasses(final App app){\n\t\t//Load web app's routes.\n log.debug(\"Load routes[base-path=/] from classes in base package '{}'\", app.getBasePackage());\n\t\tfinal String basePackage = app.getBasePackage();\n\t\tapp.config().getResources().processClasses((cls) -> {\n\t\t\tif(cls.getName().startsWith(basePackage)){\n\t\t\t\tif(as.isControllerClass(cls)){\n log.debug(\" Load controller '{}'\", cls.getName());\n\t\t\t\t\tloadControllerClass(app, \"/\", cls);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t//Load web module's routes.\n\t\tfor(ModuleConfig module : app.getWebConfig().getModules()){\n\t\t\t// don't repeat load controller\n\t\t\tif(Strings.startsWith(module.getBasePackage()+\".\",basePackage+\".\")){\n\t\t\t\tif(Strings.isEmpty(module.getBasePath())||Strings.equals(\"/\",module.getBasePath())){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n log.debug(\"Scanning module resource(s) in package '{}'...\", module.getBasePackage());\n ResourceSet rs = Resources.scanPackage(module.getBasePackage());\n\n if(rs.isEmpty()) {\n log.info(\"No resource scanned in base package '{}' of module '{}', is the module exists?\",\n\t\t\t\t\t\tmodule.getBasePackage(), module.getName());\n }else{\n String appContextPath = app.getContextPath().equals(\"\") ? \"/\" : app.getContextPath();\n String moduleContextPath = module.getContextPath();\n\n if(Strings.isEmpty(moduleContextPath) || appContextPath.equals(moduleContextPath)) {\n\n log.debug(\"Load routes[base-path={}' from classes in base package '{}' of module '{}'.\",\n module.getBasePath(), module.getBasePackage(), module.getName());\n\n rs.processClasses((cls) -> {\n if(as.isControllerClass(cls)) {\n loadControllerClass(app, module.getBasePath(), cls);\n }\n });\n\n }\n }\n }\n\t}", "private SupplierLoaderUtil() {\n\t}", "private void loadExtensions(final Class extensionClass, final ExtensionClassLoader extensionClassLoader) {\n final ServiceLoader<?> serviceLoader = ServiceLoader.load(extensionClass, extensionClassLoader);\n for (final Object o : serviceLoader) {\n final String extensionClassName = o.getClass().getCanonicalName();\n if (classLoaderMap.containsKey(extensionClassName)) {\n final String currDir = extensionClassLoader.getRootDir();\n final String existingDir = classLoaderMap.get(extensionClassName).getRootDir();\n LOGGER.warn(\"Skipping {} from {} which was already found in {}\", new Object[]{extensionClassName, currDir, existingDir});\n } else {\n classLoaderMap.put(o.getClass().getCanonicalName(), extensionClassLoader);\n }\n }\n }", "protected void initializeImportedClasses(ModelClass modelClass, Service service) throws Exception {\n\t}", "@SuppressWarnings(\"unchecked\")\n private void resolveClasses() {\n for (String s : filesToResolve) {\n SchemaTupleFactory.LOG.info(\"Attempting to resolve class: \" + s);\n // Step one is to simply attempt to get the class object from the classloader\n // that includes the generated code.\n Class<?> clazz;\n try {\n clazz = classLoader.loadClass(s);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to find class: \" + s, e);\n }\n\n // Step three is to check if the class is a SchemaTuple. If it isn't,\n // we do not attempt to resolve it, because it is support code, such\n // as anonymous classes.\n if (!SchemaTuple.class.isAssignableFrom(clazz)) {\n return;\n }\n\n Class<SchemaTuple<?>> stClass = (Class<SchemaTuple<?>>)clazz;\n\n // Step four is to actually try to create the SchemaTuple instance.\n SchemaTuple<?> st;\n try {\n st = stClass.newInstance();\n } catch (InstantiationException e) {\n throw new RuntimeException(\"Error instantiating file: \" + s, e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Error accessing file: \" + s, e);\n }\n\n // Step five is to get information about the class.\n boolean isAppendable = st instanceof AppendableSchemaTuple<?>;\n int id = st.getSchemaTupleIdentifier();\n Schema schema = st.getSchema();\n\n SchemaTupleFactory stf = new SchemaTupleFactory(stClass, st.getQuickGenerator());\n\n for (GenContext context : GenContext.values()) {\n if (context != GenContext.FORCE_LOAD && !context.shouldGenerate(stClass)) {\n SchemaTupleFactory.LOG.debug(\"Context [\"+context+\"] not present for class, skipping.\");\n continue;\n }\n\n // the SchemaKey (Schema sans alias) and appendability are how we will\n // uniquely identify a SchemaTupleFactory\n Triple<SchemaKey, Boolean, GenContext> trip =\n Triple.make(new SchemaKey(schema), isAppendable, context);\n\n schemaTupleFactoriesByTriple.put(trip, stf);\n\n SchemaTupleFactory.LOG.info(\"Successfully resolved class for schema [\"+schema+\"] and appendability [\"+isAppendable+\"]\"\n + \" in context: \" + context);\n }\n schemaTupleFactoriesById.put(id, stf);\n }\n }", "private void copyAndResolve() throws IOException {\n if (abort) {\n LOG.debug(\"Nothing to resolve on the backend.\");\n return;\n }\n // Step one is to see if there are any classes in the distributed cache\n if (!jConf.getBoolean(PIG_SCHEMA_TUPLE_ENABLED, SCHEMA_TUPLE_ON_BY_DEFAULT)) {\n LOG.info(\"Key [\" + PIG_SCHEMA_TUPLE_ENABLED +\"] was not set... will not generate code.\");\n return;\n }\n // Step two is to copy everything from the distributed cache if we are in distributed mode\n if (!isLocal) {\n copyAllFromDistributedCache();\n }\n // Step three is to see if the file needs to be resolved\n // If there is a \"$\" in the name, we know that it is an inner\n // class and thus doesn't need to be instantiated directly.\n for (File f : codeDir.listFiles()) {\n String name = f.getName().split(\"\\\\.\")[0];\n if (!name.contains(\"$\")) {\n filesToResolve.add(name);\n LOG.info(\"Added class to list of class to resolve: \" + name);\n }\n }\n // Step four is to actually try and resolve the classes\n resolveClasses();\n }", "@Override\n\tpublic void loadService() {\n\t\t\n\t}", "protected void setUp() {\n Collection<? extends ModuleInfo> infos = Lookup.getDefault().<ModuleInfo>lookupAll(ModuleInfo.class);\n }", "private static ClassLoader getClassLoader() {\n return LoggerProviders.class.getClassLoader();\n }", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "public void loadPluginsStartup();", "private ModuleLoader() {\r\n }", "@Override\n\tpublic void initUtils() {\n\n\t}", "public static synchronized void bootstrap() {\n ImplementingClassResolver.clearCache();\n if (bootstrapedNeeded) {\n reflectionsModel.rescann(\"\");\n }\n bootstrapedNeeded = false;\n }", "public void initClassLoader() {\n FileClassLoadingService classLoader = new FileClassLoadingService();\n\n // init from preferences...\n Domain classLoaderDomain = getPreferenceDomain().getSubdomain(\n FileClassLoadingService.class);\n\n Collection details = classLoaderDomain.getPreferences();\n if (details.size() > 0) {\n\n // transform preference to file...\n Transformer transformer = new Transformer() {\n\n public Object transform(Object object) {\n DomainPreference pref = (DomainPreference) object;\n return new File(pref.getKey());\n }\n };\n\n classLoader.setPathFiles(CollectionUtils.collect(details, transformer));\n }\n\n this.modelerClassLoader = classLoader;\n }", "public Set<Class<?>> getScanClasses();", "@BeforeClass\n public void loadGeneratedClasses() throws IOException, ClassNotFoundException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assertNotNull(classLoader, \"Unable to load ClassLoader to find generated JPA Java classes.\");\n \n Enumeration<URL> jpaClassFileURL = classLoader.getResources(\"com/goldstandard/model/\");\n assertTrue(jpaClassFileURL.hasMoreElements(), \"Cannot find com/goldstandard/model/ resource\");\n \n // There should only be one base resource directory\n File jpaClassFileDir = new File(jpaClassFileURL.nextElement().getFile());\n \n generatedClassList = new ArrayList<Class<?>>();\n generatedClassNameMap = new HashMap<String, Class<?>>();\n generatedEnumNameMap = new HashMap<String, Class<?>>();\n \n // Loop through all the class files in the com.goldstandard.model package\n for (File classFile : jpaClassFileDir.listFiles()) {\n Matcher matcher = GENERATED_CLASS_PATTERN.matcher(classFile.getCanonicalPath());\n if (matcher.matches()) {\n String packageName = matcher.group(1).replace('/', '.');\n String className = matcher.group(2);\n \n // Load up the generated class and add it to the data provider\n Class<?> generatedClass = Class.forName(packageName + \".\" + className);\n if (!generatedClass.isEnum()) {\n generatedClassList.add(generatedClass);\n generatedClassNameMap.put(generatedClass.getAnnotation(Table.class).name(), generatedClass);\n } else {\n generatedEnumNameMap.put(className, generatedClass);\n }\n }\n }\n \n assertTrue(generatedClassList.size() > 0, \"Did not find any generated classes\");\n }", "private void parseSystemClasspath() {\n\t // Look for all unique classloaders.\n\t // Keep them in an order that (hopefully) reflects the order in which class resolution occurs.\n\t ArrayList<ClassLoader> classLoaders = new ArrayList<>();\n\t HashSet<ClassLoader> classLoadersSet = new HashSet<>();\n\t classLoadersSet.add(ClassLoader.getSystemClassLoader());\n\t classLoaders.add(ClassLoader.getSystemClassLoader());\n\t if (classLoadersSet.add(Thread.currentThread().getContextClassLoader())) {\n\t classLoaders.add(Thread.currentThread().getContextClassLoader());\n\t }\n\t // Dirty method for looking for any other classloaders on the call stack\n\t try {\n\t // Generate stacktrace\n\t throw new Exception();\n\t } catch (Exception e) {\n\t StackTraceElement[] stacktrace = e.getStackTrace();\n\t for (StackTraceElement elt : stacktrace) {\n\t try {\n\t ClassLoader cl = Class.forName(elt.getClassName()).getClassLoader();\n\t if (classLoadersSet.add(cl)) {\n\t classLoaders.add(cl);\n\t }\n\t } catch (ClassNotFoundException e1) {\n\t }\n\t }\n\t }\n\n\t // Get file paths for URLs of each classloader.\n\t clearClasspath();\n\t for (ClassLoader cl : classLoaders) {\n\t if (cl != null) {\n\t for (URL url : getURLs(cl)) {\n\t \t\n\t if (\"file\".equals(url.getProtocol())) {\n\t addClasspathElement(url.getFile());\n\t }\n\t }\n\t }\n\t }\n\t}", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleDependencies() {\n\t\tCollection<Class<? extends IFloodlightService>> l =\n\t\t new ArrayList<Class<? extends IFloodlightService>>();\n\t\t l.add(IFloodlightProviderService.class);\n\t\t l.add(IStaticEntryPusherService.class);\n\t\t return l;\n\t}", "public static void loadAnalyzerContributions() {\n\t\tIExtensionRegistry registry = Platform.getExtensionRegistry();\n\t\tIConfigurationElement[] config = registry.getConfigurationElementsFor(Activator.PLUGIN_ANALYZER_EXTENSION_ID);\n\t\ttry {\n\t\t\tfor (IConfigurationElement element : config) {\n\t\t\t\tfinal Object o = element.createExecutableExtension(\"class\");\n\t\t\t\tif (o instanceof Analyzer) {\n\t\t\t\t\tAnalyzer analyzer = (Analyzer) o;\n\t\t\t\t\tregisterAnalyzer(analyzer);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (CoreException e) {\n\t\t\tLog.error(\"Error loading analyzers.\", e);\n\t\t}\n\t}", "private void loadClassesFromJar(final String runnableID, final File jarfile) {\n \n mTaskCache.get(runnableID).taskClasses = new LinkedList<Class>();\n \n Log.i(TAG,\n \"XXX: Calling DexClassLoader with jarfile: \" + jarfile.getAbsolutePath());\n final File tmpDir = mContext.getDir(\"dex\", 0);\n \n mTaskCache.get(runnableID).classLoader = new DexClassLoader(\n jarfile.getAbsolutePath(),\n tmpDir.getAbsolutePath(),\n null,\n BackgroundService.class.getClassLoader());\n // mTaskCache.get(mCurrentRunnableID).classLoader = mTaskCache.get(runnableID).classLoader;\n // setRunnableID(runnableID); \n \n // load all available classes\n String path = jarfile.getPath();\n \n \n try {\n // load dexfile\n DexFile dx = DexFile.loadDex(\n path,\n File.createTempFile(\"opt\", \"dex\", mContext.getCacheDir()).getPath(),\n 0);\n \n // extract all available classes\n for (Enumeration<String> classNames = dx.entries(); classNames.hasMoreElements();) {\n String className = classNames.nextElement();\n Log.i(TAG, String.format(\"found class: %s\", className));\n try {\n // TODO: do only forName() here?\n // final Class<Object> loadedClass = (Class<Object>) mClassLoaderWrapper.get().loadClass(className);\n final Class<Object> loadedClass = (Class<Object>) mTaskCache.get(runnableID).classLoader.loadClass(className);\n Log.i(TAG, String.format(\"Loaded class: %s\", className));\n // add associated classes to task class list\n if (loadedClass == null) {\n Log.e(TAG, \"EEEEEE loadedClass is null\");\n }\n if (mTaskCache.get(runnableID) == null) {\n Log.e(TAG, \"EEEEEE no mapentry found\");\n }\n if (mTaskCache.get(runnableID).taskClasses == null) {\n Log.e(TAG, \"EEEEEE taskClasses empty\");\n }\n mTaskCache.get(runnableID).taskClasses.add(loadedClass);\n // add task class to task list\n if (DistributedRunnable.class.isAssignableFrom(loadedClass)) {\n mTaskCache.get(runnableID).taskClass = loadedClass;\n }\n }\n catch (ClassNotFoundException ex) {\n Log.getStackTraceString(ex);\n }\n }\n }\n catch (IOException e) {\n System.out.println(\"Error opening \" + path);\n }\n // notify listeners\n for (JobCenterHandler handler : mHandlerList) {\n handler.onBinaryReceived(runnableID);\n }\n }", "private void initializeBoot()\n {\n bootLoader = getClass().getClassLoader();\n\n // Get the home directory of the Java implementation we're being run by\n javaHomeDir = new File(System.getProperty(\"java.home\"));\n\n try {\n runtimeClassPath = getKnownJars(getBluejLibDir(), runtimeJars, false, numBuildJars);\n runtimeUserClassPath = getKnownJars(getBluejLibDir(), userJars, true, numUserBuildJars);\n }\n catch (Exception exc) {\n exc.printStackTrace();\n }\n }", "public static void load()\n {\n\n try {\n System.loadLibrary(\"gnustl_shared\");\n System.loadLibrary(\"log\");\n System.loadLibrary(composeLibName(\"PocoFoundation\"));\n System.loadLibrary(composeLibName(\"PocoXML\"));\n System.loadLibrary(composeLibName(\"PocoJSON\"));\n System.loadLibrary(composeLibName(\"PocoUtil\"));\n System.loadLibrary(composeLibName(\"PocoData\"));\n System.loadLibrary(composeLibName(\"PocoDataSQLite\"));\n System.loadLibrary(\"HRFusion\");\n }\n catch(Error e)\n {\n Log.e(LOG_TAG, e.getMessage());\n throw e;\n }\n }", "private ReflectionTypeResolver(List<Class<?>> classes) {\n this.classes = classes;\n }", "private void loadOutputModules() {\n\t\tthis.outputModules = new ModuleLoader<IOutput>(\"/Output_Modules\", IOutput.class).loadClasses();\n\t}", "List<Class<?>> getManagedClasses();", "public void testMultipleConflictingDynamicImports() throws Exception {\n\n\t\tsetupImportChoices();\n\t\tConfigurableWeavingHook hook = new ConfigurableWeavingHook();\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";version=\\\"(1.0,1.5)\\\"\");\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";foo=bar\");\n\t\thook.setChangeTo(IMPORT_TEST_CLASS_NAME);\n\t\tServiceRegistration<WeavingHook> reg = null;\n\t\ttry {\n\t\t\treg = hook.register(getContext(), 0);\n\t\t\tClass<?>clazz = weavingClasses.loadClass(DYNAMIC_IMPORT_TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\",\n\t\t\t\t\tTEST_IMPORT_SYM_NAME + \"_1.1.0\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\t\t} finally {\n\t\t\tif (reg != null)\n\t\t\t\treg.unregister();\n\t\t\ttearDownImportChoices();\n\t\t}\n\t}", "private void init() throws ClassNotFoundException{\n }", "public void importClass(String klass) throws Exception;", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "public static void checkClass(String clazz, I_Classes classes) {\n try {\n //actually load all of the classes using the default classloader here\n classes.forName(clazz, false, ClassLoader.getSystemClassLoader());\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassLoaderPolicy policy, String... parentPackages)\n {\n // The parent filter\n PackageClassFilter filter = new PackageClassFilter(parentPackages);\n filter.setIncludeJava(true);\n return initializeClassLoader(clazz, system, filter, ClassFilterUtils.NOTHING, policy);\n }", "@Override\n protected void injectDependencies(Context context) {\n }", "void inject(BaseApplication application);", "public void boot()\n {\n injector = Guice.createInjector( modules );\n }", "public void loadPlugins()\n throws Exception\n {\n SecurityClassLoader securityClassLoader = new SecurityClassLoader(Plugin.class.getClassLoader(),\n ImmutableList.of(\"ideal.sylph.\", \"com.github.harbby.gadtry.\")); //raed only sylph-api deps\n this.loader = ModuleLoader.<Plugin>newScanner()\n .setPlugin(Plugin.class)\n .setScanDir(pluginDir)\n .setLoader(OperatorManager::serviceLoad)\n .setClassLoaderFactory(urls -> new VolatileClassLoader(urls, securityClassLoader)\n {\n @Override\n protected void finalize()\n throws Throwable\n {\n super.finalize();\n logger.warn(\"Jvm gc free ClassLoader: {}\", Arrays.toString(urls));\n }\n })\n .setLoadHandler(module -> {\n logger.info(\"loading module {} find {} Operator\", module.getName(), module.getPlugins().size());\n ModuleInfo moduleInfo = new ModuleInfo(module, new ArrayList<>());\n analyzeModulePlugins(moduleInfo);\n ModuleInfo old = userExtPlugins.put(module.getName(), moduleInfo);\n if (old != null) {\n Try.of(old::close).onFailure(e -> logger.warn(\"free old module failed\", e)).doTry();\n }\n }).load();\n }", "public List<Class<?>> getKnownClasses();", "public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }", "public String[] readClasses();", "Set<Class<?>> getClassSet(String packageName);", "Collection<Class<?>> registerEntities();", "private void enforceTransitiveClassUsage() {\n HashSet<String> tmp = new HashSet<String>(usedAppClasses);\n for(String className : tmp) {\n enforceTransitiveClassUsage(className);\n }\n }", "public static void loadPOTables(){\n\t\ttry {\n\t\t\tfor(TableInfo tableInfo:tables.values()){\n\t\t\t\tClass c = Class.forName(DBManager.getConfiguration().getPoPackage()+\".\"+StringUtils.firstCharUpperCase(tableInfo.getTname()));\n\t\t\t\tpoClassTableMap.put(c, tableInfo);\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void rescanRepository() { // recree les liste de classes connues a partir du depot\n // cette methode peut etre invoquee si on sait que le depot a ete modifie\n for (int i=0; i<types.length; i++) {\n classesDisponibles[i] = new HashMap<String, String>();\n scanRepository(types[i], classesDisponibles[i]);\n }\n }", "public void load() throws ClassNotFoundException, IOException;", "private static ImmutableList<Class<?>> applicationEntities() {\n List<String> paths = new ArrayList<>(List.of(PREFIX_STRING));\n if (additionalPaths != null) {\n paths.addAll(additionalPaths);\n }\n\n final List<Class<?>> collect = paths\n .stream()\n .map(path -> {\n logger.info(\"Scanning {} for Hibernate entities\", path);\n final Reflections reflections = new Reflections(path);\n final Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class);\n logger.info(\"Found {} Hibernate entities\", entities.getClass());\n if (logger.isDebugEnabled()) {\n entities.forEach((entity) -> logger.debug(\"Registered {}.\", entity.getName()));\n }\n return entities;\n })\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n\n return ImmutableList.copyOf(collect);\n }", "protected static void classInitializers() throws Exception {\r\n\t\tfor (int i=0; i<classes.size(); i++) {\r\n\t\t\tClass<?> c = classes.get(i);\r\n\t\t\tMethod clreinit = c.getDeclaredMethod(\"clreinit\", zeroFormalParams);\r\n\t\t\tclreinit.invoke(null, new Object[0]);\t//static meth, zero params\r\n\t\t}\t\t\t\r\n\t}", "private static void doUnloading() {\n stopJit();\n // Do multiple GCs to prevent rare flakiness if some other thread is keeping the\n // classloader live.\n for (int i = 0; i < 5; ++i) {\n Runtime.getRuntime().gc();\n }\n startJit();\n }", "ProviderManagerExt()\n {\n load();\n }", "private void initSingletons() {\n\t\tModel.getInstance();\n\t\tSocialManager.getInstance();\n\t\tMensaDataSource.getInstance();\n\t}", "public void loadDependencies() throws Exception {\n\n\t\t// Make seperate loading bar\n\t\tif (plugin.getConfigHandler().useAdvancedDependencyLogs()) {\n\t\t\tplugin.getLogger().info(\"---------------[Autorank Dependencies]---------------\");\n\t\t\tplugin.getLogger().info(\"Searching dependencies...\");\n\t\t}\n\n\t\t// Load all dependencies\n\t\tfor (final DependencyHandler depHandler : handlers.values()) {\n\t\t\t// Make sure to respect settings\n\t\t\tdepHandler.setup(plugin.getConfigHandler().useAdvancedDependencyLogs());\n\t\t}\n\n\t\tif (plugin.getConfigHandler().useAdvancedDependencyLogs()) {\n\t\t\tplugin.getLogger().info(\"Searching stats plugin...\");\n\t\t\tplugin.getLogger().info(\"\");\n\t\t}\n\n\t\t// Search a stats plugin.\n\t\tstatsPluginManager.searchStatsPlugin();\n\n\t\tif (plugin.getConfigHandler().useAdvancedDependencyLogs()) {\n\t\t\t// Make seperate stop loading bar\n\t\t\tplugin.getLogger().info(\"---------------[Autorank Dependencies]---------------\");\n\t\t}\n\n\t\tplugin.getLogger().info(\"Loaded libraries and dependencies\");\n\n\t}", "void inject(TravelsProvider provider);", "@BeforeAll\n static void init() {\n }", "public static void resetClasses() {\r\n\t\ttry {\r\n\t\t\tzeroStaticFields();\r\n\t\t\t\r\n\t\t\t//FIXME TODO: de-tangle quick-and-dirty approach from above register-reset-to-zero \r\n\t\t\t// which is needed for each load-time approach.\r\n\t\t\tclassInitializers();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t//should not happen\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public interface BuiltInsLoader {\n public static final Companion Companion = Companion.$$INSTANCE;\n\n PackageFragmentProvider createPackageFragmentProvider(StorageManager storageManager, ModuleDescriptor moduleDescriptor, Iterable<? extends ClassDescriptorFactory> iterable, PlatformDependentDeclarationFilter platformDependentDeclarationFilter, AdditionalClassPartsProvider additionalClassPartsProvider, boolean z);\n\n /* compiled from: BuiltInsLoader.kt */\n public static final class Companion {\n static final /* synthetic */ Companion $$INSTANCE = new Companion();\n private static final Lazy<BuiltInsLoader> Instance$delegate = LazyKt.lazy(LazyThreadSafetyMode.PUBLICATION, BuiltInsLoader$Companion$Instance$2.INSTANCE);\n\n private Companion() {\n }\n\n public final BuiltInsLoader getInstance() {\n return Instance$delegate.getValue();\n }\n }\n}" ]
[ "0.67314744", "0.6192432", "0.586781", "0.58536124", "0.58493865", "0.5833094", "0.5823469", "0.57288814", "0.56367797", "0.556082", "0.5557911", "0.5530523", "0.5504782", "0.5478327", "0.54295546", "0.54283893", "0.54174554", "0.5407931", "0.53960836", "0.5367793", "0.53673977", "0.5359202", "0.5349696", "0.5333019", "0.5309757", "0.5277859", "0.526727", "0.52397364", "0.5212295", "0.51945287", "0.5194409", "0.519054", "0.5188069", "0.51879853", "0.5180913", "0.5180178", "0.5176036", "0.5172772", "0.5166108", "0.51609784", "0.5159351", "0.51381266", "0.5131909", "0.51317114", "0.5130805", "0.5119841", "0.5117619", "0.5095572", "0.5083918", "0.50446934", "0.504123", "0.5028487", "0.502626", "0.5020985", "0.50077665", "0.4994186", "0.49939543", "0.49926293", "0.4992244", "0.4962875", "0.49606323", "0.49548313", "0.49540827", "0.49415544", "0.4938513", "0.49384987", "0.49285612", "0.49275032", "0.49213877", "0.49195784", "0.49160773", "0.4909177", "0.49057314", "0.49054193", "0.49051014", "0.4902905", "0.49009234", "0.48989698", "0.48969945", "0.48911816", "0.4888999", "0.48843688", "0.48816767", "0.48749205", "0.48613712", "0.48578152", "0.48482892", "0.48405984", "0.48402065", "0.48383856", "0.4837972", "0.48366052", "0.48340368", "0.48280847", "0.48262757", "0.4824596", "0.4799532", "0.4796851", "0.47949132", "0.47937858" ]
0.6399398
1
TODO Autogenerated method stub
private UserDTO createUserDto(User userToReturn) { List<Account> accounts = userToReturn.getAccounts(); List<AccountDTO> accountsDTO = new ArrayList<AccountDTO>( accounts != null ? accounts.size() : 0); if (accounts != null) { for (Account account : accounts) { accountsDTO.add(new AccountDTO(account.getId(), account .getRib(), account.getOpeningDate(), account.getSolde(), account.getType(), null, null, new UserDTO(), null, null)); } } return new UserDTO(userToReturn.getId(), userToReturn.getLogin(), userToReturn.getPassword(), userToReturn.getFullName(), accountsDTO); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Creates new form Registro
public Registro1(String x,String y,String z) { initComponents(); this.setTitle("Registro Compras - Sistema Inventario BTZ"); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); //this.setSize(dim); this.setLocationRelativeTo(null); this.setResizable(false); this.setDefaultCloseOperation(this.HIDE_ON_CLOSE); this.setSize(1300, 570); X=x; Y=x; Z=z; modeloBusqueda.addColumn("Fecha Compra"); modeloBusqueda.addColumn("Serie"); modeloBusqueda.addColumn("Número"); modeloBusqueda.addColumn("No. Lote"); modeloBusqueda.addColumn("Código"); modeloBusqueda.addColumn("Producto"); modeloBusqueda.addColumn("Marca"); modeloBusqueda.addColumn("Cantidad Inicial"); modeloBusqueda.addColumn("Cantidad Stock"); modeloBusqueda.addColumn("Unidad"); modeloBusqueda.addColumn("Costo Unitario"); modeloBusqueda.addColumn("Costo Total"); modeloBusqueda.addColumn("Ganancia"); //modeloBusqueda.addColumn("Precio Unitario"); //modeloBusqueda.addColumn("Precio Total"); //modeloBusqueda.addColumn("Nitgñkjgñ"); // modeloBusqueda.addColumn("Proveedor"); Lote.setModel(modeloBusqueda); String datos[] = new String[16]; try { Statement sx = Consulta.createStatement(); ResultSet Ca = sx.executeQuery("SELECT DATE_FORMAT(L.Fecha,\"%d/%m/%Y %H:%i:%s\"),C.Serie,C.Numero,L.NoLote,P.Codigo," + "P.Nombre,P.Marca,L.Cantidadi,L.Cantidad,U.Medida,L.CostoUnitario,L.CostoTotal,L.Ganancia\n" + "FROM UnidadMedida_1 U inner join Producto P on U.id=P.UnidadMedida_1_id\n" + "inner JOIN Lote L \n" + "on P.id=L.Producto_id \n" + "inner JOIN FacturaCompra C \n" + "on C.id=L.FacturaCompra_id\n" + "inner JOIN Proveedor V \n" + "on V.id=C.Proveedor_id where P.Nombre='"+y+"' && P.Marca='"+x+"' && U.Medida='"+z+"' && L.Disponible=true && L.Anulado=false Order By L.Fecha "); while (Ca.next()) { datos[0] = Ca.getString(1); datos[1] = Ca.getString(2); datos[2] = Ca.getString(3); datos[3] = Ca.getString(4); datos[4] = Ca.getString(5); datos[5] = Ca.getString(6); datos[6] = Ca.getString(7); datos[7] = Ca.getString(8); datos[8] = Ca.getString(9); datos[9] = Ca.getString(10); datos[10] = Ca.getString(11); datos[11] = Ca.getString(12); datos[12] = Ca.getString(13); //datos[13] = Ca.getString(14); //datos[14] = Ca.getString(15); modeloBusqueda.addRow(datos); } Lote.setModel(modeloBusqueda); } catch (SQLException ex) { Logger.getLogger(Ingreso.class.getName()).log(Level.SEVERE, null, ex); } Lote.setVisible(true); Lote.getColumn("Fecha Compra").setPreferredWidth(90); Lote.getColumn("Serie").setPreferredWidth(35); Lote.getColumn("Número").setPreferredWidth(45); // Lote.getColumn("Precio Unitario").setPreferredWidth(100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public Registro() {\n initComponents();\n }", "public Registro() {\n initComponents();\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public registro() {\n initComponents();\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public FormInserir() {\n initComponents();\n }", "@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }", "public RegistroCompra() {\n initComponents();\n buscarProveedor();\n }", "public FrmInsertar() {\n initComponents();\n }", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public RegistroCamas() {\n initComponents();\n }", "public GestionarRegistro() {\n initComponents();\n this.setLocationRelativeTo(null);\n d = new Donante();\n v = new Validacion();\n a=new Archivos();\n \n // r=new RegistroDonanteApto();\n\n }", "public void register(String form /* should be a Form from GUI */){\n String email = \"email\";\n String nome_completo = \"full_name\";\n Date data_nascimento = new Date(1996-10-21);\n String password = getMd5(\"password\");\n String nif = \"nif\";\n String morada = \"morada\";\n String telemovel = \"telemovel\";\n User user = new User(email);\n if (!user.exists()){\n user.setNome_completo(nome_completo);\n user.setData_nascimento(data_nascimento);\n user.setPassword(password);\n user.setNif(nif);\n user.setMorada(morada);\n user.setTelemovel(telemovel);\n user.setAdmin(FALSE);\n //System registers person\n //db.register(user)\n }\n }", "public Registro_Usuario() {\r\n System.out.println(\"hola mundo \");\r\n initComponents();\r\n System.out.println(\"hola\");\r\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public CARGOS_REGISTRO() {\n initComponents();\n InputMap map2 = txtNombre.getInputMap(JTextField.WHEN_FOCUSED); \n map2.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap maps = TxtSue.getInputMap(JTextField.WHEN_FOCUSED); \n maps.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n InputMap map3 = txtFun.getInputMap(JTextField.WHEN_FOCUSED); \n map3.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK), \"null\");\n this.setLocationRelativeTo(null);\n this.txtFun.setLineWrap(true);\n this.lblId.setText(Funciones.extraerIdMax());\n\t\tsexo.addItem(\"Administrativo\");\n\t\tsexo.addItem(\"Operativo\");\n sexo.addItem(\"Tecnico\");\n sexo.addItem(\"Servicios\");\n \n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "public String createRegisterForm(Register reg)\n {\n DBConnect db = new DBConnect();\n Connection con;\n \n try\n {\n con = (Connection) db.establishConnection();\n String q = \"insert into registerUser (register_name, register_email, register_phone, register_pass)\"\n + \"values (?, ?, ?, ?)\";\n \n PreparedStatement prepareState = con.prepareStatement(q);\n \n prepareState.setString(1, reg.getRegisterName());\n prepareState.setString(2, reg.getRegisterEmail());\n prepareState.setString(3, reg.getRegisterPhone());\n prepareState.setString(4, reg.getRegisterPassword());\n \n prepareState.execute();\n con.close();\n \n return \"Successfully Registered..!!\";\n }\n \n catch(Exception ex)\n {\n System.err.println(\"Exception..!!\");\n System.err.println(\"Message: \" + ex.getMessage());\n \n return \"Data Not Registered..!!\";\n }\n \n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public VentanaDialogRegister(ListadoUsuarios listadoUsuarios) {\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\tthis.listadoUsuarios = listadoUsuarios;\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(new Color(0, 139, 139));\n\t\tpanel.setBounds(0, 0, 444, 271);\n\t\tgetContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\ttxtContrasea = new JPasswordField();\n\t\ttxtContrasea.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtContrasea.setBounds(183, 114, 113, 23);\n\t\tpanel.add(txtContrasea);\n\t\ttxtContrasea.setColumns(10);\n\t\t\n\t\ttxtNombreDeUsuario = new JTextField();\n\t\ttxtNombreDeUsuario.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttxtNombreDeUsuario.setBounds(183, 73, 113, 30);\n\t\tpanel.add(txtNombreDeUsuario);\n\t\ttxtNombreDeUsuario.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Registrar\");\n\t\t\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\tauxUsuario = listadoUsuarios.buscarUnUsuario(txtNombreDeUsuario.getText());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(auxUsuario==null){\n\t\t\t\t\tauxUsuario= new Usuario();\n\t\t\t\t\tauxUsuario.setAdmin(false);\n\t\t\t\t\tauxUsuario.setNombreU(txtNombreDeUsuario.getText());\n\t\t\t\t\tauxUsuario.setClave(txtContrasea.getText());\n\t\t\t\t\tlistadoUsuarios.agregarUsuario(auxUsuario);\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"USUARIO REGISTRADO\");\n\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"ERROR! ESE NOMBRE DE USUARIO YA EXISTE\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(172, 205, 124, 30);\n\t\tpanel.add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"REGISTRO DE USUARIOS\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tlblNewLabel.setBounds(134, 11, 196, 37);\n\t\tpanel.add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Nombre de Usuario:\");\n\t\tlblNewLabel_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1.setBounds(54, 76, 128, 23);\n\t\tpanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"Clave:\");\n\t\tlblNewLabel_1_1.setFont(new Font(\"Trebuchet MS\", Font.BOLD, 14));\n\t\tlblNewLabel_1_1.setBounds(119, 113, 79, 23);\n\t\tpanel.add(lblNewLabel_1_1);\n\t}", "public CrearPedidos() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "public Registracija() {\n initComponents();\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public Registro_Tratamento() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"Registro de tratamentos\");\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"abc@xyz.com\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "private void registrar(HttpServletRequest request, HttpServletResponse response) throws ServletException {\n\t\ttry {\n\t\t\t//leo lo que nos envia el formulario de la vista nuevoCliente.jsp y los almaceno en un objeto tipo Cliente\n\t\t\tCliente miCliente = new Cliente();\n\t\t\t\t\n\t\t\t//agregamos al objeto lo que proviene del formulario usando el constructor de clase Cliente\n\t\t\tmiCliente.setNombre(request.getParameter(\"nombre\"));\n\t\t\tmiCliente.setEmail(request.getParameter(\"email\"));\n\t\t\tmiCliente.setPass(request.getParameter(\"password\"));\n\t\t\tmiCliente.setEdad(Integer.parseInt(request.getParameter(\"edad\")));\n\t\t\tmiCliente.setDomicilioCalle(request.getParameter(\"domicilioCalle\"));\n\t\t\tmiCliente.setDomicilioNumero(Integer.parseInt(request.getParameter(\"domicilioNumero\")));\n\t\t\tmiCliente.setLocalidad(request.getParameter(\"localidad\"));\n\t\t\t\n\t\t\t//seteamos la fecha/hora de sesion\n\t\t\tDate d=new Date();\n\t\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yy-MM-dd hh:mm:ss\");//objeto tipo formato de fecha. Le pasamos el formato de la fecha\n\t\t\tString ultimaSesion=sdf.format(d);\n\t\t\tmiCliente.setUltimaSesion(ultimaSesion);\n\t\t\t\n\t\t\tmiCliente.setIdUsuario(Integer.parseInt(request.getParameter(\"idUsuario\")));//seteo el valor 2 que viene oculto desde el form\n\t\t\t\n\t\t\t//llamo al modelo para hacer el INSERT verfico si pudo insertar\n\t\t\tif(modelo.crearCliente(miCliente)) {\n\t\t\t\tresponse.getWriter().println(\"Usted se ha registrado Correctamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tresponse.getWriter().println(\"No se pudo efectuar registrar\");\n\t\t\t\t}\n\t\t} catch (NumberFormatException | NoSuchAlgorithmException | SQLException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.POST)\n\tpublic String saveEntity(@Valid ENTITY tipoConsumo, BindingResult result, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\ttry{\n\t\n\t\t\tif (result.hasErrors()) {\n\t\t\t\treturn viewBaseLocation + \"/form\";\n\t\t\t}\n\t\n\t\t\tabm.guardar(tipoConsumo);\n\t\n\t\t\tif(idEstadia != null){\n\t\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t\t}\n\t\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten se realiz&oacute correctamente.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tmodel.addAttribute(\"success\", \"La creaci&oacuten no pudo realizarse.\");\n\t\t}\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn \"redirect:list\";\n\t}", "public RegistrarEquipo() {\n initComponents();\n user = Login.user;\n IDClienteUpdate = GestionarClientes.IDCliente_update;\n\n try {\n Connection cn = Conexion.conectar();\n PreparedStatement pst = cn.prepareStatement(\n \"select nombre_cliente from clientes where id_cliente = '\" + IDClienteUpdate + \"'\");\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n nom_cliente = rs.getString(\"nombre_cliente\");\n }\n } catch (SQLException e) {\n System.err.println(\"Error al consultar el nombre del cliente.\");\n }\n this.setTitle(\"Registrar nuevo equipo para \" + nom_cliente);\n this.setSize(630, 445);\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\n /// IMAGEN DE FONDO\n ImageIcon wallpaper = new ImageIcon(\"src/images/wallpaperPrincipal.jpg\"); //Poner imagen de fondo\n //Adaptar el tamaño del JLabel LA IMAGEN Y ASÍ, con anchura, altura y que se escalable\n Icon icono = new ImageIcon(wallpaper.getImage().getScaledInstance(lbl_wallpaper.getWidth(), lbl_wallpaper.getHeight(), Image.SCALE_DEFAULT));\n lbl_wallpaper.setIcon(icono); //Colocamos el objeto en el label\n this.repaint(); //Necesario por que a veces no se ve la imagen.\n\n txt_nombreCliente.setText(nom_cliente);\n }", "@RequestMapping(method = RequestMethod.POST, value = {\"\",\"/\"})\r\n\tpublic ResponseEntity<FormularioDTO> add(@RequestBody @Valid Formulario formulario) throws AuthenticationException {\r\n\t\tformulario.setInstituicao(new Instituicao(authService.getDados().getInstituicaoId()));\r\n\t\treturn new ResponseEntity<>(formularioService.create(formulario), HttpStatus.CREATED);\r\n\t}", "private void registrar() {\n String nombre = txtNombre.getText();\n if (!nombre.trim().isEmpty()) {\n Alumno a = new Alumno();\n \n // cont++ , ++cont\n// contIds++;\n a.setNombre(nombre);\n a.setId(++contIds);\n \n listaAlumnos.add(a);\n\n lblCantidad.setText(\"Cantidad de nombres: \" + listaAlumnos.size());\n\n txtNombre.setText(null);\n txtNombre.requestFocus();\n // Actualiza la interfaz gráfica de la tabla\n tblNombres.updateUI();\n \n// int cont = 1;\n// System.out.println(\"------------------\");\n// System.out.println(\"Listado de alumnos\");\n// System.out.println(\"------------------\");\n// for (String nom : listaNombres) {\n// System.out.println(cont+\") \"+nom);\n// cont++;\n// }\n// System.out.println(\"------------------\");\n }\n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public CrearGrupos() throws SQLException {\n initComponents();\n setTitle(\"Crear Grupos\");\n setSize(643, 450);\n setLocationRelativeTo(this);\n cargarModelo();\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "public CrearProductos() {\n initComponents();\n }", "public TelaRegistroVendas() {\n initComponents();\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "public FormularioPregunta() {\n initComponents();\n \n setLocationRelativeTo(this);\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public FormularioCliente() {\n initComponents();\n }", "public RegistroBean() {\r\n }", "@Secured(\"ROLE_ADMIN\")\n\t@PostMapping(value= \"/usuario\")\n public ResponseEntity<Profesional> createUsuario(@RequestBody Registro registro,BindingResult bindingResult){\n \tRole rol = roleService.findOne((long) 3);\n \tProfesional profesional = registro.getProfesional();\n try {\n \tprofesional.setEstado_profesional(estadoProfService.findOne((long) 1));// se le da el estado habilitado\n \tprofesionalService.save(profesional);\n \tregistro.getUsuario().setPassword(passwordEncoder.encode(registro.getUsuario().getPassword()));\n \tregistro.getUsuario().setEnable(true);\n \tusuarioService.save(registro.getUsuario());\n \t usuarioService.saveUsuario_Roles(registro.getUsuario().getId_Usuario(),rol.getId_Role() );\n }catch(DataAccessException e) {\n return new ResponseEntity<Profesional>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity<Profesional>(profesional,HttpStatus.CREATED);\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public final String create(final ModelMap model) {\n model.addAttribute(REGISTER, new Register());\n return \"create\";\n }", "public frm_tutor_subida_prueba() {\n }", "public FrmCrearFotoEmpresa() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jtfcodigo = new javax.swing.JTextField();\n jtfnrserie = new javax.swing.JTextField();\n jtfpreco = new javax.swing.JTextField();\n jtfdatavalidade = new javax.swing.JTextField();\n jtfsabor = new javax.swing.JTextField();\n btninserir = new javax.swing.JButton();\n btnalterar = new javax.swing.JButton();\n btnexcluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 3, 24)); // NOI18N\n jLabel1.setText(\"Registre\");\n\n jLabel2.setText(\"Código:\");\n\n jLabel3.setText(\"Número de série:\");\n\n jLabel5.setText(\"Preço:\");\n\n jLabel6.setText(\"Data de validade:\");\n\n jLabel7.setText(\"Sabor:\");\n\n btninserir.setText(\"Inserir\");\n btninserir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btninserirActionPerformed(evt);\n }\n });\n\n btnalterar.setText(\"Alterar\");\n btnalterar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnalterarActionPerformed(evt);\n }\n });\n\n btnexcluir.setText(\"Excluir\");\n btnexcluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnexcluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jtfcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jtfnrserie))\n .addComponent(jLabel4)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jtfpreco))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jtfdatavalidade))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jtfsabor)))\n .addGap(0, 63, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(168, 168, 168)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(btninserir)\n .addGap(69, 69, 69)\n .addComponent(btnalterar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnexcluir)\n .addGap(28, 28, 28))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jtfcodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jtfnrserie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jtfpreco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jtfdatavalidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jtfsabor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btninserir)\n .addComponent(btnalterar)\n .addComponent(btnexcluir))\n .addContainerGap())\n );\n\n pack();\n }", "public String registrarLibroPorFormulario(HttpServletRequest request)\r\n {\r\n StringBuilder salidaTabla=new StringBuilder();\r\n if(request==null)\r\n {\r\n return \"\";\r\n }\r\n if(conexion!=null)\r\n {\r\n try{\r\n //atributos\r\n String nombre,paterno,materno,nacionalidad,titulo;\r\n StringBuilder query=new StringBuilder();\r\n int registro,registro1,codigo_autor,edicion,nroEjemplar;\r\n //sacamos del request a los atributos para autor\r\n materno=request.getParameter(\"materno\");\r\n paterno=request.getParameter(\"paterno\");\r\n nombre=request.getParameter(\"nombre\");\r\n nacionalidad=request.getParameter(\"nacionalidad\");\r\n //sacamos del request los atributos para libro\r\n titulo=request.getParameter(\"titulo\");\r\n edicion=Integer.parseInt(request.getParameter(\"edicion\"));\r\n nroEjemplar=Integer.parseInt(request.getParameter(\"nroEjemplar\"));\r\n //consulta sql\r\n query.append(\" insert into autor(paterno,materno,nombre,nacionalidad) values( \");\r\n query.append(\"'\"+materno+\"',\"+\"'\"+paterno+\"',\"+\"'\"+nombre+\"',\"+\"'\"+nacionalidad+\"')\");\r\n insertLibro=conexion.prepareStatement(query.toString());\r\n registro=insertLibro.executeUpdate();\r\n if(registro==1)\r\n {\r\n codigo_autor=listarUltimoIdAutor();\r\n if(codigo_autor!=0)\r\n {\r\n registro1=registrarLibro1(codigo_autor,titulo,edicion,nroEjemplar);\r\n }\r\n }\r\n }catch(Exception e){\r\n salidaTabla.append(e);\r\n e.printStackTrace();\r\n System.out.println(\"ERROR\");\r\n }\r\n }\r\n return salidaTabla.toString();\r\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public FrmNuevoEmpleado() {\n initComponents();\n }", "public RegistrarCompra() {\n initComponents();\n tabelaFornecedor.setModel(modelFornecedor);\n\n }", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panel = new javax.swing.JPanel();\n labelNombre = new javax.swing.JLabel();\n labelDireccion = new javax.swing.JLabel();\n fieldNombre = new javax.swing.JTextField();\n fieldDireccion = new javax.swing.JTextField();\n fieldTelefono = new javax.swing.JTextField();\n labelTelefono = new javax.swing.JLabel();\n btnRegistro = new javax.swing.JButton();\n btnAtras = new javax.swing.JButton();\n labelRegistro = new javax.swing.JLabel();\n fieldUsuario = new javax.swing.JTextField();\n labelUsuario = new javax.swing.JLabel();\n labelNombre2 = new javax.swing.JLabel();\n fieldContrasena = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Registro\");\n setResizable(false);\n\n panel.setBackground(new java.awt.Color(255, 255, 255));\n\n labelNombre.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelNombre.setText(\"Nombre\");\n\n labelDireccion.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelDireccion.setText(\"Dirección\");\n\n fieldNombre.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n fieldDireccion.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n fieldTelefono.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n labelTelefono.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelTelefono.setText(\"Teléfono\");\n\n btnRegistro.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 12)); // NOI18N\n btnRegistro.setText(\"Registrarse\");\n btnRegistro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegistroActionPerformed(evt);\n }\n });\n\n btnAtras.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 12)); // NOI18N\n btnAtras.setText(\"Atras\");\n btnAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAtrasActionPerformed(evt);\n }\n });\n\n labelRegistro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/iconos/registro.png\"))); // NOI18N\n\n fieldUsuario.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n labelUsuario.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelUsuario.setText(\"Usuario\");\n\n labelNombre2.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 1, 14)); // NOI18N\n labelNombre2.setText(\"Contraseña\");\n\n fieldContrasena.setFont(new java.awt.Font(\"Microsoft YaHei Light\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(btnAtras))\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(panelLayout.createSequentialGroup()\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(labelDireccion)\n .addComponent(labelNombre)\n .addComponent(labelTelefono))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(panelLayout.createSequentialGroup()\n .addComponent(labelUsuario)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(fieldUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(btnRegistro)))\n .addGroup(panelLayout.createSequentialGroup()\n .addGap(126, 126, 126)\n .addComponent(labelRegistro, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelNombre2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(fieldContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelRegistro)\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelNombre)\n .addComponent(fieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelUsuario)\n .addComponent(fieldUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelNombre2)\n .addComponent(fieldContrasena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelDireccion)\n .addComponent(fieldDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fieldTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelTelefono))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)\n .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnRegistro)\n .addComponent(btnAtras))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "public Formulario() {\n initComponents();\n }", "FORM createFORM();", "@RequestMapping(value = \"/registrarVereda\", method = RequestMethod.POST)\n\tpublic String registrarVereda(@Valid @RequestBody Vereda p) {\n\t\tveredaRepository.save(p);\t\t\n\t\treturn \"Guardado\";\n\t}", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "OperacionColeccion createOperacionColeccion();", "public RegistroSecretario() {\n this.setContentPane(fondo);\n initComponents();\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public TelaCadastrarProduto() {\n initComponents();\n entidade = new Produto();\n setRepositorio(RepositorioBuilder.getProdutoRepositorio());\n grupo.add(jRadioButton1);\n grupo.add(jRadioButton2);\n }", "public RegistrarPaciente() {\n initComponents();\n }", "Compuesta createCompuesta();", "public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "@Override\n\tpublic Oglas createNewOglas(NewOglasForm oglasForm) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tOglas oglas = new Oglas();\n\t\tSystem.out.println(oglas.getId());\n\t\toglas.setNaziv(oglasForm.getNaziv());\n\t\toglas.setOpis(oglasForm.getOpis());\n\t\ttry {\n\t\t\toglas.setDatum(formatter.parse(oglasForm.getDatum()));\n\t\t\tSystem.out.println(oglas.getDatum());\n System.out.println(formatter.format(oglas.getDatum()));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn repository.save(oglas);\n\t}", "public Registrar_Producto() {\n this.setContentPane(fondo);\n initComponents();\n llenaArr();\n llenaCB();\n soloLetras(rp_tx_nombre);\n soloNumeros(rp_tx_cantidad);\n soloNumeros(rp_tx_precio);\n soloLetras(rp_tx_descripcion);\n }", "public void crear(Tarea t) {\n t.saveIt();\n }", "public void registrarUsuario(String cedula, String nombre, String apellido, String correo, String contrasena) {\n\n usuario = new Usuario(cedula, nombre, apellido, correo, contrasena);\n usuarioDAO.create(usuario);\n\n }", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }", "public RegistrarPagoCXC() {\n initComponents();\n HoraFecha ob2 = new HoraFecha();\n jdfecha.setDate(ob2.obtenerFechamascienanos());\n Buscar_cxc.restropagocxcCxpexitoso = false;\n Buscar_cxp.restropagocxpCxpexitoso = false;\n\n//// spinerDiasCredito.setValue(30);\n//// HoraFecha ob2 = new HoraFecha();\n//// fecha = ob2.obtenerFecha();\n//// jDateChooser1.setDate(fecha);\n//// \n//// jDateChooser1.setDate(sumarRestarDiasFecha(fecha, Integer.valueOf(spinerDiasCredito.getValue().toString())));\n//// txt_entrada.grabFocus(); \n//// txt_entrada.selectAll();\n//// \n ////formas de pago\n fp = OperacionesForms.FormasPagoCXC_seExceptualaformadePago_Credito(jComboBox1);\n\n//OperacionesForms.getAllComponents(this)\n// jComboBox1.setSelectedItem(Principal.formadepagopredeterminada);\n /// HoraFecha.fecha(fecha)\n }", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public void crearInsertCliente() {\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\n\t\tJPanel p0 = new JPanel();\n\t\tp1 = new JPanel();\n\t\tp2 = new JPanel();\n\t\t\t\t\n\t\t// Grid Layout # rows, # columns\n\t\tp0.setLayout(new GridLayout(8,1));\n\t\tp1.setLayout(new GridLayout(8,2));\n\t\tp2.setLayout(new GridLayout(1,2));\n\t\t\n\t\t/*\n\t\t * Creating Textfields, adding them to list of \n\t\t * textfields textos to be able to get them in \n\t\t * the Controller + adding textfields to panel\n\t\t */\n\t\tfor (int i=0; i<8; i++) {\n\t\t\ttf = new JTextField();\n textos.add(tf);\n\t\t\tp1.add(tf);\n\t\t}\n\t\t\n\t\t// Creating Labels + Buttons\n\n\t\tJLabel labelRUT = new JLabel(\"RUT : \");\t\t\n\t\tJLabel labelNombre = new JLabel(\"Nombre : \");\n\t\tJLabel labelOcup = new JLabel(\"Ocupacion : \");\n\t\tJLabel labelCorreo = new JLabel(\"Correo : \");\n\t\tJLabel labelTel = new JLabel(\"Telefono : \");\n\t\tJLabel labelNbUsuario = new JLabel(\"Nombre de Usuario : \");\n\t\tJLabel labelContr = new JLabel(\"Contraseña : \");\n\t\tJLabel labelMoros = new JLabel(\"Morosidad (false/ true) : \");\n\t\t\n\t\tJButton buttonRegresar = new JButton(\"Regresar\");\n\t\tbotones.add(buttonRegresar);\n buttonRegresar.setPreferredSize(new Dimension(110,110));\n\n\t\tJButton buttonContinuar = new JButton(\"Continuar\");\n\t\tbotones.add(buttonContinuar);\n\t\tbuttonContinuar.setPreferredSize(new Dimension(110,110));\n\t\t\n\t\t// Adding components to Panel\n\t\t// TODO : REFACTOR with for loop?!\n\t\t\n\t\tp0.add(labelRUT);\n\t\tp0.add(labelNombre);\n\t\tp0.add(labelOcup);\n\t\tp0.add(labelCorreo);\n\t\tp0.add(labelTel);\n\t\tp0.add(labelNbUsuario);\n\t\tp0.add(labelContr);\n\t\tp0.add(labelMoros);\n\t\t\n\t\tp2.add(buttonRegresar);\n\t\tp2.add(buttonContinuar);\n\t\t\n\t\t// Add panels to general Layouts\n\t\tadd(p0, BorderLayout.WEST);\n\t\tadd(p1, BorderLayout.CENTER);\n\t add(p2, BorderLayout.SOUTH);\n\t}", "public void registerUser(RegisterForm form) throws DAOException;", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "@RequestMapping(\"enviar\")\n\tpublic String abrirForm() {\n\t\treturn \"contato/form\";\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void AlterarRegistro(){\n \n\t\tthis.localidadeRepository.AlterarRegistro(this.localidadeModel);\t\n \n\t\tUteis.MensagemInfo(\"Registro alterado com sucesso\");\n\t\t\n\t\tthis.init();\n\t}", "private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}", "public ventanaCRUDEAlumos() {\n initComponents();\n \n this.setLocationRelativeTo(null);\n this.setTitle(\"Registrar Alumno\");\n }", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public frmOrdenacao() {\n initComponents();\n setResizable(false);\n ordenacaoControle = new OrdenacaoControle();\n }", "public Project_Create() {\n initComponents();\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "public GUI_Registrazione() {\r\n\t\tsetFont(new Font(\"Arial Black\", Font.BOLD, 12));\r\n\t\tsetTitle(\"Registrazione\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 300);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\t//Creazione lblNome\r\n\t\tJLabel lblNome = new JLabel(\"Nome\");\r\n\t\tlblNome.setBounds(10, 11, 63, 14);\r\n\t\tcontentPane.add(lblNome);\r\n\t\t\r\n\t\t//Creazione lblCognome\r\n\t\tJLabel lblCognome = new JLabel(\"Cognome\");\r\n\t\tlblCognome.setBounds(10, 36, 63, 14);\r\n\t\tcontentPane.add(lblCognome);\r\n\t\t\r\n\t\t//Creazione lblPassword\r\n\t\tJLabel lblPassword = new JLabel(\"Password\");\r\n\t\tlblPassword.setBounds(10, 61, 63, 14);\r\n\t\tcontentPane.add(lblPassword);\r\n\t\t\r\n\t\t//Creazione textfiel tfNome\r\n\t\ttfNome = new JTextField();\r\n\t\ttfNome.setBounds(83, 8, 86, 20);\r\n\t\tcontentPane.add(tfNome);\r\n\t\ttfNome.setColumns(10);\r\n\t\t//GESTIONE EVENTO RILASCIO DI UNA KEY\r\n\t\ttfNome.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\t//L'evento va a settare in automatico tutto il testo inserito dall'utente come minuscolo\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\r\n\t\t\t\tint pos = tfNome.getCaretPosition();\r\n\t\t tfNome.setText(tfNome.getText().toLowerCase());\r\n\t\t tfNome.setCaretPosition(pos);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//Creazione textfiel tfNome\r\n\t\ttfCognome = new JTextField();\r\n\t\ttfCognome.setBounds(83, 33, 86, 20);\r\n\t\tcontentPane.add(tfCognome);\r\n\t\ttfCognome.setColumns(10);\r\n\t\t//GESTIONE EVENTO RILASCIO DI UNA KEY\r\n\t\ttfCognome.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\t//L'evento va a settare in automatico tutto il testo inserito dall'utente come minuscolo\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\r\n\t\t\t\tint pos = tfCognome.getCaretPosition();\r\n\t\t\t\ttfCognome.setText(tfCognome.getText().toLowerCase());\r\n\t\t\t\ttfCognome.setCaretPosition(pos);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//Creazione btnConferma \r\n\t\tJButton btnConferma = new JButton(\"Conferma\");\r\n\t\tbtnConferma.setBounds(175, 227, 105, 23);\r\n\t\tcontentPane.add(btnConferma);\r\n\t\t//Gestione evento click\r\n\t\tbtnConferma.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\t/*\r\n\t\t\t * si crea l'eventuale directory \"C:\\\\EmotionalMapsFile\\\\Utenti\\\\\"\r\n\t\t\t * tramite i dati inseriti nelle apposite textfield si va a creare il file utente con salvati i dati ad esso relativi\r\n\t\t\t */\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tu.Nome = tfNome.getText();\r\n\t\t\t\tu.Cognome = tfCognome.getText();\r\n\t\t\t\tu.ID = u.setID(u.Nome, u.Cognome );\r\n\t\t\t\tu.Password = tfPassword.getText();\r\n\t\t\t\tString pathfile = path+u.ID+\".txt\";\r\n\t\t\t\tFile file = new File(pathfile);\r\n\t\t\t\tfile = new File(pathfile);\t\r\n\t\t\t\t//richiamo i metodi per creazione, scrittura e salvataggio file\r\n\t\t\t\tr.newDir(p);\r\n\t\t\t\tr.newDir(path);\r\n\t\t\t\tr.wrFile(pathfile, file, u, r);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\t//Creazione textfiel tfPassowrd\r\n\t\ttfPassword = new JTextField();\r\n\t\ttfPassword.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\r\n\t\t\t\tint pos = tfPassword.getCaretPosition();\r\n\t\t\t\ttfPassword.setText(tfPassword.getText().toLowerCase());\r\n\t\t\t\ttfPassword.setCaretPosition(pos);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfPassword.setBounds(83, 58, 86, 20);\r\n\t\tcontentPane.add(tfPassword);\r\n\t\ttfPassword.setColumns(10);\r\n\t\t\r\n\t\t//Creazione btnBack\r\n\t\tJButton btnBack = new JButton(\"Back\");\r\n\t\tbtnBack.setBounds(335, 227, 89, 23);\r\n\t\tcontentPane.add(btnBack);\r\n\t\t//gestione evento click\r\n\t\tbtnBack.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\t/*\r\n\t\t\t * si cancella il contenuto delle textfield\r\n\t\t\t * si nasconde il frame GUI_Registrazione e si mostra il main EmotionalMaps\r\n\t\t\t */\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\tu.cleanBox(tfNome, tfCognome, tfPassword);\r\n\t\t\tm.FrameBack();\r\n\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "public Crear() {\n initComponents();\n \n \n this.getContentPane().setBackground(Color.WHITE);\n txtaPR.setEnabled(false); \n txtFNocmbre.requestFocus();\n \n \n }" ]
[ "0.6830447", "0.67786276", "0.6774693", "0.6774693", "0.67637146", "0.65852356", "0.65582603", "0.6527328", "0.6402837", "0.63039005", "0.6301787", "0.6274829", "0.6259463", "0.6252227", "0.6241852", "0.6235144", "0.62116456", "0.6204378", "0.6199028", "0.6191253", "0.6152564", "0.61508125", "0.61209434", "0.61038214", "0.6096408", "0.607741", "0.60689116", "0.60424924", "0.60391337", "0.60367155", "0.6024345", "0.6024224", "0.6013535", "0.6008533", "0.6000037", "0.59904903", "0.59756076", "0.5971339", "0.5968875", "0.5968818", "0.5966919", "0.59668165", "0.5966256", "0.59639186", "0.5962291", "0.59586436", "0.5931355", "0.5931221", "0.59302294", "0.5925217", "0.59226364", "0.59019595", "0.5895024", "0.58918583", "0.58913213", "0.58889216", "0.58818287", "0.58754444", "0.5869644", "0.58674556", "0.58645296", "0.58640903", "0.5863371", "0.5856565", "0.5855414", "0.58364695", "0.5830284", "0.5817235", "0.5815171", "0.5814887", "0.58011985", "0.57883215", "0.5776247", "0.5774461", "0.5774359", "0.5772067", "0.5763618", "0.5763618", "0.5763618", "0.5762554", "0.57534635", "0.57501245", "0.57488453", "0.5744684", "0.573712", "0.57242465", "0.5723397", "0.5723024", "0.57224745", "0.5717497", "0.57165384", "0.5705531", "0.5701044", "0.5700741", "0.56957495", "0.5695262", "0.56937915", "0.5691609", "0.5686894", "0.56828916", "0.5678837" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); Inicio = new com.toedter.calendar.JDateChooser(); Final = new com.toedter.calendar.JDateChooser(); Inicio2 = new javax.swing.JLabel(); Final2 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); Lote = new javax.swing.JTable(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(17, 111, 172)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButton2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoso/icons8-multiedición-50.png"))); // NOI18N jButton2.setText("Generar reporte"); jButton2.setContentAreaFilled(false); jButton2.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoso/icons8-multiedición-filled-50.png"))); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel1.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 20, -1, -1)); jPanel1.add(Inicio, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, 139, -1)); jPanel1.add(Final, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 40, 140, -1)); Inicio2.setForeground(new java.awt.Color(255, 255, 255)); Inicio2.setText("Inicio"); jPanel1.add(Inicio2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, -1, -1)); Final2.setForeground(new java.awt.Color(255, 255, 255)); Final2.setText("Final"); jPanel1.add(Final2, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 40, -1, -1)); Lote.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); Lote.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { LoteMouseClicked(evt); } }); jScrollPane1.setViewportView(Lote); jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 1270, 420)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1291, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
Metodo get del atributo String inicio
public String getInicio() { return inicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStringAttribute();", "java.lang.String getAttribute();", "String getAttribute();", "public String getStr(String attr) {\n return (String) super.get(attr);\n }", "String getAttributeStringValue(Object attr);", "protected String getAttributeStr(String attr)\n {\n Object res = getAttributes().get(attr);\n return (res != null) ? res.toString() : null;\n }", "private String getStringAttr(String attrName)\n {\n return String.valueOf(getAttributes().get(attrName));\n }", "private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}", "String getEtiqueta();", "public String getMetodoObtemSqlite(AtributoEntidade atributo) {\n\t\treturn getMetodoObtemSqlite(atributo.getTipo());\n\t}", "String getField();", "java.lang.String getField1048();", "java.lang.String getField1212();", "String getAttributeName(Object attr);", "java.lang.String getField1582();", "java.lang.String getField1078();", "java.lang.String getField1935();", "public String getIdtipobulto()\n {\n return (String)getAttributeInternal(IDTIPOBULTO);\n }", "Attribute getAttribute();", "java.lang.String getField1848();", "java.lang.String getField1818();", "java.lang.String getField1588();", "java.lang.String getField1782();", "java.lang.String getField1719();", "java.lang.String getField1721();", "java.lang.String getField1919();", "java.lang.String getField1702();", "java.lang.String getField1182();", "java.lang.String getField1482();", "java.lang.String getField1822();", "java.lang.String getField1927();", "java.lang.String getField1788();", "java.lang.String getField1015();", "java.lang.String getField1888();", "java.lang.String getField1335();", "java.lang.String getField1619();", "java.lang.String getField1119();", "java.lang.String getField1419();", "java.lang.String getField1172();", "java.lang.String getField1979();", "java.lang.String getField1406();", "java.lang.String getField1519();", "java.lang.String getField1922();", "java.lang.String getField1581();", "String attributeToGetter(String name);", "java.lang.String getField1921();", "java.lang.String getField1819();", "java.lang.String getField1969();", "java.lang.String getField1031();", "java.lang.String getField1579();", "java.lang.String getField1882();", "java.lang.String getField1821();", "java.lang.String getField1835();", "java.lang.String getField1337();", "java.lang.String getField1589();", "java.lang.String getField1646();", "java.lang.String getField1188();", "java.lang.String getField1682();", "java.lang.String getField1421();", "java.lang.String getField1954();", "java.lang.String getField1944();", "java.lang.String getField1527();", "java.lang.String getField1938();", "java.lang.String getField1972();", "java.lang.String getField1621();", "java.lang.String getField1712();", "java.lang.String getField1955();", "java.lang.String getField1881();", "java.lang.String getField1977();", "java.lang.String getField1711();", "java.lang.String getField1879();", "java.lang.String getField1941();", "java.lang.String getField1877();", "@Override\n\tpublic String stringValue(final Attribute att) {\n\t\treturn null;\n\t}", "java.lang.String getField1528();", "java.lang.String getField1925();", "java.lang.String getField1179();", "java.lang.String getField1869();", "java.lang.String getField1779();", "public String getattribut() \n\t{\n\t\treturn attribut;\n\t}", "java.lang.String getField1382();", "java.lang.String getField1688();", "java.lang.String getField1928();", "java.lang.String getField1282();", "java.lang.String getField1827();", "java.lang.String getField1135();", "java.lang.String getField1911();", "java.lang.String getField1334();", "java.lang.String getField1940();", "java.lang.String getField1964();", "java.lang.String getField1082();", "java.lang.String getField1722();", "java.lang.String getField1885();", "java.lang.String getField1917();", "java.lang.String getField1781();", "java.lang.String getField1307();", "java.lang.String getField1339();", "java.lang.String getField1915();", "private String loadAttributeName() {\n return parseMapField().getKey();\n }", "java.lang.String getField1681();", "java.lang.String getField1488();" ]
[ "0.75380224", "0.68781006", "0.68776184", "0.67089593", "0.66655034", "0.6527107", "0.64408386", "0.62763995", "0.6257846", "0.62442946", "0.61953247", "0.6138739", "0.6059529", "0.6048679", "0.6035661", "0.60283715", "0.6026608", "0.6019241", "0.6018381", "0.6015422", "0.6011271", "0.6003896", "0.6002309", "0.6001486", "0.6000079", "0.59987515", "0.59982663", "0.5996135", "0.5992479", "0.59923685", "0.59907556", "0.59901434", "0.5985537", "0.5985115", "0.59821427", "0.59813595", "0.59775376", "0.5976023", "0.5975714", "0.59693485", "0.5969198", "0.59691954", "0.59655064", "0.59653735", "0.5962312", "0.59601116", "0.5959034", "0.59559816", "0.5955546", "0.5955377", "0.5955112", "0.59550303", "0.5954093", "0.59539956", "0.5953031", "0.59512013", "0.5950543", "0.5950299", "0.594891", "0.5948601", "0.59473604", "0.5947047", "0.5941688", "0.59398574", "0.5939651", "0.59391487", "0.59386986", "0.5938116", "0.59381014", "0.5936088", "0.59350824", "0.5934378", "0.593222", "0.5931697", "0.59316915", "0.5931246", "0.5931103", "0.5930612", "0.5928769", "0.59285516", "0.59282255", "0.5926708", "0.5926079", "0.5924671", "0.59228355", "0.5922771", "0.59218806", "0.5921685", "0.59208286", "0.59204155", "0.5920036", "0.59179205", "0.5916546", "0.591577", "0.5915329", "0.5914817", "0.5913833", "0.591204", "0.59119034", "0.5911891", "0.59116316" ]
0.0
-1
Metodo set del atributo String inicio
public void setInicio(String inicio) { this.inicio = inicio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setString(String attributeValue);", "public void setEtiqueta(String etiqueta)\n/* 32: */ {\n/* 33:48 */ this.etiqueta = etiqueta;\n/* 34: */ }", "void setRecensione(String recensione);", "public abstract void setAcma_cierre(java.lang.String newAcma_cierre);", "public void setNom(String p_onom);", "@Override\n\tpublic void setAttribute(String arg0, Object arg1) {\n\n\t}", "@Override\n\tpublic void setValue(final Attribute att, final String value) {\n\n\t}", "public abstract void setNombre(java.lang.String newNombre);", "void setTitolo(String titolo);", "public abstract void setString(String paramString1, String paramString2) throws InvalidDLNAProtocolAttributeException;", "public abstract void setAcma_valor(java.lang.String newAcma_valor);", "public String getStringAttribute();", "public abstract void setApellido(java.lang.String newApellido);", "public void set(String s);", "@Override\n\t\tpublic void setAttribute(String name, Object o) {\n\t\t\t\n\t\t}", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "void setNome(String nome);", "public void setAttrib(String name, String value);", "public abstract void setLibelle(String unLibelle);", "void setCognome(String cognome);", "public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }", "void set(String text);", "String setValue();", "@Override\n\t\tpublic void setAttribute(String name, Object value) {\n\t\t\t\n\t\t}", "String attributeToSetter(String name);", "public void setNombre(String nombre) {this.nombre = nombre;}", "public void setProposition(String string);", "public void setMoTa(String moTa);", "public void setString(String name, String value)\n/* */ {\n/* 1119 */ XMLAttribute attr = findAttribute(name);\n/* 1120 */ if (attr == null) {\n/* 1121 */ attr = new XMLAttribute(name, name, null, value, \"CDATA\");\n/* 1122 */ this.attributes.addElement(attr);\n/* */ } else {\n/* 1124 */ attr.setValue(value);\n/* */ }\n/* */ }", "public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }", "public void setAttribute_value(String string) {\n this.attribute_value = string;\n }", "@Override\n\tpublic void setAttribute(String name, Object o) {\n\t\t\n\t}", "public void setS(String s);", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "@Override\n\tpublic void setValue(final int attIndex, final String value) {\n\n\t}", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public void setDni(String dni);", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }", "public void setValor(java.lang.String valor);", "@Override\n\t\tprotected void setAttributeValue(String value) {\n\t\t}", "void setName(String s);", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public void changeAttrName() {\r\n }", "public void setTipo(String x){\r\n tipo = x;\r\n }", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void setRua(String rua) {this.rua = rua;}", "void setAttribute(String name, Object value);", "void setAttribute(String name, Object value);", "public void setName(java.lang.String value);", "public void setName(java.lang.String value);", "void setEditore(String editore);", "public void setNguoiThamDu(String nguoiThamDu);", "private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }", "public void setNombre(String nombre)\r\n/* 118: */ {\r\n/* 119:214 */ this.nombre = nombre;\r\n/* 120: */ }", "protected abstract void setName(String string);", "void setName(String strName);", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "void setSurname(String surname);", "void setValue(java.lang.String value);", "public abstract void setFecha_termino(java.lang.String newFecha_termino);", "public void setAttr(String attr) {\n this.attr = attr == null ? null : attr.trim();\n }", "public void setName(String n){ name=n; }", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "public void setAttribute(String name, Object value);", "public void setTelefono(String telefono);", "private void setARo(final String a) {\r\n this.aRo = a;\r\n }", "@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}", "public void generarCodigo(){\r\n this.setCodigo(\"c\"+this.getNombre().substring(0,3));\r\n }", "void setProperty(String attribute, String value);", "public abstract void setTica_id(java.lang.String newTica_id);", "void setValue(String value);", "void setValue(String value);", "@Test\n public void test_TCM__OrgJdomAttribute_setValue_String() {\n \tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\n \tassertTrue(\"incorrect value before set\", attribute.getValue().equals(\"value\"));\n\n attribute.setValue(\"foo\");\n \tassertTrue(\"incorrect value after set\", attribute.getValue().equals(\"foo\"));\n\n \t//test that the verifier is called\n \ttry {\n attribute.setValue(null);\n \t\tfail(\"Attribute setValue didn't catch null string\");\n \t} catch (final NullPointerException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n \t}\n\n \ttry {\n \t\tfinal char c= 0x11;\n \t\tfinal StringBuilder buffer = new StringBuilder(\"hhhh\");\n buffer.setCharAt(2, c);\n \t\tattribute.setValue(buffer.toString());\n \t\tfail(\"Attribute setValue didn't catch invalid comment string\");\n \t} catch (final IllegalDataException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n \t}\n\n }", "public void setEstablecimiento(String establecimiento)\r\n/* 119: */ {\r\n/* 120:198 */ this.establecimiento = establecimiento;\r\n/* 121: */ }", "public abstract void setNovedad(java.lang.String newNovedad);", "public void WriteAttributeString(String nombreAtributo, String valorAtributo) throws IOException {\r\n\tbw.write(\" \" + nombreAtributo + \"=\\\"\" + Escapar(valorAtributo) + \"\\\"\");\r\n }", "public void setName(String string) {\n\t\t\n\t}", "@Override\r\n public void setObject(String object) {\n }", "public void setCodigo_agencia(java.lang.String newCodigo_agencia);", "protected void setAttribs(String str, int start, int end) {\n clearAttributes();\n //FIXME increasing below by one(default) might be tricky, need more analysis\n // after lucene upgrade to 3.5 below is most probably not even needed \n this.posIncrAtt.setPositionIncrement(1);\n this.termAtt.setEmpty();\n this.termAtt.append(str);\n this.offsetAtt.setOffset(start, end);\n }", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setNombre (String val) {\n this.nombre = val;\n }", "public void setTipo(String tipo);", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public void set(String value){\n switch (field){\n case 0:\n nomComplet = value;\n break;\n case 1:\n rv1 = value;\n break;\n case 2:\n dateDispo = LocalDate.parse(value,formatter);\n break;\n case 3:\n competencePrincipale = value;\n break;\n case 4:\n exp = Double.parseDouble(value);\n break;\n case 5:\n trancheExp = value;\n break;\n case 6:\n ecole = value;\n break;\n case 7:\n classeEcole = value;\n break;\n case 8:\n fonctions = value;\n break;\n case 9:\n dateRV1 = LocalDate.parse(value,formatter);\n case 10:\n rv2 = value;\n break;\n case 11:\n metiers = value;\n break;\n case 12:\n originePiste = value;\n break;\n }\n field++;\n }", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n String nombre = \"T-3\";\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setNombre(nombre);\n \n }", "void setValue(String s) throws YangException;", "public Binding setName( String theString) {\n\t\tmyName = new StringDt(theString); \n\t\treturn this; \n\t}", "@Override\n\tpublic void setAttribute(String arg0, Object arg1, int arg2) {\n\n\t}", "public void setAttribute(java.lang.String attrName, java.lang.String value) {\n\t\ttry {\n\t\t\tGovSteamFV4_primitive_builder attrEnum = GovSteamFV4_primitive_builder.valueOf(attrName);\n\t\t\tupdateAttributeInArray(attrEnum, attrEnum.construct(value));\n\t\t\tSystem.out.println(\"Updated GovSteamFV4, setting \" + attrName + \" to: \" + value);\n\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t{\n\t\t\tsuper.setAttribute(attrName, value);\n\t\t}\n\t}", "public void setLongitud(String longitud);", "public void setName(String name){this.name=name;}", "@Override\n public void setInfo(String s) {\n this.info = s;\n\n }", "public void setNameString(String s) {\n nameString = s;\r\n }", "public void setAttribute(java.lang.String attrName, java.lang.String value) {\n\t\ttry {\n\t\t\tLoadStatic_primitive_builder attrEnum = LoadStatic_primitive_builder.valueOf(attrName);\n\t\t\tupdateAttributeInArray(attrEnum, attrEnum.construct(value));\n\t\t\tSystem.out.println(\"Updated LoadStatic, setting \" + attrName + \" to: \" + value);\n\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t{\n\t\t\tsuper.setAttribute(attrName, value);\n\t\t}\n\t}" ]
[ "0.72803545", "0.6803346", "0.6632359", "0.6617895", "0.64959466", "0.644621", "0.64359593", "0.6379316", "0.63652855", "0.6334112", "0.63339186", "0.63213205", "0.62963945", "0.6281689", "0.62726617", "0.62645215", "0.6258485", "0.62456626", "0.62203074", "0.6216046", "0.61950433", "0.6188776", "0.6178507", "0.6148305", "0.6127507", "0.61237776", "0.6123123", "0.61045957", "0.6101016", "0.60956204", "0.60879034", "0.60862947", "0.60767335", "0.6073427", "0.6058673", "0.6051563", "0.60502803", "0.6046315", "0.6030983", "0.60165936", "0.5999712", "0.5998181", "0.59706557", "0.59641814", "0.5950666", "0.5941174", "0.5931554", "0.5917331", "0.5917331", "0.5909628", "0.5909628", "0.5903128", "0.58996415", "0.5890834", "0.5884225", "0.5879947", "0.5878826", "0.58783466", "0.58783466", "0.58702874", "0.58645624", "0.58645314", "0.5847722", "0.5847468", "0.584597", "0.5839742", "0.5838757", "0.5830786", "0.5823588", "0.5818815", "0.5818574", "0.581193", "0.5810188", "0.5810188", "0.5808228", "0.5804499", "0.58020574", "0.58004814", "0.57949936", "0.57890046", "0.57782584", "0.5766914", "0.5765017", "0.5765017", "0.5765017", "0.5765017", "0.57647824", "0.5764612", "0.5757118", "0.57568985", "0.5753397", "0.5742467", "0.57303554", "0.57297933", "0.5727193", "0.57267773", "0.57234365", "0.5712351", "0.5711521", "0.5710207", "0.5706275" ]
0.0
-1
Metodo get del atributo String fin
public String getFin() { return fin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStringAttribute();", "String getAttribute();", "java.lang.String getAttribute();", "public String getStr(String attr) {\n return (String) super.get(attr);\n }", "String getEtiqueta();", "String getAttributeStringValue(Object attr);", "public String getMetodoObtemSqlite(AtributoEntidade atributo) {\n\t\treturn getMetodoObtemSqlite(atributo.getTipo());\n\t}", "java.lang.String getField1048();", "String getField();", "protected String getAttributeStr(String attr)\n {\n Object res = getAttributes().get(attr);\n return (res != null) ? res.toString() : null;\n }", "java.lang.String getField1721();", "java.lang.String getField1078();", "private String getStringAttr(String attrName)\n {\n return String.valueOf(getAttributes().get(attrName));\n }", "java.lang.String getField1848();", "java.lang.String getField1935();", "java.lang.String getField1822();", "java.lang.String getField1821();", "java.lang.String getField1782();", "java.lang.String getField1919();", "java.lang.String getField1702();", "java.lang.String getField1582();", "java.lang.String getField1719();", "java.lang.String getField1927();", "java.lang.String getField1482();", "java.lang.String getField1818();", "private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}", "java.lang.String getField1182();", "java.lang.String getField1015();", "java.lang.String getField1835();", "java.lang.String getField1921();", "java.lang.String getField1619();", "java.lang.String getField1922();", "java.lang.String getField1621();", "java.lang.String getField1888();", "java.lang.String getField1419();", "java.lang.String getField1421();", "java.lang.String getField1172();", "java.lang.String getField1788();", "java.lang.String getField1119();", "java.lang.String getField1882();", "java.lang.String getField1406();", "java.lang.String getField1881();", "java.lang.String getField1972();", "java.lang.String getField1938();", "java.lang.String getField1682();", "java.lang.String getField1519();", "java.lang.String getField1581();", "java.lang.String getField1827();", "java.lang.String getField1969();", "java.lang.String getField1819();", "java.lang.String getField1885();", "java.lang.String getField1869();", "java.lang.String getField1877();", "java.lang.String getField1979();", "java.lang.String getField1031();", "java.lang.String getField1925();", "java.lang.String getField1335();", "java.lang.String getField1928();", "java.lang.String getField1940();", "java.lang.String getField1382();", "java.lang.String getField1711();", "java.lang.String getField1722();", "java.lang.String getField1588();", "java.lang.String getField1879();", "java.lang.String getField1944();", "java.lang.String getField1282();", "java.lang.String getField1941();", "java.lang.String getField1811();", "java.lang.String getField1955();", "java.lang.String getField1527();", "java.lang.String getField1307();", "java.lang.String getField1911();", "java.lang.String getField1681();", "java.lang.String getField1903();", "java.lang.String getField1641();", "java.lang.String getField1781();", "java.lang.String getField1646();", "java.lang.String getField1622();", "java.lang.String getField1008();", "java.lang.String getField1872();", "java.lang.String getField1977();", "java.lang.String getField1528();", "java.lang.String getField1741();", "java.lang.String getField1589();", "java.lang.String getField1917();", "java.lang.String getField1954();", "java.lang.String getField1817();", "java.lang.String getField1779();", "java.lang.String getField1840();", "java.lang.String getField1337();", "java.lang.String getField1082();", "java.lang.String getField1916();", "java.lang.String getField1828();", "java.lang.String getField1579();", "java.lang.String getField1841();", "java.lang.String getField1212();", "java.lang.String getField1118();", "java.lang.String getField1803();", "java.lang.String getField1820();", "java.lang.String getField1522();", "java.lang.String getField1481();" ]
[ "0.7376376", "0.6762311", "0.67499274", "0.64916146", "0.6473657", "0.6472973", "0.6407953", "0.63607424", "0.6328729", "0.6321794", "0.6264486", "0.6248851", "0.62487686", "0.62487257", "0.6246116", "0.62415177", "0.6239578", "0.62383235", "0.6234862", "0.6233162", "0.6232926", "0.62322134", "0.6230737", "0.6228214", "0.6226152", "0.62239504", "0.6219364", "0.6212938", "0.62124306", "0.6212406", "0.62120765", "0.62104076", "0.620677", "0.6197026", "0.61950684", "0.61941653", "0.61920726", "0.61916786", "0.6191124", "0.619066", "0.61871564", "0.61858976", "0.61858284", "0.61844504", "0.6183164", "0.61789006", "0.61784124", "0.61780804", "0.6177968", "0.6177356", "0.61758536", "0.6173887", "0.61734265", "0.61725366", "0.61723197", "0.6171853", "0.6171055", "0.6169703", "0.61691755", "0.61690307", "0.6168497", "0.6167832", "0.61668897", "0.6166267", "0.6165617", "0.61655784", "0.61622906", "0.6162119", "0.6161511", "0.6158879", "0.6158824", "0.61576676", "0.61561376", "0.6155355", "0.615516", "0.6154634", "0.61536956", "0.61535233", "0.6151675", "0.61497575", "0.6149684", "0.6149234", "0.61487275", "0.6147963", "0.6147423", "0.6146371", "0.61455995", "0.6144306", "0.6144206", "0.6142916", "0.61428356", "0.61425924", "0.6142356", "0.6142001", "0.6141245", "0.61411935", "0.61405194", "0.6139275", "0.6138747", "0.6138607", "0.6138523" ]
0.0
-1
Metodo set del atributo String inicio
public void setFin(String fin) { this.fin = fin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setString(String attributeValue);", "public void setEtiqueta(String etiqueta)\n/* 32: */ {\n/* 33:48 */ this.etiqueta = etiqueta;\n/* 34: */ }", "void setRecensione(String recensione);", "public abstract void setAcma_cierre(java.lang.String newAcma_cierre);", "public void setNom(String p_onom);", "@Override\n\tpublic void setAttribute(String arg0, Object arg1) {\n\n\t}", "@Override\n\tpublic void setValue(final Attribute att, final String value) {\n\n\t}", "public abstract void setNombre(java.lang.String newNombre);", "void setTitolo(String titolo);", "public abstract void setString(String paramString1, String paramString2) throws InvalidDLNAProtocolAttributeException;", "public abstract void setAcma_valor(java.lang.String newAcma_valor);", "public String getStringAttribute();", "public abstract void setApellido(java.lang.String newApellido);", "public void set(String s);", "@Override\n\t\tpublic void setAttribute(String name, Object o) {\n\t\t\t\n\t\t}", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "void setNome(String nome);", "public void setAttrib(String name, String value);", "public abstract void setLibelle(String unLibelle);", "void setCognome(String cognome);", "public void setAutorizacion(String autorizacion)\r\n/* 139: */ {\r\n/* 140:236 */ this.autorizacion = autorizacion;\r\n/* 141: */ }", "void set(String text);", "String setValue();", "@Override\n\t\tpublic void setAttribute(String name, Object value) {\n\t\t\t\n\t\t}", "String attributeToSetter(String name);", "public void setNombre(String nombre) {this.nombre = nombre;}", "public void setProposition(String string);", "public void setMoTa(String moTa);", "public void setString(String name, String value)\n/* */ {\n/* 1119 */ XMLAttribute attr = findAttribute(name);\n/* 1120 */ if (attr == null) {\n/* 1121 */ attr = new XMLAttribute(name, name, null, value, \"CDATA\");\n/* 1122 */ this.attributes.addElement(attr);\n/* */ } else {\n/* 1124 */ attr.setValue(value);\n/* */ }\n/* */ }", "public void setOrigen(java.lang.String param){\n \n this.localOrigen=param;\n \n\n }", "public void setAttribute_value(String string) {\n this.attribute_value = string;\n }", "@Override\n\tpublic void setAttribute(String name, Object o) {\n\t\t\n\t}", "public void setS(String s);", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "@Override\n\tpublic void setValue(final int attIndex, final String value) {\n\n\t}", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public void setDni(String dni);", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }", "public void setValor(java.lang.String valor);", "@Override\n\t\tprotected void setAttributeValue(String value) {\n\t\t}", "void setName(String s);", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public void changeAttrName() {\r\n }", "public void setTipo(String x){\r\n tipo = x;\r\n }", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void setRua(String rua) {this.rua = rua;}", "void setAttribute(String name, Object value);", "void setAttribute(String name, Object value);", "public void setName(java.lang.String value);", "public void setName(java.lang.String value);", "void setEditore(String editore);", "public void setNguoiThamDu(String nguoiThamDu);", "private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }", "public void setNombre(String nombre)\r\n/* 118: */ {\r\n/* 119:214 */ this.nombre = nombre;\r\n/* 120: */ }", "protected abstract void setName(String string);", "void setName(String strName);", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}", "void setSurname(String surname);", "void setValue(java.lang.String value);", "public abstract void setFecha_termino(java.lang.String newFecha_termino);", "public void setAttr(String attr) {\n this.attr = attr == null ? null : attr.trim();\n }", "public void setName(String n){ name=n; }", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "public void setAttribute(String name, Object value);", "public void setTelefono(String telefono);", "private void setARo(final String a) {\r\n this.aRo = a;\r\n }", "@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}", "public void generarCodigo(){\r\n this.setCodigo(\"c\"+this.getNombre().substring(0,3));\r\n }", "void setProperty(String attribute, String value);", "public abstract void setTica_id(java.lang.String newTica_id);", "void setValue(String value);", "void setValue(String value);", "@Test\n public void test_TCM__OrgJdomAttribute_setValue_String() {\n \tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\n \tassertTrue(\"incorrect value before set\", attribute.getValue().equals(\"value\"));\n\n attribute.setValue(\"foo\");\n \tassertTrue(\"incorrect value after set\", attribute.getValue().equals(\"foo\"));\n\n \t//test that the verifier is called\n \ttry {\n attribute.setValue(null);\n \t\tfail(\"Attribute setValue didn't catch null string\");\n \t} catch (final NullPointerException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n \t}\n\n \ttry {\n \t\tfinal char c= 0x11;\n \t\tfinal StringBuilder buffer = new StringBuilder(\"hhhh\");\n buffer.setCharAt(2, c);\n \t\tattribute.setValue(buffer.toString());\n \t\tfail(\"Attribute setValue didn't catch invalid comment string\");\n \t} catch (final IllegalDataException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n \t}\n\n }", "public void setEstablecimiento(String establecimiento)\r\n/* 119: */ {\r\n/* 120:198 */ this.establecimiento = establecimiento;\r\n/* 121: */ }", "public abstract void setNovedad(java.lang.String newNovedad);", "public void WriteAttributeString(String nombreAtributo, String valorAtributo) throws IOException {\r\n\tbw.write(\" \" + nombreAtributo + \"=\\\"\" + Escapar(valorAtributo) + \"\\\"\");\r\n }", "public void setName(String string) {\n\t\t\n\t}", "@Override\r\n public void setObject(String object) {\n }", "public void setCodigo_agencia(java.lang.String newCodigo_agencia);", "protected void setAttribs(String str, int start, int end) {\n clearAttributes();\n //FIXME increasing below by one(default) might be tricky, need more analysis\n // after lucene upgrade to 3.5 below is most probably not even needed \n this.posIncrAtt.setPositionIncrement(1);\n this.termAtt.setEmpty();\n this.termAtt.append(str);\n this.offsetAtt.setOffset(start, end);\n }", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setValue(String value);", "public void setNombre (String val) {\n this.nombre = val;\n }", "public void setTipo(String tipo);", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public void set(String value){\n switch (field){\n case 0:\n nomComplet = value;\n break;\n case 1:\n rv1 = value;\n break;\n case 2:\n dateDispo = LocalDate.parse(value,formatter);\n break;\n case 3:\n competencePrincipale = value;\n break;\n case 4:\n exp = Double.parseDouble(value);\n break;\n case 5:\n trancheExp = value;\n break;\n case 6:\n ecole = value;\n break;\n case 7:\n classeEcole = value;\n break;\n case 8:\n fonctions = value;\n break;\n case 9:\n dateRV1 = LocalDate.parse(value,formatter);\n case 10:\n rv2 = value;\n break;\n case 11:\n metiers = value;\n break;\n case 12:\n originePiste = value;\n break;\n }\n field++;\n }", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n String nombre = \"T-3\";\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setNombre(nombre);\n \n }", "void setValue(String s) throws YangException;", "public Binding setName( String theString) {\n\t\tmyName = new StringDt(theString); \n\t\treturn this; \n\t}", "@Override\n\tpublic void setAttribute(String arg0, Object arg1, int arg2) {\n\n\t}", "public void setAttribute(java.lang.String attrName, java.lang.String value) {\n\t\ttry {\n\t\t\tGovSteamFV4_primitive_builder attrEnum = GovSteamFV4_primitive_builder.valueOf(attrName);\n\t\t\tupdateAttributeInArray(attrEnum, attrEnum.construct(value));\n\t\t\tSystem.out.println(\"Updated GovSteamFV4, setting \" + attrName + \" to: \" + value);\n\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t{\n\t\t\tsuper.setAttribute(attrName, value);\n\t\t}\n\t}", "public void setLongitud(String longitud);", "public void setName(String name){this.name=name;}", "@Override\n public void setInfo(String s) {\n this.info = s;\n\n }", "public void setNameString(String s) {\n nameString = s;\r\n }", "public void setAttribute(java.lang.String attrName, java.lang.String value) {\n\t\ttry {\n\t\t\tLoadStatic_primitive_builder attrEnum = LoadStatic_primitive_builder.valueOf(attrName);\n\t\t\tupdateAttributeInArray(attrEnum, attrEnum.construct(value));\n\t\t\tSystem.out.println(\"Updated LoadStatic, setting \" + attrName + \" to: \" + value);\n\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t{\n\t\t\tsuper.setAttribute(attrName, value);\n\t\t}\n\t}" ]
[ "0.72803545", "0.6803346", "0.6632359", "0.6617895", "0.64959466", "0.644621", "0.64359593", "0.6379316", "0.63652855", "0.6334112", "0.63339186", "0.63213205", "0.62963945", "0.6281689", "0.62726617", "0.62645215", "0.6258485", "0.62456626", "0.62203074", "0.6216046", "0.61950433", "0.6188776", "0.6178507", "0.6148305", "0.6127507", "0.61237776", "0.6123123", "0.61045957", "0.6101016", "0.60956204", "0.60879034", "0.60862947", "0.60767335", "0.6073427", "0.6058673", "0.6051563", "0.60502803", "0.6046315", "0.6030983", "0.60165936", "0.5999712", "0.5998181", "0.59706557", "0.59641814", "0.5950666", "0.5941174", "0.5931554", "0.5917331", "0.5917331", "0.5909628", "0.5909628", "0.5903128", "0.58996415", "0.5890834", "0.5884225", "0.5879947", "0.5878826", "0.58783466", "0.58783466", "0.58702874", "0.58645624", "0.58645314", "0.5847722", "0.5847468", "0.584597", "0.5839742", "0.5838757", "0.5830786", "0.5823588", "0.5818815", "0.5818574", "0.581193", "0.5810188", "0.5810188", "0.5808228", "0.5804499", "0.58020574", "0.58004814", "0.57949936", "0.57890046", "0.57782584", "0.5766914", "0.5765017", "0.5765017", "0.5765017", "0.5765017", "0.57647824", "0.5764612", "0.5757118", "0.57568985", "0.5753397", "0.5742467", "0.57303554", "0.57297933", "0.5727193", "0.57267773", "0.57234365", "0.5712351", "0.5711521", "0.5710207", "0.5706275" ]
0.0
-1
/ Create an Intent that will start the MenuActivity.
@Override public void run() { Intent mainIntent = new Intent(StartSplash.this, SplashActivity.class); StartSplash.this.startActivity(mainIntent); StartSplash.this.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "void startNewActivity(Intent intent);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n menu.getItem(0).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem menuItem) {\n mAdapter.clearContacts();\n mAdapter.addContact(new Contact(\"Yusuf\", R.drawable.yusuf));\n mAdapter.addContact(new Contact(\"Sarah\", R.drawable.sarah));\n mAdapter.addContact(new Contact(\"Leon\", R.drawable.leon));\n mAdapter.addContact(new Contact(\"Taleb\", R.drawable.taleb));\n mAdapter.addContact(new Contact(\"Chris\", R.drawable.chris));\n mAdapter.addContact(new Contact(\"Lisa\", R.drawable.lisa));\n MediaPlayer player = MediaPlayer.create(getApplicationContext(),R.raw.ding_dong);\n player.start();\n return true;\n }\n });\n menu.getItem(1).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem menuItem) {\n Intent i = new Intent(getApplicationContext(), WebViewActivity.class);\n i.putExtra(\"url\",\"file:///android_asset/index.html\");\n getApplicationContext().startActivity(i);\n return true;\n }\n });\n\n return true;\n\n }", "private void startNewAcitivity(Intent intent, ActivityOptionsCompat options) {\n ActivityCompat.startActivity(this, intent, options.toBundle());\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \t// create a new Intent to launch the Logs Activity\n \tIntent viewLogs =\n \t\t\tnew Intent(Log_Data.this, Logs.class);\n \tstartActivity(viewLogs); // start the Logs Activity\n \treturn super.onOptionsItemSelected(item); // call supers's method\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n return true;\r\n }\r\n\r\n if (id == R.id.action_about) {\r\n ScreenAbout screenAbout = new ScreenAbout();\r\n Intent intent = new Intent(this, ScreenAbout.class);\r\n //intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n //intent.putExtra(ScreenAbout.class.getName(), ScreenAbout.class.getName());\r\n startActivity(intent);\r\n return true;\r\n }\r\n\r\n if (id == R.id.action_radar) {\r\n ScreenRadar screenRadar = new ScreenRadar();\r\n Intent intent = new Intent(this, ScreenRadar.class);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n intent.putExtra(ScreenRadar.class.getName(), ScreenRadar.class.getName());\r\n startActivity(intent);\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_launcher, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n int id = item.getItemId();\n Intent myIntent;\n\n //adding the clickable menu by switch\n switch(id){\n //home button\n case R.id.actionHome:\n myIntent = new Intent(this, MainActivity.class);\n startActivity(myIntent);\n return true;\n //add button\n case R.id.actionAdd:\n myIntent = new Intent(this, addPage.class);\n startActivity(myIntent);\n return true;\n\n //filter button \n case R.id.actionFilter:\n Toast.makeText(this, \"Filter\", Toast.LENGTH_SHORT).show();\n return true;\n\n //past planner button\n case R.id.actionPastPlan:\n\n myIntent = new Intent(this, pastPlanners.class);\n startActivity(myIntent);\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public void onClick(View v) {\n\n Intent intent;\n intent = new Intent(AppMenu.this, AssetDownload.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n final Intent i = new Intent(Resultat.this, MenuPrincipal.class);\n startActivity(i);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\tIntent i= new Intent(\"com.speed_alert.Password\");\r\n\t\tstartActivity(i);\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n switch (item.getItemId()) \n { \n case android.R.id.home:\n Intent intenthome = new Intent(ctx, AdminClubActivity.class);\n startActivity(intenthome); \n return true;\n \n case R.id.action_home:\n Intent intent = new Intent(ctx, MainActivity.class);\n startActivity(intent); \n return true;\n \n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tIntent i;\n\t\tswitch (id){\n\t\tcase 1:\n\t\t\ti=new Intent(this, CreateGroup.class);\n\t\t\tstartActivity(i);\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent i;\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.menu_add_feed:\n\t\t\ti = new Intent(this, CreateContent.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n//\t\tcase R.id.menu_dummy:\n//\t\t\ti = new Intent(this, Dummy.class);\n//\t\t\tstartActivity(i);\n//\t\t\tbreak;\n\t\tcase R.id.menu_circles:\n\t\t\ti = new Intent(this, UserCircles.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_users:\n\t\t\ti = new Intent(this, UserList.class);\n\t\t\ti.putExtra(\"url\", \"http://rasp.jatinhariani.com/final/random_users.php\");\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_logout:\n\t\t\ti = new Intent(this, Login.class);\n\t\t\tstartActivity(i);\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public void onClick(View v){\n Intent intent = new Intent(MainMenu.this, basketballMenu.class);\n startActivity(intent);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.start_screen, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu _menu) \n\t{\t\n\t\t// Hardcoded menu\n\t\t/*\n\t\t_menu.add(0, SECOND_ACTIVITY_MENU_ITEM, Menu.NONE, R.string.menuitem_second_activity);\n\t\t\n\t\tSubMenu submenu = _menu.addSubMenu(0, SUBMENU_ITEM, Menu.NONE, R.string.submenu_title);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item1);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item2);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item3);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item4);\n\t\t*/\n\t\t\n\t\t// Menu in XML file\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.menu_mainactivity, _menu);\n\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n // get the id of menu item selected\n switch (item.getItemId()){\n case R.id.action_home :\n // initialize and Intent for the MainActivity and start it\n intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_add_contact :\n // initialize and Intent for the MainActivity and start it\n intent = new Intent(this, AddContact.class);\n startActivity(intent);\n return true;\n case R.id.action_view_family :\n intent = new Intent(this, ViewGroup.class);\n intent.putExtra(\"_group\", \"Family\");\n startActivity(intent);\n return true;\n case R.id.action_view_friends :\n intent = new Intent(this, ViewGroup.class);\n intent.putExtra(\"_group\", \"Friends\");\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void openNewActivity(){\n Intent intent = new Intent(this, InventoryDisplay.class);\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View v)\n\t{\n\t\tswitch (v.getId())\n\t\t{\n\t\t\tcase R.id.menu_left_button:\n\t\t\tcase R.id.bottom_left_icon:\n\t\t\t{\n\t\t\t\tfinish();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_gps:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuGpsActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_setting_voice_mode:\n\t\t\t{\n\t\t\t\tUtil.setMode(AirServices.getInstance());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_setting_voice:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuSettingPttActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_upload_record:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuReportActivity.class);\n\t\t\t\tit.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_help:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuHelpActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_tv_notice:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuNoticeActivity.class);\n\t\t\t\tit.putExtra(\"url\", AccountController.getDmWebNoticeUrl());\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_about:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuAboutActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_tv_user_name_panel:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuAccountActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_video:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuSettingSessionVideoActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_lv_tool_channel:\n\t\t\t{\n\t\t\t\tIntent it = new Intent(this, MenuSettingChannelActivity.class);\n\t\t\t\tstartActivity(it);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.talk_setting_case:\n\t\t\t{\n\t\t\t\tif (Config.funcTask)\n\t\t\t\t{\n\t\t\t\t\tIntent it = new Intent(this, MenuTaskCaseListActivity.class);\n\t\t\t\t\tstartActivity(it);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_activity_main_search:\n Intent searchActivityIntent = new Intent(MainActivity.this, SearchActivity.class);\n this.startActivity(searchActivityIntent);\n return true;\n case R.id.menu_activity_main_notifications:\n Intent notificationsActivityIntent = new Intent(MainActivity.this, NotificationsActivity.class);\n this.startActivity(notificationsActivityIntent);\n return true;\n case R.id.menu_activity_main_help:\n Intent helpActivityIntent = new Intent(MainActivity.this, HelpActivity.class);\n this.startActivity(helpActivityIntent);\n return true;\n case R.id.menu_activity_main_about:\n Intent aboutActivityIntent = new Intent(MainActivity.this, AboutActivity.class);\n this.startActivity(aboutActivityIntent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void Menu()\n {\n visitorEditText = (EditText) findViewById(R.id.visitorEditText);\n message = \"Dear... \" + visitorEditText.getText().toString();\n\n //Declare intent to send message to new activity\n Intent intent = new Intent(this, Menu.class);\n intent.putExtra(EXTRA_TEXT, message);\n\n //Start new activity\n startActivity(intent);\n }", "public static Intent makeIntent(Context context) {\n return new Intent(context, AddEvent.class);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase 1:\r\n\t\t\tIntent intent_main = new Intent(getBaseContext(),\r\n\t\t\t\t\tMainActivity.class);\r\n\t\t\tstartActivity(intent_main);\r\n\t\t\treturn true;\r\n\t\tcase 2:\r\n\t\t\tIntent intent_settings = new Intent(getBaseContext(),\r\n\t\t\t\t\tLoginActivity.class);\r\n\t\t\tstartActivity(intent_settings);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \t switch (item.getItemId()) {\n \t case 0:{\n \t \t Intent viewIntent = new Intent(\"android.intent.action.VIEW\", \n\t\t\t\t\t\t Uri.parse(\"http://www.newconex.heliohost.org/contatos.php\"));\n\t\t\t\t startActivity(viewIntent);\t\t\t\n \t }case 1:{\n \t \t this.finish();\n \t }\n \t \n \t }\n \t return true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "public boolean onOptionsItemSelected(MenuItem item) {\n\r\n switch(item.getItemId()){\r\n\r\n case R.id.menu_BelAlarmnummer:\r\n //bel 112\r\n boolean isOk = true;\r\n Intent intent = new Intent();\r\n\r\n if(!deviceIsAPhone()){\r\n displayAlert();\r\n isOk = false;\r\n }\r\n if (isOk){\r\n intent.setAction(Intent.ACTION_DIAL);\r\n intent.setData(Uri.parse(getResources().getString(R.string.telefoonnummer)));\r\n startActivity(intent);\r\n }\r\n\r\n break;\r\n\r\n case R.id.menu_naarMenu:\r\n //naar Activity startMenu\r\n Class ourClass1;\r\n try {\r\n ourClass1 = Class.forName(\"com.aid.first.mb.firstaid.Menu1\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass1);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n break;\r\n case R.id.menu_sluitAf:\r\n Class ourClass3;\r\n try {\r\n ourClass3 = Class.forName(\"com.aid.first.mb.firstaid.Personlijke_veiligheid\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass3);\r\n intentDrie.putExtra(\"sluiten\",1);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n finish();\r\n break;\r\n\r\n case R.id.menu_WaarBenIk:\r\n //naar activity Locatie\r\n Class ourClass4;\r\n try {\r\n ourClass4 = Class.forName(\"com.aid.first.mb.firstaid.Lokatie\");\r\n Intent intentVier = new Intent(MoederClass.this, ourClass4);\r\n startActivity(intentVier);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public void onClick(View view) {\n\n startActivity(getIntent());\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n\t\tbundle = new Bundle();\r\n\r\n\t\tbundle.putString(\"menu\",getApplicationContext().toString());\r\n\t\tswitch (item.getItemId())\r\n\t\t{\r\n\t\t\tcase R.id.action_cart: {\r\n\t\t\t\tintent= new Intent(this, MyCart.class);\r\n\t\t\t\tbundle.putString(\"next_page\",\"MyCart.class\");\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcase R.id.action_notification: {\r\n\t\t\t\tintent= new Intent(this, Notification.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\tcase R.id.action_login: {\r\n\r\n\t\t\t\tintent= new Intent(this, login.class);\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\tcase R.id.myplan: {\r\n\t\t\t\tintent= new Intent(this, MyPlan.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t\tcase android.R.id.home:\t{\r\n\t\t\t\t\tNavUtils.navigateUpFromSameTask(this);\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tdefault: return super.onOptionsItemSelected(item);\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n switch (id){\n case R.id.home:\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n return true;\n\n case R.id.kalenderansicht_abrufen:\n i = new Intent(this, Kalender.class);\n startActivity(i);\n return true;\n\n case R.id.notizfunktion_aufrufen:\n i = new Intent(this, Notizen.class);\n startActivity(i);\n return true;\n\n case R.id.wetterinformationen_abrufen:\n i = new Intent(this, Wetter.class);\n startActivity(i);\n return true;\n\n case R.id.rechnerfunktion_aufrufen:\n i = new Intent(this, Rechner.class);\n startActivity(i);\n return true;\n\n case R.id.stopwatch:\n i = new Intent(this, StopWatch.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.new_wo) {\n\t\t\tIntent i = new Intent(this, MainActivity.class);\n\t\t\tstartActivity(i);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "private void goLogin(){\n Intent intent = new Intent(Menu.this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n\n case R.id.accueil_menu:\n Intent intenthome = new Intent(this, MainActivity.class);\n startActivity(intenthome);\n return true;\n\n case R.id.list_artwork_menu:\n Intent intentartwork = new Intent(this, List_artwork.class);\n startActivity(intentartwork);\n return true;\n\n case R.id.exposition_menu:\n Intent intentexhibition = new Intent(this, List_exhibition.class);\n startActivity(intentexhibition);\n return true;\n\n case R.id.parametres_menu:\n Intent intentsettings = new Intent(this, Settings.class);\n startActivity(intentsettings);\n return true;\n\n case R.id.addArtist_menu:\n Intent intentaddArtistmenu = new Intent(this, Create_artist.class);\n startActivity(intentaddArtistmenu);\n return true;\n }\n\n return (super.onOptionsItemSelected(item));\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n //add MenuItem(s) to ActionBar using Java code\n MenuItem menuItem_Purchase = menu.add(0, 1, Menu.NONE, \"Next\");\n MenuItemCompat.setShowAsAction(menuItem_Purchase,\n MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n\n //Log.d(\"recon\", savedSite.toString());\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tswitch(id){\n\t\t\tcase R.id.calendar:\n\t\t\t\tIntent intent = new Intent(MainActivity.this,CalendarActivity.class);\n\t\t\t\t//intent.putExtra(\"account\", account); \n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\tcase R.id.weather:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "protected Intent getStravaActivityIntent()\n {\n return new Intent(this, MainActivity.class);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.testAction) {\n /*Intent i = new Intent(getApplicationContext(), NotificationActivity.class);\n startActivity(i);*/\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(StartActivity.this, MainActivity.class));\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // get the id of menu item selected\n switch (item.getItemId()) {\n case R.id.action_home :\n // initialize an Intent for the MainActivity and start it\n intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_create_list :\n // initialize an Intent for the CreateList Activity and start it\n intent = new Intent(this, CreateList.class);\n startActivity(intent);\n return true;\n case R.id.action_add_item :\n // initialize an Intent for the AddItem Activity and start it\n intent = new Intent(this, AddItem.class);\n // put the database id in the Intent\n intent.putExtra(\"_id\", listId);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void goToMenu (View view)\n {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n\n\n Button groupbutton = (Button) findViewById(R.id.group);\n Button homebutton = (Button) findViewById(R.id.home);\n Button historybutton = (Button) findViewById(R.id.historybutton);\n Button alarmbutton = (Button) findViewById(R.id.alarmbutton);\n\n\n\n homebutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, groupActivity.class);\n startActivity(myintent);\n }\n });\n\n historybutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, Historyactivity.class);\n startActivity(myintent);\n }\n });\n\n alarmbutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent myintent = new Intent(MainActivity.this, Finalalarm.class);\n startActivity(myintent);\n }\n });\n\n return true;\n\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_generating_screen, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_start_screen, menu);\n return true;\n }", "Intent createNewIntent(Class cls);", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.log:\r\n \tIntent i = new Intent(this, LogItemsActivity.class);\r\n \t\tstartActivity(i);\r\n return true;\r\n case R.id.edit:\r\n \tIntent i1 = new Intent(this, EditItemsActivity.class);\r\n \tstartActivity(i1);\r\n return true;\r\n case R.id.stats:\r\n \tIntent i2 = new Intent(this, BarActivity.class);\r\n \t\tstartActivity(i2);\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater ().inflate ( R.menu.menu_activity , menu );\n return super.onCreateOptionsMenu ( menu );\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n ActivityOptionsService activityOptionsService = new ActivityOptionsService();\n activityOptionsService.openActivity(this ,id);\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.launcher, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem i) {\n int id = i.getItemId();\n\n switch (i.getItemId()) {\n\n// case R.id.action_settings:\n// Intent intent = new Intent(this, HttpMainActivity.class);\n// startActivity(intent);\n// break;\n\n case R.id.menu_maintain_synchronicity:\n Intent intent4 = new Intent(HelpActivity.this, SynchListActivity.class);\n startActivityForResult(intent4, 4);\n break;\n\n case R.id.menu_maintain_events:\n maintainEvents();\n break;\n\n case R.id.menu_match_events:\n Intent intent6 = new Intent(HelpActivity.this, MatchKeywordsActivity.class);\n startActivityForResult(intent6, 6);\n break;\n\n case R.id.menu_import:\n Intent intent7 = new Intent(HelpActivity.this, DownloadJSON.class);\n Log.i(\"dolphinp\",\"intent7\");\n startActivity(intent7);\n break;\n// )\n// if (isOnline) {\n// requestData(\"http://10.0.0.2/feeds/synchItems.json\");\n// } else {\n// Toast.makeText(this,\"no network\",Toast.LENGTH_LONG).show();\n// }\n// break;\n\n default:\n break;\n }\n\n return super.onOptionsItemSelected(i);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id == R.id.create_new){\n startActivity(new Intent(MainActivity.this, AddActivity.class));\n }\n return super.onOptionsItemSelected(item);\n }", "public void aboutInit(MenuItem menuItem){\n Intent aboutUsIntent = new Intent(MainActivity.this, about.class);\n startActivity(aboutUsIntent);\n }", "@Override\n public void startActivity(Intent intent) {\n startActivity(intent, null);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent intent;\r\n\t switch (item.getItemId()) {\r\n\t case R.id.listaCursosItem:\r\n\t \tintent = new Intent(this, ListarCursos.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.verNotasItem:\r\n\t \tintent=new Intent(this,VerNotas.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.administrarCuentaItem:\r\n\t \tintent=new Intent(this,AdministrarCuenta.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t case R.id.cerrarSesionItem:\r\n\t \tintent=new Intent(this,Login.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t default:\r\n\t return super.onOptionsItemSelected(item);\r\n\t }\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.toPrediction:\n Log.d(\"info\", \"toPrediction clicked\");\n Activity activity = new PredictionActivity();\n Intent intent = new Intent(this, PredictionActivity.class);\n startActivity(intent);\n return true;\n case R.id.toSettings:\n Log.d(\"info\", \"toSettings clicked\");\n Activity activity2 = new SettingsActivity();\n Intent intent2 = new Intent(this, SettingsActivity.class);\n startActivity(intent2);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent= new Intent(MenuDemoActivity.this,FormActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tSystem.out.println(\"sadsa\");\n\t\t\n\t\tIntent intentEventsMenuActiviry = new Intent(EventsMenuActivity.this, Consulter.class);\n\t\t\n\t\tEventsMenuActivity.this.startActivity(intentEventsMenuActiviry);\n\t\t\n\t}", "private void backToMenu()\n {\n Intent i = new Intent(this, HomeScreen.class);\n startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent();\t\n\t\t\t\tintent.setClass( SDFileExplorer.this,MenuActivity.class);\n\t\t\t\tSDFileExplorer.this.startActivity(intent);\n\t\t\t\tSDFileExplorer.this.finish();\n\t\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.launcher, menu);\n\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_launcher, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(CartSetMenuActivity.this,\n\t\t\t\t\t\tHome_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(CartSetMenuActivity.this,\n\t\t\t\t\t\tHome_Activity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.launched, menu);\n\t\treturn true;\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n \t\treturn true;\n \t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n MenuItem item = menu.findItem(R.id.menu_item_share);\r\n ShareActionProvider myShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);\r\n myShareActionProvider.setShareHistoryFileName(\"test\");\r\n \r\n Intent myIntent = new Intent();\r\n myIntent.setAction(Intent.ACTION_SEND);\r\n myIntent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.sms_body));\r\n myIntent.setType(\"text/plain\");\r\n\r\n myShareActionProvider.setShareIntent(myIntent);\r\n\r\n\t\treturn true;\r\n\t}", "public void onClick(View v) {\n Intent newActivity = new Intent(Detail_1.this,TabHostMENU.class);\r\n newActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(newActivity);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handling item selection\n switch (item.getItemId()) {\n case R.id.action_home:\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_birds:\n intent = new Intent(this, Birds.class);\n startActivity(intent);\n return true;\n case R.id.action_storm:\n intent = new Intent(this, Storm.class);\n startActivity(intent);\n return true;\n case R.id.action_nocturnal:\n intent = new Intent(this, Nocturnal.class);\n startActivity(intent);\n return true;\n case R.id.action_library:\n intent = new Intent(this, Mylibrary.class);\n startActivity(intent);\n return true;\n case R.id.action_now_playing:\n intent = new Intent(this, Nowplaying.class);\n startActivity(intent);\n return true;\n case R.id.action_download:\n intent = new Intent(this, Download.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "private void homemenu() \n\n{\nstartActivity (new Intent(getApplicationContext(), Home.class));\n\n\t\n}", "@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int itemId = item.getItemId();\n switch (itemId) {\n case android.R.id.home:\n startActivity(new Intent(Transaction.this,MainActivity.class));\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, TriggerActivity.class);\n startActivity(intent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()){\n //if the item id is the id we set up for the 'home' button, it sends you back to the main activity\n case R.id.action_home :\n intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n //if the item id is the id we set up for create contact, it sends us to the Create Contact class, same as the openCreateContact does\n //when we click the floating action button\n case R.id.action_create_contact:\n intent = new Intent(this, CreateContact.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n /*case R.id.menuReview:\n Intent i = new Intent(this, NewReviewActivity.class);\n i.putExtra(\"new\", news);\n startActivity(i);\n return true;*/\n\n default:\n finish();\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_send, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\t\r\n\t\tmenu.getItem(0).setIcon(R.drawable.menu_icon);\r\n\t\tmenu.getItem(0).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {\r\n\t public boolean onMenuItemClick(MenuItem item) {\r\n\t Intent settingsIntent = new Intent(LoginActivity.this, SettingsActivity.class);\r\n\t LoginActivity.this.startActivity(settingsIntent);\r\n\t return false;\r\n\t }\r\n\t });\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_home) {\n\n Intent intent = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intent);\n return true;\n }\n// if (id == R.id.action_send) {\n//\n// // Do something\n// return true;\n// }\n\n return super.onOptionsItemSelected(item);\n }", "public void openCreateAccount(){\n Intent intent = new Intent(this, createAccountActivity.class);\n startActivity(intent);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_one, menu);\n return true;\n }", "protected void changeActivity() {\n\t\tIntent intent = new Intent();\r\n\t\tintent.setClass(this,MainActivity.class);\r\n\t\t//intent.putExtra(\"padapter\", MainActivity.selectedLevel);\r\n\t\t\r\n\t\tstartActivity(intent);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase R.id.aboutus:\n\t\t\tIntent about=new Intent(Menu.this,AboutUs.class);\n\t\t\tstartActivity(about);\n\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.pre:\n\t\t\tIntent pre=new Intent(Menu.this,Prefs.class);\n\t\t\tstartActivity(pre);\n\t\t\tbreak;\n\t\tcase R.id.exit:finish();\n\t\t\tbreak;\n\t\tcase R.id.ma:Intent a=new Intent(Menu.this,hehhehe.class);\n\t\tstartActivity(a);\n\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(getApplicationContext(), sh1.class);\n startActivity(i);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\r\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\t\tsetContentView(R.layout.menu);\r\n\t\tbeginner = (Button) findViewById(R.id.beginner);\r\n\t\tintermediate = (Button) findViewById(R.id.intermediate);\r\n\t\texpert = (Button) findViewById(R.id.expert);\r\n\t\tbeginner.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent levelone = new Intent(\"anky.dj.iitkgp.LEVELONE\");\r\n\t\t\t\tstartActivity(levelone);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tintermediate.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent leveltwo = new Intent(\"anky.dj.iitkgp.LEVELTWO\");\r\n\t\t\t\tstartActivity(leveltwo);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\texpert.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent levelthree = new Intent(\"anky.dj.iitkgp.LEVELTHREE\");\r\n\t\t\t\tstartActivity(levelthree);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_activity_one, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n Intent nextScreen;\n Intent callIntent;\n Intent mailIntent;\n\n switch (item.getItemId()) {\n case R.id.action_call:\n try {\n\n callIntent = new Intent(Intent.ACTION_DIAL);\n callIntent.setData(Uri.parse(\"tel:\"+getString(R.string.tel_number)));\n startActivity(callIntent);\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Calling a Phone Number\", \"Call failed\", activityException);\n }\n\n\n return true;\n\n case R.id.action_mail:\n\n try {\n\n mailIntent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND\n mailIntent.setType(\"text/plain\");\n mailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.mail_subject));\n mailIntent.setData(Uri.parse(\"mailto:\"+getString(R.string.mail_adress))); // or just \"mailto:\" for blank\n mailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.\n startActivity(mailIntent);\n\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Mailing an adress\", \"Mail failed\", activityException);\n }\n\n return true;\n\n case R.id.action_linkedin:\n\n try {\n\n Uri uriUrl = Uri.parse(getString(R.string.url_linkedin));\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Mailing an adress\", \"Mail failed\", activityException);\n }\n\n return true;\n\n case R.id.action_language:\n\n nextScreen = new Intent(getApplicationContext(), Language.class);\n\n startActivity(nextScreen);\n\n return true;\n\n case R.id.action_settings:\n\n nextScreen = new Intent(getApplicationContext(), Settings.class);\n\n startActivity(nextScreen);\n\n return true;\n\n case R.id.action_exit:\n this.finishAffinity();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_instructions, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_intent__test__juego, menu);\n return true;\n }", "public static Intent createIntent(final Context context) {\n return new Intent(context, LicenseActivity.class);\n }", "public void createmenu(){\n\n\n Context context = getApplicationContext();\n menuadpater = new MenuAdapter(context);\n\n MENULIST.setAdapter(menuadpater);\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(getApplicationContext(),\tLauncher.class));\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_open_new:\n String url = \"\";\n try{\n url = json.getString(\"url\");\n }\n catch (JSONException e){\n e.printStackTrace();\n }\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n startActivity(browserIntent);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.account_menu_item) {\n Intent intent = new Intent(this,Account.class);\n startActivity(intent);\n return true;\n }\n else if (id == R.id.dashboard_menu_item) {\n Intent intent = new Intent(this,Dashboard.class);\n startActivity(intent);\n return true;\n }\n else if (id == R.id.settings_menu_item) {\n Intent intent = new Intent(this,Settings.class);\n startActivity(intent);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) \n\t{\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}" ]
[ "0.6635119", "0.66144836", "0.64046854", "0.633665", "0.6290746", "0.6284029", "0.62760603", "0.62692827", "0.62610805", "0.6234567", "0.62301654", "0.6210618", "0.62047637", "0.619636", "0.61919296", "0.61865664", "0.61820114", "0.6181656", "0.6173334", "0.61724305", "0.61581975", "0.6148098", "0.61461115", "0.6142957", "0.6142721", "0.6139885", "0.61377543", "0.61272156", "0.6120319", "0.61198485", "0.61130196", "0.61129916", "0.6105689", "0.6097728", "0.60913455", "0.6086787", "0.60843426", "0.6077149", "0.60762227", "0.6074167", "0.60706025", "0.60698533", "0.6061243", "0.60587645", "0.605288", "0.6052804", "0.6051167", "0.60456115", "0.60422945", "0.6037491", "0.60370386", "0.6028825", "0.6023371", "0.60177845", "0.6015916", "0.60112375", "0.6008149", "0.6007032", "0.6004258", "0.6002772", "0.5994273", "0.5992037", "0.5984601", "0.5984601", "0.5982265", "0.5982265", "0.5976749", "0.59708774", "0.5942463", "0.5941733", "0.5940209", "0.5939598", "0.59387684", "0.5933135", "0.59269124", "0.59249324", "0.5924471", "0.59242886", "0.5922736", "0.5919666", "0.5919003", "0.59143263", "0.5914002", "0.5909829", "0.59089893", "0.5904378", "0.59036416", "0.5900838", "0.58949214", "0.58926225", "0.5892342", "0.5891173", "0.588115", "0.5877265", "0.5873745", "0.58729154", "0.5870769", "0.5869636", "0.5867465", "0.5865748", "0.58648324" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ApplicationContext c = new ClassPathXmlApplicationContext("hello.xml"); TextEditor t = (TextEditor) c.getBean("text"); t.test(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
in Java, string objects are immutable. Immutable simply means unmodifiable or unchangeable values.
public static void main(String[] args) { String username = "John"; //contact() -> update the string username.concat(" Snow"); // old name -> old string (John) System.out.println(username); System.out.println("--------------"); String response = username.concat(" Snow"); // new name -> new string (John Snow) System.out.println(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n String s1 = \"Java String\";\n\n s1.concat(\"is immutable\");\n\n System.out.println(s1); //will not concat\n\n //Assign it explicitly to contact the string\n s1 = s1.concat(\"is immutable so assign it explicitly\");\n System.out.println(s1);\n }", "private static void LessonStrings() {\n String str = \"\"; //Empty\n str = null; // string has no value\n str = \"Hello World!\"; //string has a value\n\n if(str == null || str.isEmpty()) {\n System.out.println(\"String is either empty or null!\");\n } else {\n System.out.println(\"String has a value!\");\n }\n\n // immutable - unable to be changed...\n str = \"another value\"; //this create a new string each time its assigned a new value\n\n// for(int i = 0; i <= 10; i++) {\n// str = \"New Value\" + Integer.toString(i); //new string created each time\n// System.out.println(str);\n// }\n\n // overcome string immutable issue\n// StringBuilder myStringBuilder = new StringBuilder(); //doesn't create a new string\n// for(int i=0; i <= 10; i++) {\n// myStringBuilder.append(\"new value with string builder: \").append(Integer.toString(i)).append(\"\\n\");\n// }\n//\n// System.out.println(myStringBuilder);\n\n //Strings are array of characters\n //Useful methods on strings indexOf and lastIndexOf\n String instructor = \"Bipin\";\n int firstIndex = instructor.indexOf(\"i\");\n int lastIndex = instructor.lastIndexOf(\"i\");\n\n System.out.println(firstIndex);\n System.out.println(lastIndex);\n\n //Break done a string into characters\n String sentence = \"The cat in the hat sat on a rat!\";\n// for(char c: sentence.toCharArray()) {\n// System.out.println(c);\n// }\n\n //substring to break down strings\n String partOfSentence = sentence.substring(4, 7);\n System.out.println(partOfSentence);\n\n }", "private final void r(String s) { if (m() > 0) setto(s); }", "static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }", "public void makeImmutable() {\n mutable = false;\n }", "abstract String mo1747a(String str);", "public MutableString copy() {\r\n\t\treturn new MutableString(this.value);\r\n\t}", "public StringContent(String newString)\n {\n content=newString;\n }", "@Test\r\n public void testImmutable() { \r\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n \r\n //Test the object was created\r\n Assert.assertEquals(try_scorers.getName(),\"Sharief\",\"Error names weren't the same\"); \r\n }", "@Test\n public void testCopy_2() {\n LOGGER.info(\"testCopy_2\");\n final String value = \"Hej\";\n final AtomString atomString1 = new AtomString(value);\n final AtomString atomString2 = atomString1.copy();\n assertTrue(atomString1 != atomString2);\n assertEquals(atomString1, atomString2);\n final String actual = atomString2.toString();\n final String expected = value;\n assertEquals(expected, actual);\n }", "public int setString(long pos, String str)\n\t{\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void m23077a(String str) {\n }", "@Override\r\n\tpublic Buffer setString(int pos, String str) {\n\t\treturn null;\r\n\t}", "boolean isImmutable();", "public final void setValue (String newValue) throws ReadOnlyException, InvalidArgumentException {\n //\n // check new value\n //\n if ( Util.equals (this.getValue (), newValue) )\n return;\n checkReadOnly ();\n checkValue (newValue);\n \n //\n // set new value\n //\n setValueImpl (newValue);\n }", "public void m23080b(String str) {\n }", "public static void main(String[] args) {\n\t\tString s1 =\"Yashodhar\";//String by java string literal\r\n\t\tchar ch[] ={'y','a','s','h','o','d','h','a','r','.','s'};\r\n\t\tString s3 = new String(ch);//Creating java to string\r\n\t\tString s2= new String(\"Yash\");//creating java string by new keyword \r\n\t\tSystem.out.println(s1);\r\n\t\tSystem.out.println(s2);\r\n\t\tSystem.out.println(s3);\r\n\t\t\r\n\t\t//Immutable String in Java(Can not changed)\r\n\t\tString s4= \"YASHODSHR\";\r\n\t\ts4 =s4.concat( \"Suvarna\");\r\n\t\tSystem.out.println(\"Immutable Strin=== \"+s4);\r\n\t\t\r\n\t\t//Compare two Strings using equals\r\n\t\tString s5= \"Yash\";\t\t\r\n\t\tString s6= \"YASH\";\r\n\t\tSystem.out.println(\"Campare equal \"+s5.equals(s6));\r\n\t\tSystem.out.println(s5.equalsIgnoreCase(s6));\r\n\t\t\r\n\t\t\t\r\n\t\t String s7=\"Sachin\"; \r\n\t\t String s8=\"Sachin\"; \r\n\t\t String s9=new String(\"Sachin\"); \r\n\t\t System.out.println(s7==s8); \r\n\t\t System.out.println(s7==s9);\r\n\t\t \r\n\t\t String s10 = \"YAsh\";\r\n\t\t String s11 = \"Yash\";\r\n\t\t String s12 = new String(\"yash\");\r\n\t\t System.out.println(s10.compareTo(s11));\r\n\t\t System.out.println(s11.compareTo(s12));\r\n\t\t \r\n\t\t //SubStrings\t\t \r\n\t\t String s13=\"SachinTendulkar\"; \r\n\t\t System.out.println(s13.substring(6));\r\n\t\t System.out.println(s13.substring(0,3));\r\n\t\t \r\n\t\t System.out.println(s10.toLowerCase());\r\n\t\t System.out.println(s10.toUpperCase());\r\n\t\t System.out.println(s10.trim());//remove white space\r\n\t\t System.out.println(s7.startsWith(\"Sa\"));\r\n\t\t System.out.println(s7.endsWith(\"n\"));\r\n\t\t System.out.println(s7.charAt(4));\r\n\t\t System.out.println(s7.length());\r\n\r\n\r\n\t\t String Sreplace = s10.replace(\"Y\",\"A\");\r\n\t\t System.out.println(Sreplace);\r\n\t\t \r\n\t\t System.out.print(\"String Buffer\");\r\n\t\t StringBuffer sb = new StringBuffer(\"Hello\");\r\n\t\t sb.append(\"JavaTpoint\");\r\n\t\t sb.insert(1,\"JavaTpoint\");\r\n\t\t sb.replace(1, 5, \"JavaTpoint\");\r\n\t\t sb.delete(1, 3);\r\n\t\t sb.reverse();\r\n\t\t System.out.println(\" \"+sb);\r\n\t\t \r\n\t\t String t1 = \"Wexos Informatica Bangalore\";\r\n\t\t System.out.println(t1.contains(\"Informatica\"));\r\n\t\t System.out.println(t1.contains(\"Wexos\"));\r\n\t\t System.out.println(t1.contains(\"wexos\"));\r\n\t\t \r\n\t\t \r\n\t\t String name = \"Yashodhar\";\r\n\t\t String sf1 = String.format(name);\r\n\t\t String sf2= String .format(\"Value of %f\", 334.4);\r\n\t\t String sf3 = String.format(\"Value of % 43.6f\", 333.33);\r\n\t\t \t\t\t \r\n\t\t \r\n\t\t System.out.println(sf1);\r\n\t\t System.out.println(sf2);\r\n\t\t System.out.println(sf3);\r\n\t\t \r\n\t\t String m1 = \"ABCDEF\";\r\n\t\t byte[] brr = m1.getBytes();\r\n\t\t for(int i=1;i<brr.length;i++)\r\n\t\t {\r\n\t\t System.out.println(brr[i]);\r\n\t\t }\r\n\t\t \r\n\t\t String s16 = \"\";\r\n\t\t System.out.println(s16.isEmpty());\r\n\t\t System.out.println(m1.isEmpty());\r\n\t\t \r\n\t\t String s17 =String.join(\"Welcome \", \"To\",\"Wexos Infomatica\");\r\n\t\tSystem.out.println(s17);\r\n\t\t \r\n \r\n\t}", "public int setString(long pos, String str, int offset, int len)\n\t{\n\t\tthrow new UnsupportedOperationException();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString s = \"Hello how are you\";\n\t\tSystem.out.println(s.length());\n\t\t\n\t\tSystem.out.println(s.toLowerCase());\n\t\tSystem.out.println(s.toUpperCase());\n\t\t\n\t\tSystem.out.println(s.indexOf('r'));\n\t\tSystem.out.println(s.replace('y', 'x'));\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tString v = \"abc\\tdef\" + \"xyz\"; // tab (\\t)\n\t\tSystem.out.println(v);\n\t\t\n\t\tString v1 = \"abc\\bdef\" + \"xyz\"; // (\\b)\n\t\tSystem.out.println(v1);\n\t\t\n\t\t// look for different string methods\n\t\t\n\t\t// string is immutable\n\t\t\n\t\t/*\n\t\t \tthere can not be more than 1 string with same value in memory\n\t\t\tstring can not change value, instead a new string is formed always, when edited\n\t\t\tfor security reason (strings are used for password etc)\n\t\t */\n\t\t\n\t\tString str1 = \"Hello\";\n\t\tString str2 = \"Hi\";\n\t\tString str3 = str2;\n\t\tstr3 = str3 + \"something\";\n\t\t\n\t\tSystem.out.println(\"immutable example\");\n\t\tSystem.out.println(str1.hashCode());\n\t\tSystem.out.println(str2.hashCode());\n\t\tSystem.out.println(str3.hashCode());\n\t\t\n\t\t// string builder is mutable\n\t}", "public interface My_String { \n\n // We'll skip this creator operation for now\n /** @param b a boolean value\n * @return string representation of b, either \"true\" or \"false\" */\n public static My_String valueOf(boolean b) {\n return new FastMyString(true);\n }\n\n /** @return number of characters in this string */\n public int length();\n\n /** @param i character position (requires 0 <= i < string length)\n * @return character at position i */\n public char charAt(int i);\n\n /** Get the substring between start (inclusive) and end (exclusive).\n * @param start starting index\n * @param end ending index. Requires 0 <= start <= end <= string length.\n * @return string consisting of charAt(start)...charAt(end-1) */\n public My_String substring(int start, int end);\n}", "public static String leerString() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public static void main(String[] args) {\n\n String s = \"2222\";\n String a = \"www\";\n// a.replace()\n\n s = a;\n System.out.println(s);\n }", "@Test\n public void testAtomString_4() {\n LOGGER.info(\"testAtomString_4\");\n AtomString atomString1 = new AtomString(\"Hello\");\n AtomString atomString2 = new AtomString(\"Hej\");\n assertNotEquals(atomString1, atomString2);\n }", "public static void stringImportantMethods() {\n String s = \"Hello world\";\n\n //length is 0\n System.out.println(s.length());\n\n }", "public void setString(String newString) {\n\tstring = newString;\n }", "StringConstant createStringConstant();", "void mo1791a(String str);", "@Override\n public void update(String string) {\n }", "protected StringValue() {\r\n value = \"\";\r\n typeLabel = BuiltInAtomicType.STRING;\r\n }", "public abstract String getString();", "public abstract String getString();", "@Override\r\n\tpublic void copy(String from, String to) {\n\t\t\r\n\t}", "public static void main(String[] args){\n java.lang.String myString = \"This is a string\";\n System.out.println(myString);\n myString = myString + \", and this is more.\";\n System.out.println(myString);\n\n int myInt = 50;\n String lastString = \"10\";\n lastString = lastString + myInt;\n System.out.println(\"Last String is = \" + lastString);\n\n /*Strings are immutable i.e. you can't change the value of string once it's created.\n * Java automatically create a new string with the value of old string and some new string.\n * And, java delete the old string variable from memory.\n * String is class not a data type in class.*/\n\n\n\n\n }", "void mo37759a(String str);", "public static void modifyString(String testmethod) //method or function header or signature to modify String\r\n {\r\n System.out.println(\"the value of testmethod originally is: \"+testmethod);\r\n testmethod=\"george\"; \r\n System.out.println(\"the value of testmethod after changing within method is: \"+testmethod);\r\n }", "public static /* synthetic */ String m109037a(String str) {\n return str;\n }", "@Test\n public void testToString() {\n LOGGER.info(\"testToString\");\n final String actual = new AtomString(\"Hello\").toString();\n final String expected = \"Hello\";\n assertEquals(expected, actual);\n }", "public void set(String s);", "@Override // java.util.List, java.util.Collection\n public /* synthetic */ boolean add(String str) {\n throw new UnsupportedOperationException(\"Operation is not supported for read-only collection\");\n }", "void mo1935c(String str);", "protected final /* synthetic */ Object mo2922a(String str) {\n return m22166b(str);\n }", "@Test\n public void testCopy_1() {\n LOGGER.info(\"testCopy_1\");\n final AtomString actual = new AtomString(\"Hej\");\n final AtomString expected = actual.copy();\n assertEquals(expected, actual);\n }", "@Override // java.util.List\n public /* synthetic */ String set(int i, String str) {\n throw new UnsupportedOperationException(\"Operation is not supported for read-only collection\");\n }", "@Test\n public void testAtomString_9() {\n LOGGER.info(\"testAtomString_9\");\n final StringBuilder s = new StringBuilder(\"Hello\");\n AtomString atomString1 = new AtomString(\"Hello\");\n AtomString atomString2 = new AtomString(s);\n assertEquals(atomString1, atomString2);\n final StringBuilder ss = new StringBuilder(atomString1);\n assertEquals(s.toString(), ss.toString());\n }", "public static void main(String args[]){\n StringBuffer s1=new StringBuffer(\"Java\");\n System.out.println(s1); \n System.out.println(s1.capacity()); //Prints 16+4\n\n s1.append(\"Course\");\n s1.append(1); //Methods of String Buffer Class are overloaded for all primitive data types.\n s1.append(true);\n System.out.println(s1);\n\n StringBuffer s2=new StringBuffer(\"Learn \");\n s2.append(\"Java\").append(\" \").append(\"Happily\"); //Method Chaining\n System.out.println(s2);\n\n// Unlike String Class, + operator is not overloaded for concatenation in String Buffer Class. Hence s1+s2 results error. Only append can be used\n\n s1.delete(10,15); //Deletes from [10,15)\n System.out.println(s1);\n\n s1.insert(4,\" \");\n s1.insert(0,\"Fun \");\n s1.insert(4,\"with \");\n System.out.println(s1);\n\n //public synchronized StringBuffer replace(int startIndex, int endIndex)\n s1=s1.replace(3,14,\" \"); //Replaces everything between [start,end) with passed string\n System.out.println(s1);\n\n //public synchronized StringBuffer reverse(). No reverse method in String Class\n StringBuffer s3=s1.reverse();\n System.out.println(s3);\n System.out.println(s1); //s1 is also modified\n }", "private void m29114i(String str) {\n String str2;\n String str3 = \"dxCRMxhQkdGePGnp\";\n try {\n str2 = System.getString(this.mContext.getContentResolver(), str3);\n } catch (Exception unused) {\n str2 = null;\n }\n if (!str.equals(str2)) {\n try {\n System.putString(this.mContext.getContentResolver(), str3, str);\n } catch (Exception unused2) {\n }\n }\n }", "private Strings()\n\t{\n\t}", "private Strings()\n\t{\n\t}", "void mo41089d(String str);", "public void set(String str) {\n\t setValueInternal(str);\n\t}", "void mo1932a(String str);", "void mo12635a(String str);", "StringOperation createStringOperation();", "public interface ConstString\n{\n\tString STRING_ENCODING_UTF8 = \"UTF-8\";\n\tString APPLICATION_XML = \"application/xml\";\n\tString APPLICATION_JSON = \"application/json\";\n\tString APP_JSON_UTF_8 = \"application/json;charset=UTF-8\";\n\tString APP_XML_UTF_8 = \"application/xml;charset=UTF-8\";\n}", "abstract String moodString();", "static String changeStr(StringFunc sf, String s){\n return sf.func(s);\n }", "@Test\n public void testAtomString_8() {\n LOGGER.info(\"testAtomString_8\");\n final CharSequence s = \"Hello\";\n AtomString atomString1 = new AtomString(\"Hello\");\n AtomString atomString2 = new AtomString(s);\n assertEquals(atomString1, atomString2);\n }", "@Test\n\tpublic void shouldRedefineToString() {\n\t\tInvoice tested = new Invoice(12L, 3400);\n\t\t\t\t\n\t\t// then\n\t\t// ...it should not be payed\n\t\tassertThat(tested, redefineToString());\n\t\t\n\t}", "@Test\n public void testConstructionString()\n {\n String constructed = StateUtils.construct(sensitiveString, externalContext);\n Object object = StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertTrue(object instanceof String);\n String string = (String) object;\n Assertions.assertEquals(string, sensitiveString);\n }", "void writeString(String value);", "void mo5871a(String str);", "public abstract String read_string();", "void mo88522a(String str);", "org.hl7.fhir.String addNewValueString();", "void unsetValueString();", "public static void main(String[] args) {\nfinal String str=\"Hello\";//constant variables CANT BE change;\n// name=\"School\";\n\n\t}", "public void setStr(java.lang.String str)\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(STR$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STR$0);\r\n }\r\n target.setStringValue(str);\r\n }\r\n }", "void mo3768a(String str);", "public static void main(String[] args) {\nStringBuffer str = new StringBuffer(\"JamesGosling\");\nint l=str.length();\nSystem.out.println(\"The length of the string is :\"+l);\nSystem.out.println(\"The capacity of string is:\"+str.capacity());\n//16+12=28...16 is size of empty string buf nd 12 is of james gosling\nSystem.out.println(\"the substring:\"+str.substring(0, 4));//0 to 3 charecter will be displayed\n\tstr.replace(5, 10, \"Java\");\n\tSystem.out.println(str);\n\tstr.delete(2, 5);\n\tSystem.out.println(str);\n\tSystem.out.println(\"The reversed string:\"+str.reverse());\n\t}", "public abstract void mo20160a(String str);", "public abstract void append(String s);", "public final String a(String str) {\n return a(str, false);\n }", "private void checkMutability()\n\t{\n\t\tif (immutable)\n\t\t{\n\t\t\tthrow new UnsupportedOperationException(\"Map is immutable\");\n\t\t}\n\t}", "void mo21068a(String str) throws IOException;", "@Test\n\tvoid testImplementStrStr() {\n\t\tassertEquals(2, new ImplementStrStr().strStr(\"hello\", \"ll\"));\n\t\tassertEquals(-1, new ImplementStrStr().strStr(\"aaaaa\", \"bba\"));\n\t\tassertEquals(4, new ImplementStrStr().strStr(\"mississippi\", \"issip\"));\n\t\tassertEquals(-1, new ImplementStrStr().strStr(\"mississippi\", \"issipi\"));\n\t\tassertEquals(0, new ImplementStrStr().strStr(\"a\", \"a\"));\n\t\tassertEquals(0, new ImplementStrStr().strStr(\"aaaaa\", \"\"));\n\t\tassertEquals(-1, new ImplementStrStr().strStr(\"a\", \"aaaaa\"));\n\t}", "void m(String s) {\n\t\tthis.m(getter(), 1);\r\n\t}", "void mo1934b(String str);", "private StringUtils() {}", "private StringUtils() {}", "public ImmutableObject modifiedName(String name) {\n return new ImmutableObject(this.id, name);\n }", "public void setString(int index,String value);", "public abstract void mo70704a(String str);", "@Test\n public void testToString() \n {\n String fieldName = \"Old Field\";\n String text = \"New Field\";\n \n Field instance = new Field(fieldName, text);\n \n String expResult = \"Old Field has been updated to New Field\";\n String result = instance.toString();\n assertEquals(expResult, result);\n }", "@Test\n public void testAtomString_5() {\n LOGGER.info(\"testAtomString_5\");\n final AtomString hej = new AtomString(\"Hej\");\n final AtomString actual = new AtomString(hej);\n final AtomString expected = new AtomString(\"Hej\");\n assertEquals(expected, actual);\n }", "void mo85415a(String str);", "private Conjunction(String newValue)\r\n\t{\r\n\t\tthis.value = newValue;\r\n\t}", "public RamString(String string) throws IllegalArgumentException{\r\n if (string == null) {\r\n throw new IllegalArgumentException(\"Input cannot be null.\");\r\n }\r\n this.string = string; }", "public static void set( String str1,String str2 ) {\n\t\tStringDemo.str1 = str1;\n\t\t// String object is created\n\t\tStringDemo.str2 = new String(str2);\n\t\t}", "public static void main(String[] args) {\n\t\tString s=\"abc\";\n\t\ts=s.concat(\"defg\");\n\t\ts.concat(\"ghi\");\n\t\tString s1=s,s2=s,s3=s,s4=s,s5=s;\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s3);\n\t\tSystem.out.println(s4);\n\t\tSystem.out.println(s5);\n\t\t\n\t\t\n\t\tStringBuffer sb= new StringBuffer(\"abc\");\n\t\tsb.append(\"ABC\");\n\t\tStringBuffer sb1=sb,sb2=sb;\n\t\tSystem.out.println(sb);\n\t\tSystem.out.println(sb1);\n\t\tSystem.out.println(sb2);\n\t\t\n\t}", "private StringUtilities() {\n // nothing to do\n }", "ILoString append(String that);", "@Override\n public boolean isMutable() {\n return true;\n }", "void unsetString();", "public abstract void mo70715b(String str, String str2);", "public void remove(String str) {\n\n }", "public abstract String mo24851a(String str);", "void setString(String attributeValue);", "@Test\n public void checkImmutability() {\n assertThatClassIsImmutableBaseClass(AnnotatedCodec.class);\n assertThatClassIsImmutable(AnnotationsCodec.class);\n assertThatClassIsImmutable(ApplicationCodec.class);\n assertThatClassIsImmutable(ConnectivityIntentCodec.class);\n assertThatClassIsImmutable(ConnectPointCodec.class);\n assertThatClassIsImmutable(ConstraintCodec.class);\n assertThatClassIsImmutable(EncodeConstraintCodecHelper.class);\n assertThatClassIsImmutable(DecodeConstraintCodecHelper.class);\n assertThatClassIsImmutable(CriterionCodec.class);\n assertThatClassIsImmutable(EncodeCriterionCodecHelper.class);\n assertThatClassIsImmutable(DecodeCriterionCodecHelper.class);\n assertThatClassIsImmutable(DeviceCodec.class);\n assertThatClassIsImmutable(EthernetCodec.class);\n assertThatClassIsImmutable(FlowEntryCodec.class);\n assertThatClassIsImmutable(HostCodec.class);\n assertThatClassIsImmutable(HostLocationCodec.class);\n assertThatClassIsImmutable(HostToHostIntentCodec.class);\n assertThatClassIsImmutable(InstructionCodec.class);\n assertThatClassIsImmutable(EncodeInstructionCodecHelper.class);\n assertThatClassIsImmutable(DecodeInstructionCodecHelper.class);\n assertThatClassIsImmutable(IntentCodec.class);\n assertThatClassIsImmutable(LinkCodec.class);\n assertThatClassIsImmutable(PathCodec.class);\n assertThatClassIsImmutable(PointToPointIntentCodec.class);\n assertThatClassIsImmutable(PortCodec.class);\n assertThatClassIsImmutable(TopologyClusterCodec.class);\n assertThatClassIsImmutable(TopologyCodec.class);\n assertThatClassIsImmutable(TrafficSelectorCodec.class);\n assertThatClassIsImmutable(TrafficTreatmentCodec.class);\n assertThatClassIsImmutable(FlowRuleCodec.class);\n }", "@Override\r\n\tpublic Buffer setString(int pos, String str, String enc) {\n\t\treturn null;\r\n\t}", "void mo9697a(String str);", "void mo1340v(String str, String str2);" ]
[ "0.65954834", "0.5919619", "0.591421", "0.5864424", "0.5850896", "0.5843477", "0.5801292", "0.5785834", "0.5760638", "0.57501364", "0.5708198", "0.56985795", "0.569545", "0.5675643", "0.5673649", "0.5669883", "0.56388324", "0.56354433", "0.56314915", "0.56205153", "0.56168437", "0.55878407", "0.55769", "0.5575754", "0.5571988", "0.5569419", "0.5551019", "0.55275965", "0.5526961", "0.55073076", "0.55073076", "0.55001783", "0.54920995", "0.5481193", "0.5474224", "0.54619277", "0.54606885", "0.543185", "0.5429853", "0.54145795", "0.5406331", "0.54033864", "0.54007566", "0.5400145", "0.53766197", "0.5367939", "0.5364181", "0.5364181", "0.53421164", "0.53407687", "0.53358805", "0.5314146", "0.5311613", "0.5306979", "0.52889425", "0.52873063", "0.5285989", "0.528546", "0.5282578", "0.5273784", "0.52691555", "0.52666193", "0.5261951", "0.52603906", "0.5260011", "0.5251804", "0.52508503", "0.5247084", "0.5246431", "0.5243865", "0.52428603", "0.52413833", "0.5238007", "0.52335197", "0.52310824", "0.5227197", "0.5225493", "0.52236724", "0.52236724", "0.5222373", "0.52221394", "0.52202475", "0.5220066", "0.52190053", "0.5217231", "0.5201861", "0.52003336", "0.52000666", "0.5198376", "0.51932704", "0.5188729", "0.5181657", "0.5176477", "0.5166461", "0.51663464", "0.516244", "0.51607394", "0.5160214", "0.51574576", "0.51412666", "0.51363885" ]
0.0
-1
show record date as today
public void newRecord() { DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); dateTxt.setText(dateFormat.format(new Date())); //mark all students enrolled as attendant if (courseTable.getSelectedRow() != -1) { setWarningMsg(""); updateStudent(currentCourse); for (int i = 0; i < studentTable.getRowCount(); i++) { studentTable.setValueAt(new Boolean(true), i, 0); } } else { //show message: choose course first setWarningMsg("please select course first"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getTodayDate(){\n // get current Date and Time for product_info table\n Date date = Calendar.getInstance().getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:MM\", Locale.getDefault());\n return dateFormat.format(date);\n }", "public String getTodayDate() \n\t{\n\t\treturn getMonthInteger() + \"/\" + getDayOfMonth() + \"/\" + getYear();\n\n\t}", "public static String getTodayDate() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n return simpleDateFormat.format(new Date());\n }", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}", "public static String getToday() {\n return getToday(\"yyyy-MM-dd HH:mm:ss\");\n }", "public String getTodayStr() {\n return getTodayDate().toString();\n }", "public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}", "private static String getTodaysDate() {\n\n LocalDateStringConverter dateToStringConverter = new LocalDateStringConverter();\n return dateToStringConverter.toString(LocalDate.now());\n }", "public String getCurrentDate()\n {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHHmm\");\n return df.format(indexDate);\n }", "public static String currentdate() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tDate date = new Date();\n\t\treturn dateFormat.format(date);\n\n\t}", "@TargetApi(Build.VERSION_CODES.O)\n public LocalDate getTodayDate() {\n LocalDate date;\n date = LocalDate.now();\n return date;\n }", "public void getCurrentDate(){\n Date now = new Date(); //get todays date \n \n SimpleDateFormat formatter = new SimpleDateFormat( \"MM/dd/yyyy\" ); \n System.out.println ( \"The current date is: \" + formatter.format( now ) ); \n \n month = (String) formatter.format( now ).subSequence(0, 2);\n day = (String) formatter.format( now ).subSequence(3, 5);\n year = (String) formatter.format( now ).subSequence(6, 10);\n \n System.out.println(\"month: \" + month);\n System.out.println(\"day: \" + day);\n System.out.println(\"year: \" + year);\n \n }", "public String currentDate() {\n DateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }", "public int getToday() {\n \treturn 0;\n }", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "public static String generateCurrentDayString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn dateFormat.format(new Date());\n\t}", "public String getCurrentDate() {\n return currentDate;\n }", "private String getCurrentDate() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Calendar cal = Calendar.getInstance();\n return dateFormat.format(cal.getTime());\n }", "public Timestamp getToday()\n\t{\n\t\treturn m_today;\n\t}", "public String getCurrentDate() {\n return createdDate;\n }", "public static String getDate(Record record)\n\t{\n\t\treturn MarcUtils.getDate(record);\n\t}", "public static String now(){\n return now(DATE_FORMAT_PATTERN);\n }", "@Test\n\tpublic void systemDate_Get()\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\n\t\t// Created object of Date, to get system current date\n\t\tDate date = new Date();\n\t\t\n\t\tString currDate = dateFormat.format(date);\n\t\t\n\t\tSystem.out.println(\"Today's date is : \"+currDate);\n\n\t}", "protected String getTodaysDateString() { return \"\" + dateFormat.format(this.todaysDate); }", "@ExecFunction(name = \"curdate\", argTypes = {}, returnType = \"DATE\")\n public static Expression curDate() {\n return DateLiteral.fromJavaDateType(LocalDateTime.now(DateUtils.getTimeZone()));\n }", "public static String getTodaysDate() {\t\r\n\t\t\r\n\t\treturn makeDateString(getTodaysDay(), getTodaysMonth(), getTodaysYear());\t\r\n\t\t\r\n\t}", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "public static String getCurrentDateTime() {\n String format = null;\n format = sdfNormal.format(new Date());\n return format;\n }", "public static String getCurrentDate()\n\t{\n\t\treturn getDate(new Date());\n\t}", "public String getTodayText() {\r\n return ValueBindings.get(this, \"todayText\", todayText, \"Today\");\r\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public static void main(String[] args) {\n DateFormat df=new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss a\");\n \n //Get the date today using calender object.\n Date today=Calendar.getInstance().getTime();\n //using DateFormat format method we can create a string\n //representation of a date with the defined format.\n String reportDate=df.format(today);\n //print what date is today!\n System.out.println(\"Current Date: \"+reportDate);\n }", "void showDate()\n {\n Date d=new Date();\n SimpleDateFormat s=new SimpleDateFormat(\"dd-MM-yyyy\");\n date.setText(s.format(d));\n }", "public void goToToday() {\n goToDate(today());\n }", "public String getToday_fa() {\n return today_fa;\n }", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "protected Date getTodaysDate() \t{ return this.todaysDate; }", "public static String getCurrentDateTimeFull() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public void Print_date()\n {\n \n System.out.println(\"Date: \" + date);\n }", "public static String currentDate() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public void displayDate() {\n\t\tSystem.out.print(year + \"/\" + month + \"/\" + day);\r\n\t}", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "public static String datetimeNow(){\n return now(DATETIME_FORMAT_PATTERN);\n }", "public static String getCurrentDate() {\n\n long now = System.currentTimeMillis();\n if ((now - currentDateGenerated) > 1000) {\n synchronized (format) {\n if ((now - currentDateGenerated) > 1000) {\n currentDateGenerated = now;\n currentDate = format.format(new Date(now));\n }\n }\n }\n return currentDate;\n\n }", "private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }", "default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }", "public String getToday_fb() {\n return today_fb;\n }", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public String getCurrentDate(String dateForm) {\n DateFormat dateFormat = new SimpleDateFormat(dateForm);\n\n //get current date time with Date()\n Date date = new Date();\n\n // Now format the date\n String date1= dateFormat.format(date);\n\n return date1;\n }", "private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }", "private void setupCalendarView() {\n // Set the default date shown to be today\n DateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n String todayDate = df.format(Calendar.getInstance().getTime());\n\n mTextView.setText(todayDate);\n }", "public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }", "public static String now() {\n\t\t\treturn fromCalendar(GregorianCalendar.getInstance());\n\t\t}", "@Override\n\tpublic Date getDbDate() {\n\t\treturn systemMapper.selectNow();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDate now = new Date();\n\t\t\t\tString ss = DateFormat.getDateTimeInstance().format(now);\n\t\t\t\tlblDate.setText(ss);\n\t\t\t}", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "public String getCurrentDay() {\n Calendar calendar = Calendar.getInstance(TimeZone.getDefault());\n //Get Current Day as a number\n int todayInt = calendar.get(Calendar.DAY_OF_MONTH);\n\n //Integer to String Conversion\n String todayStr = Integer.toString(todayInt);\n\n return todayStr;\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public static final DateUtil localToday()\n {\n return today(TimeZone.getDefault());\n }", "public void currentDateSql(HplsqlParser.Expr_spec_funcContext ctx) {\n if (exec.getConnectionType() == Conn.Type.HIVE) {\n evalString(\"TO_DATE(FROM_UNIXTIME(UNIX_TIMESTAMP()))\");\n } \n else {\n evalString(exec.getFormattedText(ctx));\n }\n }", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "public Date getCurrentDate() {\n\t\treturn new Date();\n\t}", "public static String getCurrentDateTime()\n\t{\n\t\treturn getDateTime(new Date());\n\t}", "public CurrentDate getCurrentDate() { \n return mCurrentDate; \n }", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public static String getToday(String format) {\n Date c = Calendar.getInstance().getTime();\n System.out.println(\"Current time => \" + c);\n SimpleDateFormat df = new SimpleDateFormat(format, Locale.getDefault());\n return df.format(c);\n }", "public static String currentDate1() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }", "public String getDate(){\n\t\treturn toString();\n\t}", "public static String currentDateTime() {\r\n Calendar c = Calendar.getInstance();\r\n return String.format(\"%tB %te, %tY%n%tl:%tM %tp%n\", c, c, c, c, c, c);\r\n }", "public void printDate() {\r\n printDayOfWeek();\r\n System.out.println(cur.getDay());\r\n printMonth();\r\n System.out.println(cur.getYear());\r\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public static Date todayStart() {\n return dayStart(new Date());\n }", "void showdate(){\n \n Date d = new Date();\n SimpleDateFormat s = new SimpleDateFormat(\"yyyy-MM-dd\");\n jLabel4.setText(s.format(d));\n}", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public static String formatDateForQuery(java.util.Date date){\n return (new SimpleDateFormat(\"yyyy-MM-dd\")).format(date);\n }", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "public Date getCurrentDate()\r\n {\r\n return (m_currentDate);\r\n }", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}", "protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }", "public static String now() {\n // TODO: move this method to DateUtils\n return fromCalendar(GregorianCalendar.getInstance());\n }", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "public Date getDate() {\n return this.currentDate;\n }", "public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "java.lang.String getDate();", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "public static String getCurrentDateAtMidnight() throws Exception{\n\t\t \t SimpleDateFormat formatter1 = new SimpleDateFormat (\"yyyy-MM-dd 00:00:00\"); \t \n\t\t \t java.util.Date date = new Date(); \t \t \n\t\t \treturn formatter1.format(date);\n\t\t \t}", "public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }", "@Override\n public String toString() {\n return date.format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy\")) + \" - \" + note;\n }", "public String getNow() {\n\t\treturn new Date().toString();\n\t}", "public static String getDateTime(){\n String pattern = \"MM/dd/yyyy HH:mm:ss\";\n DateFormat df = new SimpleDateFormat(pattern);\n Date today = Calendar.getInstance().getTime();\n String todayAsString = df.format(today);\n return todayAsString;\n }" ]
[ "0.7788488", "0.7365028", "0.7330438", "0.7245468", "0.69636947", "0.68582326", "0.68032074", "0.6771341", "0.67686546", "0.6750382", "0.66935253", "0.66822183", "0.6662716", "0.66460854", "0.6604041", "0.65375453", "0.65067184", "0.6494415", "0.6476432", "0.63979125", "0.63978326", "0.6390316", "0.63686526", "0.63609606", "0.63530684", "0.6350356", "0.63309795", "0.63292396", "0.6308025", "0.6299338", "0.62980473", "0.62787783", "0.62621355", "0.6260294", "0.624712", "0.6234382", "0.6226357", "0.6224344", "0.6224093", "0.62049365", "0.6203659", "0.618584", "0.61609644", "0.6159333", "0.61507857", "0.6127918", "0.6126371", "0.6125607", "0.6111252", "0.6089534", "0.6059326", "0.6045207", "0.60433817", "0.60317075", "0.60215145", "0.6021462", "0.60091716", "0.5991423", "0.5983329", "0.5976758", "0.59683365", "0.5952552", "0.5948076", "0.59417933", "0.59408754", "0.5930026", "0.59051776", "0.5900986", "0.58986956", "0.5891063", "0.58880484", "0.5881551", "0.58801705", "0.5878566", "0.58772504", "0.5876344", "0.5867198", "0.5866192", "0.58610064", "0.5860753", "0.58565825", "0.5844904", "0.5842583", "0.5841387", "0.583767", "0.5829696", "0.5820186", "0.58151716", "0.58104455", "0.5807296", "0.57976073", "0.5790037", "0.5789205", "0.5777843", "0.5774876", "0.5769476", "0.57569253", "0.57362944", "0.5734286", "0.573166", "0.57306296" ]
0.0
-1
Retrieves the string matching the given key from the resource bundle.
public static String getString(String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return "Message retrieval error, please notify an administrator."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getString(String key) {\n\t\tif (RESOURCE_BUNDLE == null) {\n\t\t\tthrow new IllegalStateException(\"RESOURCE BUNDLE not yet initialized.\");\n\t\t}\n\t\ttry {\n\t\t\treturn RESOURCE_BUNDLE.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\tif (bundles != null) {\n\t\t\t\t// look in added bundles\n\t\t\t\tfor (int i = 0; i < bundles.size(); i++) {\n\t\t\t\t\tResourceBundle bundle = bundles.get(i);\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn bundle.getString(key);\n\t\t\t\t\t} catch (MissingResourceException mre) {\n\t\t\t\t\t\t// resource not found\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// key unkown\n\t\t\treturn '!' + key + '!';\n\t\t}\n\t}", "public static String getResourceString(String key) {\n ResourceBundle bundle = IvyPlugin.getDefault().getResourceBundle();\n try {\n return (bundle != null) ? bundle.getString(key) : key;\n } catch (MissingResourceException e) {\n return key;\n }\n }", "public static String getResourceString(String key) {\n \t\tResourceBundle bundle = XSDEditorPlugin.getDefault().getResourceBundle();\n \t\ttry {\n \t\t\treturn (bundle != null) ? bundle.getString(key) : key;\n \t\t} catch (MissingResourceException e) {\n \t\t\treturn key;\n \t\t}\n \t}", "public static String getResourceString(String key)\n {\n ResourceBundle bundle = XMLPlugin.getDefault().getResourceBundle();\n\n try\n {\n return bundle.getString(key);\n }\n catch (MissingResourceException e)\n {\n return key;\n }\n }", "public static String getString(String key) {\n\t\ttry {\n\t\t\tResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;\n\t\t\treturn bundle.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\treturn key;\n\t\t}\n\t}", "public static String getResourceString(String key) {\r\n\t\tResourceBundle bundle = APLDebugCorePlugin.getDefault().getResourceBundle();\r\n\t\ttry {\r\n\t\t\treturn (bundle != null) ? bundle.getString(key) : key;\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn key;\r\n\t\t}\r\n\t}", "public static String getString(final String key) {\n return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);\n }", "protected String getString(String key) {\r\n\t\ttry {\r\n\t\t\tResourceBundle bundle = ResourceBundle.getBundle(bundleName);\r\n\t\t\treturn bundle.getString(key);\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "String getString(String bundleKey);", "public static String getString(String key) {\r\n\t\ttry {\r\n\t\t\treturn resourceBundle.getString(key);\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\tlogger.error(\"Unable to find key \" + key);\r\n\t\t\treturn '!' + key + '!';\r\n\t\t}\r\n\t}", "public String getString(String key) {\n try {\n return NbBundle.getBundle(bundleClass).getString(key);\n } catch (MissingResourceException e) {\n return null;\n }\n }", "protected String getResourceString (String key)\n {\n try {\n if (_bundle != null) {\n return _bundle.getString(key);\n }\n \n } catch (MissingResourceException mre) {\n Log.warning(\"Missing translation message \" +\n \"[bundle=\" + _path + \", key=\" + key + \"].\");\n }\n return null;\n }", "public String getString(String key)\r\n {\r\n debug(\"getString(\" + key + \") - retrieving Key...\");\r\n String value = null;\r\n try\r\n {\r\n value = getResourceBundle().getString(key);\r\n }\r\n catch (MissingResourceException e)\r\n {\r\n System.out.println(\"java.util.MissingResourceException: \" + \"Couldn't find value for: \" + key);\r\n }\r\n if (value == null)\r\n {\r\n value = \"Could not find resource: \" + key + \" \";\r\n }\r\n debug(\"getString(\" + key + \") - value ==> \" + value);\r\n debug(\"getString(\" + key + \") - retrieving Key...Done\");\r\n return value;\r\n }", "protected String getFromBundle(String key) {\r\n return bundle.getString(key);\r\n }", "public static String getString(String key) {\n\t\ttry {\n\t\t\treturn RESOURCE_BUNDLE.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\treturn '!' + key + '!';\n\t\t}\n\t}", "public String getString( String key )\n {\n String translation = key;\n\n if ( specificResourceBundle != null )\n {\n try\n {\n translation = specificResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n if ( translation.equals( key ) && globalResourceBundle != null )\n {\n try\n {\n translation = globalResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n return translation;\n }", "public static String getString(String key) throws MissingResourceException {\n\t\treturn resourceBundle.getString(key);\n\t}", "public static String getString(String key, ResourceBundle resourceBundle) {\n if (resourceBundle == null) {\n return KEY_NOT_FOUND_PREFIX + key + KEY_NOT_FOUND_SUFFIX;\n }\n log.debug(\"Getting key\" + key + \"in\" + resourceBundle.toString()); //$NON-NLS-1$ //$NON-NLS-2$\n try {\n return resourceBundle.getString(key);\n } catch (MissingResourceException e) {\n return KEY_NOT_FOUND_PREFIX + key + KEY_NOT_FOUND_SUFFIX;\n }\n }", "public static String getLabelBundle(String key){\r\n \tFacesContext context = FacesContext.getCurrentInstance();\r\n \tResourceBundle bundle = context.getApplication().getResourceBundle(context, Constantes.RESOURCE_BUNDLE_VAR);\r\n \treturn bundle.getString(key);\r\n }", "String getString(String bundleKey, String bundleBaseName);", "public static String getString(String key) {\n try {\n return RESOURCE_BUNDLE.getString(key); // Devuelve una entrada de la tabla \n } catch (MissingResourceException e) {\n return '!' + key + '!';\n }\n }", "public static String getString(final String key) {\n\t\ttry {\n\t\t\treturn ResourceBundle.getBundle(\"gradebookng\", getUserPreferredLocale()).getString(key);\n\t\t} catch (final MissingResourceException e) {\n\t\t\treturn '!' + key + '!';\n\t\t}\n\t}", "String getString(String bundleKey, Locale locale);", "public String getString(String key);", "public String get (String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (key.startsWith(TAINT_CHAR)) {\n return key.substring(1);\n }\n \n String msg = getResourceString(key);\n return (msg != null) ? msg : key;\n }", "public static String getValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"message\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "String getString(String bundleKey, String bundleBaseName, Locale locale);", "public static String getLabel(String key){\r\n \tFacesContext context = FacesContext.getCurrentInstance();\r\n \tString el = String.format(\"#{%s['%s']}\", Constantes.RESOURCE_BUNDLE_VAR,key);\r\n return context.getApplication().evaluateExpressionGet(context, el, String.class);\r\n }", "protected String getResourceString(String key)\r\n\t\t\tthrows MissingResourceException {\r\n\t\treturn StripesFilter.getConfiguration().getLocalizationBundleFactory()\r\n\t\t\t\t.getErrorMessageBundle(locale).getString(key);\r\n\t\t\r\n\t}", "String getString(String key);", "public String getString(String key, Object s1) {\n return MessageFormat.format(Platform.getResourceBundle(getBundle()).getString(key), new Object[]{s1});\n }", "private String getString(String key) {\n return key;\r\n }", "public static String s(String key) {\n\t\treturn RES.getString(key);\n\t}", "public static String getlocalizedString(String bundleName, String strKey) {\n ResourceBundle bundle = getResourceBundle(bundleName);\n return bundle.getString(strKey);\n }", "static private String getString(String key) {\n try {\n return removeMnemonic(_resources.getString(key));\n } catch (MissingResourceException mre) {\n return \"Missing resource for: \" + key;\n }\n }", "public String getBundleString(String key){\n return dataProcessToolPanel.getBundleString(key);\n }", "protected String getProperty(String key) {\r\n\t\ttry {\r\n\t\t\tif (null == key || (\"\").equals(key.trim())) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn rb.getString(key);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tLOG.error(\"Can't find key \" + key + \"in resource bundle file\", ex);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "static private String getRawString(String key) {\n try {\n return _resources.getString(key);\n } catch (MissingResourceException mre) {\n return \"Missing resource for: \" + key;\n }\n }", "public static String getProperty(final String key) {\n String str = null;\n if (resourceBundle != null) {\n str = resourceBundle.getString(key);\n LOGGER.debug(\"Value found: \" + str + \" for key: \" + key);\n } else {\n LOGGER.debug(\"Properties file was not loaded correctly!!\");\n }\n return str;\n }", "public String getString(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (String) extGet(key);\n\t}", "private String getLocalizedString(String key) {\n\t\treturn new StringResourceModel(key, null).getObject();\n\t}", "private static String getString(String key) {\r\n\t\treturn ConfmlFeatureEditorPlugin.INSTANCE.getString(key);\r\n\t}", "public String getString(final String key) {\r\n return messages.getString(key);\r\n }", "public String getString(String key) {\n return mPref.getString(key, null);\n }", "public static String getString(String key) {\n\t\tif (rb == null)\n\t\t\treinit();\n\n\t\tif (rb.containsKey(key)) {\n\t\t\treturn rb.getString(key);\n\t\t} else {\n\t\t\tLOG.warning(String.format(PermMessages._loc_noval, key));\n\t\t\treturn no_value;\n\t\t}\n\t}", "@Override\n public String getString(String key) {\n return getStringFromBundle(key, BASE_STRING) + \" \" + random.nextInt(RANDOM_INT_BOUND);\n }", "public String getString(String key)\n {\n return getString(key, null);\n }", "@Override\n\tprotected Object handleGetObject(String key) {\n\t\treturn _resourceBundle.getObject(key);\n\t}", "String get(Integer key);", "protected String getKeyAndLookupInBundle(FacesContext context,\n \t\t\t\t\t UIComponent component, \n \t\t\t\t\t String keyAttr) throws MissingResourceException{\n \tString key = null, bundleName = null;\n \tResourceBundle bundle = null;\n \n \tParameterCheck.nonNull(context);\n \tParameterCheck.nonNull(component);\n \tParameterCheck.nonNull(keyAttr);\n \n key = (String) component.getAttribute(keyAttr);\n bundleName = (String)component.getAttribute(RIConstants.BUNDLE_ATTR);\n \n // if the bundleName is null for this component, it might have\n // been set on the root component.\n if ( bundleName == null ) {\n UIComponent root = context.getTree().getRoot();\n Assert.assert_it(root != null);\n bundleName = (String)root.getAttribute(RIConstants.BUNDLE_ATTR);\n }\n \t// verify our component has the proper attributes for key and bundle.\n \tif (null == key || null == bundleName) {\n \t throw new MissingResourceException(Util.getExceptionMessage(\n Util.MISSING_RESOURCE_ERROR_MESSAGE_ID),bundleName, key);\n \t}\n \t\n \t// verify the required Class is loadable\n \t// PENDING(edburns): Find a way to do this once per ServletContext.\n \tif (null == Thread.currentThread().getContextClassLoader().\n \t getResource(\"javax.servlet.jsp.jstl.fmt.LocalizationContext\")){\n \t Object [] params = { \"javax.servlet.jsp.jstl.fmt.LocalizationContext\" };\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_CLASS_ERROR_MESSAGE_ID, params), bundleName, key);\n \t}\n \t\n \t// verify there is a ResourceBundle for this modelReference\n \tjavax.servlet.jsp.jstl.fmt.LocalizationContext locCtx = null;\n \tif (null == (locCtx = (javax.servlet.jsp.jstl.fmt.LocalizationContext) \n \t\t context.getModelValue(bundleName)) ||\n \t null == (bundle = locCtx.getResourceBundle())) {\n \t throw new MissingResourceException(Util.getExceptionMessage(Util.MISSING_RESOURCE_ERROR_MESSAGE_ID), bundleName, key);\n \t}\n \t\n \treturn bundle.getString(key);\n }", "public static String getConfigValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"config\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "protected String get(String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (MessageUtil.isTainted(key))\n {\n return MessageUtil.untaint(key);\n }\n try\n {\n return _msgs.getString(key);\n }\n catch (MissingResourceException mre)\n {\n log.warning(\"Missing translation message '\" + key + \"'.\");\n return key;\n }\n }", "public static String lookup(String baseName, String key)\r\n {\r\n return lookup(baseName, key, null, null, null);\r\n }", "public String get(String key) {\n return getData().get(key);\n }", "final String get(String key) {\n return get(key,null);\n }", "public static String getMsg(String file, String key) {\n\n ResourceBundle bundle = getBundle(file);\n return getMsg(bundle, key);\n }", "static public String getEjsString(String key) {\r\n\t\ttry {\r\n\t\t\treturn ejsRes.getString(key);\r\n\t\t} catch (Exception exc) {\r\n\t\t\texc.printStackTrace();\r\n\t\t\treturn key;\r\n\t\t}\r\n\t}", "public String getString(@NonNull final String key) {\n return getString(key, null);\n }", "public String getString(short dictionaryKey) {\n\t\treturn stringsMap.get(dictionaryKey);\n\t}", "protected TextResource getTextResourceByName(String key) throws JspException{\n\t\ttry{\n\t\t\tList<TextResource> resources = getResourceDataService().getTextResourcesByProperty(TextResource.PROP_NAME, key);\n\t\t\tif (resources==null || resources.size()==0)\n\t\t\t\treturn null;\n\t\t\treturn resources.get(0);\n\t\t}catch(ASGRuntimeException e){\n\t\t\tlog.error(\"getTextResourceByName(\"+key+\")\", e);\n\t\t\tthrow new JspException(e);\n\t\t}\n\t}", "String getString( String key, String def);", "public String getAsString(String key) {\n return entries.getProperty(key);\n }", "public static String getStringForKey(String key)\n\t{\n\t\treturn PreferencesModel.instance().getUserStringPref(key, null);\n\t}", "public static String getMessageResourceString(String key, String lang) {\n\t\tif(lang == null) {\n\t\t\tlang = \"en\";\n\t\t}\n\t\t\n\t\tResourceBundle bundle = ResourceBundle.getBundle(Constants.RESOURCE_BUNDLE + \"_\" + lang);\t\t\n\t\t\n\t\tString text = null;\n\t\ttry {\n\t\t\ttext = bundle.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\ttext = \"?? key \" + key + \" not found ??\";\n\t\t}\n\t\t\n\t\treturn text;\n\t}", "public static String getString(String key) {\n try {\n return ctxPropertiesMap.get(key);\n } catch (MissingResourceException e) {\n return null;\n }\n }", "public String get(String key) {\n\t\tif (fileData.containsKey(key)) {\n\t\t\treturn fileData.get(key);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Couldn't find \" + key);\n\t\t\treturn \"\";\n\t\t}\n\t}", "String getString(String key) throws KeyValueStoreException;", "public static String getString(String key, ResourceBundle resourceBundle, Object... args) {\n return MessageFormat.format(getString(key, resourceBundle).replaceAll(SINGLE_QUOTE, SINGLE_QUOTE_MUTI), args);\n }", "public String getString(String key) {\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\tsp = (String) getDefault(key);\n\t\t}\n\t\treturn sp;\n\t}", "public static Integer getInteger(String key)\n\t\t\tthrows MissingResourceException {\n\t\treturn Integer.valueOf(resourceBundle.getString(key));\n\t}", "String getSecretByKey(String key);", "public String getString(String key) {\r\n String value = (String) keyvaluepairs.get(key.toLowerCase());\r\n return value == null ? \"\" : value;\r\n }", "public static String getMsg(ResourceBundle bundle, String key) {\n\n return getMsg(bundle, key, new Object[] {});\n }", "public String str(String key) throws AgentBuilderRuntimeException {\n\t\treturn getString(key);\n\t}", "public String retrieveParam(String key) {\n return this.argsDict.get(key);\n }", "public static String getStringInRcse(int resourceId) {\n Resources resource = null;\n String string = null;\n try {\n resource =\n AndroidFactory.getApplicationContext().getPackageManager()\n .getResourcesForApplication(CoreApplication.APP_NAME);\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n if (null != resource) {\n string = resource.getString(resourceId);\n } else {\n Logger.e(TAG, \"getStringInRcse(), resource is null!\");\n }\n return string;\n }", "public static String getResource(String key) {\n return MicrosoftDataEncryptionExceptionResource.getBundle(\"com.microsoft.data.encryption.cryptography.MicrosoftDataEncryptionExceptionResource\").getString(key);\n }", "public static String readString(Context context, String key) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\treturn sp.getString(key, \"\");\n\t}", "public String lookup(String key){\n Node N;\n N = findKey(root, key);\n return ( N == null ? null : N.item.value );\n }", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public static String get(String key) {\n Jedis jedis = null;\n String rtn = null;\n try {\n jedis = getJedis();\n rtn = jedis.get(key);\n } catch (Exception e) {\n\n jedispool.returnBrokenResource(jedis);\n } finally {\n returnResource(jedispool, jedis);\n }\n return rtn;\n }", "public static String getProperty( String key )\r\n {\r\n if (System.getProperties().containsKey( key ))\r\n {\r\n return System.getProperty( key );\r\n }\r\n return _resourceBundle.getString( key );\r\n }", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "Object get(String key);", "Object get(String key);", "public String get(String key) {\n return this.map.get(key);\n }", "public Object get(String key);", "public String get(String key) {\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\tString value = null;\n\t\ttry {\n\t\t\t//try matching the pattern: key : value\\n \n\t\t\tPattern pattern = Pattern.compile(key+\" : (.*?)\\n\");\n\t\t\t\n\t\t\tMatcher matcher = pattern.matcher(text);\n\t\t\tmatcher.find();\n\t\t\t\n\t\t\t//get the value\n\t\t\tvalue = matcher.group(1);\n\t\t\t\n\t\t}catch(Exception e) {/*do nothing*/}\n\t\t\n\t\treturn value;\n\t}", "public abstract String getLocalizationKey();", "public String getString(String key, String defaultValue);", "public String getString(String key, String defaultValue);", "public String getString(String key) {\n return (String) commandData.get(key);\n }", "public String get(String key) {\n return mMap.get(key);\n }", "public static String getExtraString(Activity context, String key) {\n \tString param = \"\";\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.getString(key);\n \t}\n \treturn param;\n\t}", "public Object get(Object key)\r\n\t{\r\n\r\n\t\tint index;\r\n\t\tString orDefault = null;\r\n\t\tString k = (String) key;\r\n\t\tif ((index = k.indexOf(DEFAULT_ID)) > 0) {\r\n\t\t\torDefault = k.substring(index+DEFAULT_ID.length());\r\n\t\t\tk = k.substring(0,index);\r\n\t\t\tkey = k;\r\n\t\t}\r\n\t\tValidate.notEmpty(k, \"Empty key passed as parameter for call to get(key)\");\r\n\t\tif ((index = k.indexOf(':')) > 0 && index < k.length() - 1) {\r\n\t\t\tif (index == LANG_REF.length() && k.startsWith(LANG_REF)) {\r\n\t\t\t\treturn new LanguageLocale().getLang(this,k);\r\n\t\t\t} else if (index == REPLACE_REF.length() && k.startsWith(REPLACE_REF)) {\r\n\t\t\t\treturn org.xmlactions.action.utils.StringUtils.replace(this, replace(k));\r\n\t\t\t} else if (index == THEME_REF.length() && k.startsWith(THEME_REF)) {\r\n\t\t\t\treturn getThemeValueQuietly(k.substring(index + 1));\r\n\t\t\t} else if (index == APPLICATIONCONTEXT_REF.length() && k.startsWith(APPLICATIONCONTEXT_REF)) {\r\n\t\t\t\treturn getApplicationContext().getBean(k.substring(index + 1));\r\n\t\t\t} else if (index == CODE_REF.length() && k.startsWith(CODE_REF)) {\r\n\t\t\t\tCodeParser codeParser = new CodeParser();\r\n\t\t\t\treturn codeParser.parseCode(this, k.substring(index + 1));\r\n\t\t\t} else {\r\n\t\t\t\tMap<String, Object> map = getMap(k.substring(0, index));\r\n\t\t\t\tif (map != null) {\r\n\t\t\t\t\tString [] keys = k.substring(index + 1).split(\"/\");\r\n\t\t\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\t\t\tk = keys[keyIndex];\r\n\t\t\t\t\t\tObject obj = map.get(k);\r\n\t\t\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t String s = (String)obj;\r\n\t if (s.startsWith(\"${\") && s.indexOf(k) == 2) {\r\n\t obj = \"[\" + k + \"]\";\r\n\t } else {\r\n\t obj = replace((String)obj);\r\n\t }\r\n\t\t\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\t\t\treturn obj;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn obj;\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\treturn orDefault;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString [] keys = k.split(\"/\");\r\n\t\t\tObject obj = null;\r\n\t\t\tMap map = null;\r\n\t\t\tfor (int keyIndex = 0 ; keyIndex < keys.length; keyIndex++ ) {\r\n\t\t\t\tk = keys[keyIndex];\r\n\r\n\t\t\t\tif (keyIndex == 0) {\r\n\t\t\t\t\tif (rootMap.containsKey(k)) {\r\n\t\t\t\t\t\tobj = rootMap.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif (applicationContext != null) {\r\n\t\t\t\t\t\t\t\tobj = applicationContext.getBean((String)k);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Throwable t) {\r\n\t\t log.info(t.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (map.containsKey(k)) {\r\n\t\t\t\t\t\tobj = map.get(k);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (obj != null && obj instanceof String) {\r\n\t\t\t\t\tobj = replace((String)obj);\r\n\t\t\t\t} else if (obj == null){\r\n\t\t\t\t\tobj = orDefault;\r\n\t\t\t\t}\r\n\t\t\t\tif(keyIndex+1 >= keys.length) {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t\tif (obj instanceof Map) {\r\n\t\t\t\t\tmap = (Map)obj;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn obj;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn orDefault;\r\n\t\t}\r\n\t}", "private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}", "public static String getValue(String key) {\r\n\t\tload();\r\n\t\treturn properties.getProperty(key);\r\n\t}", "public static String get(String key) {\n return properties.getProperty(key);\n }", "public String getComponent(@NonNull Group group, @NonNull String key) {\n String string = group.getString(null, key, \"\");\n if (string == null || string.isEmpty()) return null;\n return BukkitUtils.build(string);\n }", "public String Str(String key) throws AgentBuilderRuntimeException {\n\t\treturn getString(key);\n\t}" ]
[ "0.8215868", "0.8102541", "0.8037984", "0.8025744", "0.7964464", "0.7948834", "0.79198104", "0.78983355", "0.7874854", "0.7857909", "0.78573805", "0.7794668", "0.7756095", "0.7741023", "0.7739408", "0.7713165", "0.7695462", "0.7670945", "0.75337905", "0.745774", "0.7455634", "0.7405468", "0.73526305", "0.73456633", "0.7319697", "0.73116004", "0.7295675", "0.72884095", "0.7098247", "0.7095891", "0.70804644", "0.70606536", "0.70481074", "0.70392853", "0.70173573", "0.70163405", "0.69382864", "0.68454236", "0.67811024", "0.6752081", "0.66965544", "0.66765296", "0.6629349", "0.6623396", "0.65797395", "0.65610725", "0.65534043", "0.6549729", "0.6474187", "0.6449953", "0.6440608", "0.64353406", "0.64249307", "0.6313755", "0.6309308", "0.63066626", "0.6304899", "0.6298619", "0.6274116", "0.62557405", "0.6243476", "0.6241897", "0.6230931", "0.62262064", "0.62173116", "0.6171426", "0.615766", "0.6155776", "0.6136889", "0.61270505", "0.6125788", "0.6117223", "0.6116398", "0.61159784", "0.61022013", "0.6099897", "0.60930645", "0.609062", "0.6076747", "0.6067791", "0.6063698", "0.6054873", "0.6041292", "0.603691", "0.603691", "0.60325277", "0.60149395", "0.60066056", "0.60021347", "0.5999275", "0.5999275", "0.59973526", "0.59791183", "0.59567255", "0.5949948", "0.5949867", "0.5942372", "0.5920544", "0.59177303", "0.59176874" ]
0.7344434
24
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.category_catchange, container, false); progressDialog = new ProgressDialog(getActivity()); // db = new DBHandler(getActivity()); userPreferences = UserPreferences.getInstance(getActivity()); sealUsed = new ArrayList<String>(6); sealUsed.add(" "); sealUsed.add(" "); sealUsed.add(" "); sealUsed.add(" "); sealUsed.add(" "); sealUsed.add(" "); ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle("CATEGORY CHANGE+"); Bundle bundle = getArguments(); //orderData = (McrOrederProxie) bundle.getSerializable("orderData"); if (userPreferences.getLocalMsgId().equalsIgnoreCase("U01")) { mcrOrderProxie = (McrOrderProxie) bundle.getSerializable("orderData"); } else { mcrOrderProxieOtherConn = (McrOrderProxieOtherConn) bundle.getSerializable("orderData"); } // seva kendra spin_purpose = (Spinner) rootView.findViewById(R.id.spin_purpose); spin_usage = (Spinner) rootView.findViewById(R.id.spin_usage); spin_purpose.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { if (i == 0) { usageArr = getResources().getStringArray(R.array.usage_array0); usageArrSub = getResources().getStringArray(R.array.usage_array_sub0); } else if (i == 1) { usageArr = getResources().getStringArray(R.array.usage_array1); usageArrSub = getResources().getStringArray(R.array.usage_array_sub1); } else if (i == 2) { usageArr = getResources().getStringArray(R.array.usage_array2); usageArrSub = getResources().getStringArray(R.array.usage_array_sub2); } else if (i == 3) { usageArr = getResources().getStringArray(R.array.usage_array3); usageArrSub = getResources().getStringArray(R.array.usage_array_sub3); } else if (i == 4) { usageArr = getResources().getStringArray(R.array.usage_array4); usageArrSub = getResources().getStringArray(R.array.usage_array_sub4); } else if (i == 5) { usageArr = getResources().getStringArray(R.array.usage_array5); usageArrSub = getResources().getStringArray(R.array.usage_array_sub5); } else { usageArr = getResources().getStringArray(R.array.usage_array0); usageArrSub = getResources().getStringArray(R.array.usage_array_sub0); } spin_usage.setAdapter(new SpinnerAdapterFilter(getActivity(), R.layout.custom_spinner, usageArr, usageArrSub)); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); //usageArr = getResources().getStringArray(R.array.usage_array); //usageArrSub = getResources().getStringArray(R.array.usage_array_sub); // seva kendra usageArr = getResources().getStringArray(R.array.usage_array0); usageArrSub = getResources().getStringArray(R.array.usage_array_sub0); // seva kendra spin_usage.setAdapter(new SpinnerAdapterFilter(getActivity(), R.layout.custom_spinner, usageArr, usageArrSub)); spin_usage.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (position != 0) { TextView pmTypeText = (TextView) view.findViewById(R.id.text_main_seen); TextView pmTypeID = (TextView) view.findViewById(R.id.sub_text_seen); spinUsageVal = pmTypeID.getText().toString(); //String compID = String.valueOf(reqId.getText().toString()); } else { spinUsageVal = "0"; } } @Override public void onNothingSelected(AdapterView<?> parent) { } }); description = (EditText) rootView.findViewById(R.id.description); scanmeter = (Button) rootView.findViewById(R.id.scanmeter); devicenumber = (EditText) rootView.findViewById(R.id.devicenumber); radiostickerinstall = (RadioGroup) rootView.findViewById(R.id.radiostickerinstall); valStickerinstall = ((RadioButton) rootView.findViewById(radiostickerinstall.getCheckedRadioButtonId())).getText().toString(); final LinearLayout stickerll = (LinearLayout) rootView.findViewById(R.id.stickerll); stickernumber = (EditText) rootView.findViewById(R.id.stickernumber); radiostickerinstall.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valStickerinstall = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); if (valStickerinstall.equalsIgnoreCase("Yes")) { stickerll.setVisibility(View.VISIBLE); } else { stickerll.setVisibility(View.GONE); stickernumber.setText(""); } } }); //devicenumber.setText(orderData.getDEVICENO()); radioelcbinstall = (RadioGroup) rootView.findViewById(R.id.radioelcbinstall); valelcbinstall = ((RadioButton) rootView.findViewById(radioelcbinstall.getCheckedRadioButtonId())).getText().toString(); final LinearLayout elcbbasedll = (LinearLayout) rootView.findViewById(R.id.elcbbasedll); radioelcbinstall.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valelcbinstall = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); if (valelcbinstall.equalsIgnoreCase("Yes")) { // elcbbasedll.setVisibility(View.VISIBLE); valelcbinstall = "Yes"; } else { valelcbinstall = "No"; } } }); radioInstalledBus = (RadioGroup) rootView.findViewById(R.id.radioinstalledbus); final LinearLayout busbarmainll = (LinearLayout) rootView.findViewById(R.id.busbarinstalled_ll); final LinearLayout busbarll = (LinearLayout) rootView.findViewById(R.id.busbarll); dropbussize = (Spinner) rootView.findViewById(R.id.dropbussize); dropbussizecust = (Spinner) rootView.findViewById(R.id.dropbussizecust); busnumber = (EditText) rootView.findViewById(R.id.busnumber); busbarcablesize = (Spinner) rootView.findViewById(R.id.busbarcablesize); drumnumberbb = (EditText) rootView.findViewById(R.id.drumnumberbb); // new radiocableinstalltypebb = (RadioGroup) rootView.findViewById(R.id.radiocableinstalltypebb); valInstallTypebb = ((RadioButton) rootView.findViewById(radiocableinstalltypebb.getCheckedRadioButtonId())).getText().toString(); radiocableinstalltypebb.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valInstallTypebb = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); } }); runninglengthfrombb = (EditText) rootView.findViewById(R.id.runninglengthfrombb); // new runninglengthtobb = (EditText) rootView.findViewById(R.id.runninglengthtobb); // new cablelengthbb = (EditText) rootView.findViewById(R.id.cablelengthbb); cablelengthbb.setEnabled(true); cablelengthbb.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (runninglengthfrombb.getText().toString().trim().isEmpty()) { return false; } else { if (!runninglengthtobb.getText().toString().trim().isEmpty()) { frombb = Integer.parseInt(runninglengthfrombb.getText().toString().trim()); tobb = Integer.parseInt(runninglengthtobb.getText().toString().trim()); if (frombb < tobb || frombb == tobb) { int result = tobb - frombb; if (result < 0) { // return false; } else { cablelengthbb.setText(Integer.toString(result)); } } else { Snackbar.make(getView(), "From length should be less than to length!!", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); cablelengthbb.setText(""); runninglengthtobb.setText(""); } } } return false; } }); final LinearLayout busbarcablesize_layout = (LinearLayout) rootView.findViewById(R.id.busbarcablesize_layout); final LinearLayout busbarcustomerll = (LinearLayout) rootView.findViewById(R.id.busbarcustomerll); valInstalledBus = ((RadioButton) rootView.findViewById(radioInstalledBus.getCheckedRadioButtonId())).getText().toString(); final LinearLayout radiocustomerbusll = (LinearLayout) rootView.findViewById(R.id.radiocustomerbusll); radioInstalledBus.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valInstalledBus = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); if (valInstalledBus.equalsIgnoreCase("Yes")) { radiocustomerbusll.setVisibility(View.GONE); busbarmainll.setVisibility(View.VISIBLE); dropbussizecustVal = ""; } else if (valInstalledBus.equalsIgnoreCase("Old")) { busbarmainll.setVisibility(View.VISIBLE); radiocustomerbusll.setVisibility(View.VISIBLE); } else { busbarmainll.setVisibility(View.GONE); radiocustomerbusll.setVisibility(View.GONE); dropbussizecustVal = ""; } } }); radiocustomerbus = (RadioGroup) rootView.findViewById(R.id.radiocustomerbus); radiocustomerbus.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valcustomerinstall = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); if (valcustomerinstall.equalsIgnoreCase("BSES Bus-Bar")) { // elcbbasedll.setVisibility(View.VISIBLE); dropbussizecustVal = ""; busbarcustomerll.setVisibility(View.GONE); busbarll.setVisibility(View.VISIBLE); } else { dropbussizecustVal = dropbussizecust.getSelectedItem().toString(); busbarcustomerll.setVisibility(View.VISIBLE); busbarll.setVisibility(View.GONE); } } }); dropreason = (Spinner) rootView.findViewById(R.id.dropreason); dropreason.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (position == 0) { valdropreason = "01"; } else { valdropreason = "01"; } } @Override public void onNothingSelected(AdapterView<?> parent) { } }); dropreasonre = (Spinner) rootView.findViewById(R.id.dropreasonre); dropreasonre.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (position == 0) { valdropreason = "09"; } else { valdropreason = "09"; } } @Override public void onNothingSelected(AdapterView<?> parent) { } }); dropcablesize = (Spinner) rootView.findViewById(R.id.dropcablesize); drumnumber = (EditText) rootView.findViewById(R.id.drumnumber); outputcablelength = (EditText) rootView.findViewById(R.id.outputcablelength); radiocableinstalltype = (RadioGroup) rootView.findViewById(R.id.radiocableinstalltype); valInstallType = ((RadioButton) rootView.findViewById(radiocableinstalltype.getCheckedRadioButtonId())).getText().toString(); radiocableinstalltype.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { valInstallType = ((RadioButton) group.getRootView().findViewById(checkedId)).getText().toString(); } }); runninglengthfrom = (EditText) rootView.findViewById(R.id.runninglengthfrom); runninglengthto = (EditText) rootView.findViewById(R.id.runninglengthto); cablelength = (EditText) rootView.findViewById(R.id.cablelength); cablelength.setEnabled(true); cablelength.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (runninglengthfrom.getText().toString().trim().isEmpty()) { return false; } else { if (!runninglengthto.getText().toString().trim().isEmpty()) { from = Integer.parseInt(runninglengthfrom.getText().toString().trim()); to = Integer.parseInt(runninglengthto.getText().toString().trim()); if (from < to || from == to) { int result = to - from; if (result < 0) { // return false; } else { cablelength.setText(Integer.toString(result)); } } else { Snackbar.make(getView(), "From length should be less than to length!!", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); cablelength.setText(""); runninglengthto.setText(""); } } } return false; } }); validateseal = (Button) rootView.findViewById(R.id.validateseal); validateseal.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { punchDataWS task = new punchDataWS(); //Call execute task.execute(); } }); Button button1 = (Button) rootView.findViewById(R.id.next2); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mcrOrderProxieOtherConn.setStrPURPOSE_S5(spinUsageVal); mcrOrderProxieOtherConn.setStrDESC_S5(description.getText().toString()); Fragment fragment = new PhotosAndID(); Bundle bundle = new Bundle(); bundle.putSerializable("orderData", mcrOrderProxieOtherConn); fragment.setArguments(bundle); FragmentManager fm = getFragmentManager(); FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.replace(R.id.fragment_place, fragment, TAG_FRAGMENT); fragmentTransaction.addToBackStack(TAG_FRAGMENT); fragmentTransaction.commit(); } }); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
Defines all parameters (index manager suppliers) Use supplier functions as parameters instead of concrete InvertedIndexManager instances to allow reinstantiation for each test case.
@Parameterized.Parameters public static Collection indexManagerSuppliers() { return Arrays.<Supplier<InvertedIndexManager>>asList( () -> InvertedIndexManager.createOrOpen( indexDir, new NaiveAnalyzer() ), () -> InvertedIndexManager.createOrOpenPositional( indexDir, new NaiveAnalyzer(), new NaiveCompressor() ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SupplierIndexService {\n\n /**\n * 供应商全量脚本\n */\n @Export\n Response<Boolean> fullDump();\n\n /**\n * 供应商增量脚本\n * @param interval 时间间隔,单位分钟,一般为15分钟\n */\n @Export(paramNames = {\"interval\"})\n Response<Boolean> deltaDump(int interval);\n\n /**\n *\n * @param ids 供应商id列表\n * @param status 供应商状态\n */\n Response<Boolean> realTimeIndex(List<Long> ids, User.SearchStatus status);\n}", "private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "protected abstract void initialize(List<Sample> samples, QueryGenerator queryGenerator);", "protected void initIndependentParamLists() {\n\n\t\t// params that the mean depends upon\n\t\tmeanIndependentParams.clear();\n\t\tmeanIndependentParams.addParameter(distanceJBParam);\n\t\tmeanIndependentParams.addParameter(willsSiteParam);\n\t\tmeanIndependentParams.addParameter(magParam);\n\t\tmeanIndependentParams.addParameter(fltTypeParam);\n\t\tmeanIndependentParams.addParameter(componentParam);\n\n\t\t// params that the stdDev depends upon\n\t\tstdDevIndependentParams.clear();\n\t\tstdDevIndependentParams.addParameter(stdDevTypeParam);\n\t\tstdDevIndependentParams.addParameter(componentParam);\n\t\tstdDevIndependentParams.addParameter(magParam);\n\n\t\t// params that the exceed. prob. depends upon\n\t\texceedProbIndependentParams.clear();\n\t\texceedProbIndependentParams.addParameter(distanceJBParam);\n\t\texceedProbIndependentParams.addParameter(willsSiteParam);\n\t\texceedProbIndependentParams.addParameter(magParam);\n\t\texceedProbIndependentParams.addParameter(fltTypeParam);\n\t\texceedProbIndependentParams.addParameter(componentParam);\n\t\texceedProbIndependentParams.addParameter(stdDevTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncTypeParam);\n\t\texceedProbIndependentParams.addParameter(this.sigmaTruncLevelParam);\n\n\t\t// params that the IML at exceed. prob. depends upon\n\t\timlAtExceedProbIndependentParams.addParameterList(\n\t\t\t\texceedProbIndependentParams);\n\t\timlAtExceedProbIndependentParams.addParameter(exceedProbParam);\n\n\t}", "public SimpleIndexFactory() {\n\t}", "public Indexer() {\n }", "private SolrIndexer()\n {\n fieldMap = new HashMap<String, String[]>();\n transMapMap = new HashMap<String, Map<String, String>>();\n customMethodMap = new HashMap<String, Method>();\n customMixinMap = new HashMap<String, SolrIndexerMixin>();\n indexDate = new Date();\n }", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "@Test(dataProvider = \"data_buildIndex_ok\")\npublic void test_buildIndex(String testDesc, String startPath, List<Integer> expRes) {\n log.info(\"{}... started\", testDesc);\n LocalMusicIndexer lmi = new LocalMusicIndexer(startPath);\n lmi.buildIndex();\n Integer numOfTracks = lmi.getNumOfTracks();\n Integer numOfTracksSelected = lmi.getNumOfTracksSelected();\n TreeMap<Long, HashMap<String, Object>> flatMusicIndex = lmi.getFlatMusicIndex();\n assertEquals(lmi.getMusicIndex().getNumOfArtists(), expRes.get(0));\n assertEquals(flatMusicIndex.size(), (int)expRes.get(1));\n assertEquals(numOfTracks, expRes.get(2));\n assertEquals(numOfTracksSelected, expRes.get(2));\n\n lmi.calcResolvBaseMaps(\"path\");\n\n lmi.getMusicIndex().findEntry(10000000000L);\n Track tr = ((Track)lmi.getMusicIndex().findEntry(10000050110L));\n tr.setSelected(false);\n numOfTracksSelected = lmi.getNumOfTracksSelected();\n assertEquals(numOfTracksSelected, expRes.get(3));\n\n TreeMap<Long, HashMap<String, Object>> flatMusicIndex_new = lmi.getFlatMusicIndex();\n assertEquals(flatMusicIndex_new.size(), (int)expRes.get(4));\n log.info(\"{}... finished\", testDesc);\n}", "@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }", "protected StoreParams() {\n this.setBatchSize(BATCH_SIZE_DEFAULT);\n this.setNumSyncBatches(NUM_SYNC_BATCHES_DEFAULT);\n this.setSegmentFileSizeMB(SEGMENT_FILE_SIZE_MB_DEFAULT);\n this.setSegmentCompactFactor(SEGMENT_COMPACT_FACTOR_DEFAULT);\n this.setHashLoadFactor(HASH_LOAD_FACTOR_DEFAULT);\n this.setIndexesCached(INDEXES_CACHED_DEFAULT);\n }", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "public ProductIndexQuery() {\n\t}", "protected void setupParameters() {\n \n \n\n }", "public PPIndexManager(FileHelper file_helper) {\n\t\tthis.file_helper = file_helper;\n\t}", "public <K> IRepositoryIndex<K, V> configureIndex(\n\t\tshort index,\n\t\tboolean mutable,\n\t\tFunction<K, V> defaultSupplier,\n\t\tFunction<V, K> getKeyFromValue, \n\t\tFunction <K, byte[]> getKeyBytesFromKey\n\t) throws Exception;", "public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}", "private IndexHandler (boolean test) throws IOException {\n analyzer = new StandardAnalyzer();\n indexDir = test ? new RAMDirectory() : new DistributedDirectory(new MongoDirectory(mongoClient, \"search-engine\", \"index\"));\n //storePath = storedPath;\n config = new IndexWriterConfig(analyzer);\n\n // write separate IndexWriter to RAM for each IndexHandler\n // writer will have to be manually closed with each instance call\n // see IndexWriter documentation for .close()\n // explaining continuous closing of IndexWriter is an expensive operation\n try {\n writer = new IndexWriter(indexDir, config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;", "@Override\n public void setupIndex() {\n List lst = DBClient.getList(\"SELECT a FROM AppMenu a WHERE a.moduleName='MyBranchMemberExt'\");\n if (lst!=null && !lst.isEmpty()) {\n return;\n }\n AppMenu.createAppMenuObj(\"MyBranchMemberExt\", \"Main\", \"Branch Member\", 110).save();\n AppMenu.createAppMenuObj(\"MyCenterMemberExt\", \"Main\", \"Center Member\", 120).save();\n AppMenu.createAppMenuObj(\"SearchAllMembersOnlyExt\", \"Main\", \"Search Member\", 130).save();\n AppMenu.createAppMenuObj(\"ReferenceForm\", \"Reference\", \"Reference\", 200).save();\n runUniqueIndex(8, \"firstName\", \"lastName\");\n }", "public ManageSupplier() {\n \n ctrlSupplier = (SupplierController) ControllerFactory.getInstance().getController(ControllerFactory.ControllerTypes.SUPPLIER);\n initComponents();\n loadKeyListener();\n setTime();\n \n \n }", "protected void parametersInstantiation_EM() {\n }", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "public interface IndexDocsInES {\n\n void indexDocs(Client client, String index_name, String type_name, List<Pair> docs);\n}", "indexSet createindexSet();", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "public ManageSupplier() {\n initComponents();\n }", "public IndexBeans() {\r\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public interface ISearchEngine {\n\n enum SearchParam {\n CORE,\n EXPERIMENT,\n HOST,\n PORT\n }\n\n /**\n * Query engine for searching relevant documents\n * @return\n */\n SearchResponse query(SearchRequest request, Map<SearchParam, String> params);\n\n /**\n * Query search engine for spell correction\n * @param request: spell check request\n * @return\n */\n SpellResponse spellQuery(SearchRequest request, Map<SearchParam, String> params);\n}", "public void index(List<Entity> entities) {\n\t\t\n\t}", "void initialize(SnIndexerContext indexerContext, List<SnIndexerItemSourceOperation> indexerItemSourceOperations,\r\n\t\t\tString indexerBatchId);", "public void getSupplier(Supplier supplier) {\n\t\r\n}", "private static GridSearch9734Mod initializeGridSearch() {\r\n\t\tGridSearch9734Mod grid = new GridSearch9734Mod();\r\n\t\t// the metric to optimize\r\n\t\tgrid.setEvaluation(\r\n\t\t\t\tnew SelectedTag(GridSearch9734Mod.EVALUATION_WAUC, GridSearch9734Mod.TAGS_EVALUATION));\r\n\t\tgrid.setGridIsExtendable(false);\r\n\t\tgrid.setNumExecutionSlots(2);\r\n\t\tgrid.setSampleSizePercent(100);\r\n\t\tgrid.setInitialNumFolds(2);\r\n\t\tgrid.setStopAfterFirstGrid(true);\r\n\t\tgrid.setTraversal(\r\n\t\t\t\tnew SelectedTag(GridSearch9734Mod.TRAVERSAL_BY_ROW, GridSearch9734Mod.TAGS_TRAVERSAL));\r\n\t\tgrid.setDebug(false);\r\n\t\treturn grid;\r\n\t}", "public indexing() {\n initComponents();\n }", "@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}", "public TinySearchEngine()\n {\n this.myIndex = new HashMap();\n this.documentData = new HashMap();\n this.sorted = false;\n this.sort = new Sort();\n this.search = new BinarySearch();\n }", "void setSupplier(Supplier<Number> supplier);", "public JexlFilterManager(Provider provider) {\n\t\tsuper(provider);\n\t\ttheFunctions = new ConcurrentHashMap<String, Object>();\n\t}", "public Supplier() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public DefaultExecuterParameters() {\n\t\tnumAuthorsAtStart = 5;\n\t\tnumPublicationsAtStart = 20;\n\t\tnumCreationAuthors = 0;\n\t\tnumCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t}", "void testSetup() {\n\t\t// Delete any existing index\n\t\tdeleteIndex();\n\n\t\t// Create the index\n\t\tcreateIndex();\n\n\t\t// Apply mappings for type and subtypes\n\t\tBufferedReader br;\n\t\tString line;\n\t\tStringBuffer sb;\n\t\ttry {\n\t\t\t// Mappings for index + type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), false, HTTP_POST);\n\n\t\t\t// Mappings for index + sub-type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_subtype_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), true, HTTP_POST);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Index a doc\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"./data/sample_docs.json\"));\n\t\t\tif ((line = br.readLine()) != null) {\n\t\t\t\tinsertDocument(line);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trefreshIndex();\n\t}", "ServiceLocator(Supplier<Iterator<ServiceInstance>> instanceSupplier) {\n\t\tthis(instanceSupplier, (ServiceLocator) null);\n\t}", "public IndexSearchSharderManager() {\n log = LoggerFactory.getLogger(IndexSearchSharderManager.class);\n }", "public ImportTestsController() {\n App app = App.getInstance();\n Company company = app.getCompany();\n clientStore = company.getClientStore();\n authFacade = company.getAuthFacade();\n testStore = company.getTestStore();\n testTypeStore = company.getTestTypeStore();\n parameterStore = company.getParameterStore();\n clinicalStore = company.getClinicalStore();\n }", "@Inject\n\tpublic StoreManagement(Store store) {\n\t\tsuper(store.shardId(), store.indexSettings());\n\t\tthis.store = store;\n\t}", "public SingleElasticIndexCsdlEdmProvider(MappingMetaDataProvider metaDataProvider,\r\n String index) {\r\n super(metaDataProvider);\r\n this.index = index;\r\n }", "public createIndex_args(createIndex_args other) {\n }", "public void setIndexObjectFactory(BLIndexObjectFactory factory) {\n this.indexObjectFactory = factory;\n }", "public void initParamIndexes(Sheet sheet) {\r\n paramIndexes = new HashMap<String, Integer>();\r\n for (int rowNum = 0; rowNum <= sheet.getLastRowNum(); rowNum++) {\r\n Row row = sheet.getRow(rowNum);\r\n if (row == null) {\r\n continue;\r\n }\r\n List<String> headers = new ArrayList<String>();\r\n for (int cellNum = 0; cellNum <= 7; cellNum++) {\r\n headers.add(getCellValue(row.getCell(cellNum)));\r\n }\r\n\r\n int match = 0;\r\n for (String head : headers) {\r\n if (\"Small\".equals(head) || \"Mainstream\".equals(head) || \"Large\".equals(head)\r\n || \"Startup Priority\".equals(head) || \"Operating System\".equals(head) || \"Services\".equals(head)\r\n || \"vCPU\".equals(head) || \"vRAM\".equals(head)) {\r\n match++;\r\n }\r\n }\r\n // Decide column headers\r\n if (match > 5) {\r\n columnHeaders = rowNum;\r\n\r\n // get required parameter indexes\r\n for (int cellNum = 0; cellNum < row.getLastCellNum(); cellNum++) {\r\n String cellValue = getCellValue(row.getCell(cellNum));\r\n if (cellValue != null) {\r\n cellValue = cellValue.trim();\r\n if (ReadFile.parametersToCompare.containsKey(cellValue)\r\n && !paramIndexes.containsKey(cellValue)) {\r\n paramIndexes.put(cellValue, cellNum);\r\n } else if (cellValue.contains(\"DB Flashback\")) {\r\n paramIndexes.put(\"DB Flashback\", cellNum);\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }", "public interface EsSearchDao {\n\n EsQueryResult search(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByIds(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByFields(StoreURL storeURL, EsQuery esQuery);\n\n List<EsQueryResult> multiSearch(StoreURL storeURL, List<EsQuery> list);\n\n EsQueryResult searchByDSL(StoreURL storeURL, EsQuery esQuery);\n\n Object executeProxy(StoreURL storeURL, EsProxy esProxy);\n}", "void setUpLinearManager();", "public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }", "private LuceneManager(String indexDir) {\n this.indexDir = indexDir;\n }", "public InputConsumerFactory(int inputParameterIndex) {\r\n\t\tthis.inputParameterIndex = inputParameterIndex;\r\n\t}", "protected void initParameterGenerators() {\n Map<String, List<Annotation>> methodAnnotationMap = initMethodAnnotationByParameterName();\n\n // 2.create ParameterGenerators by method parameters, merge annotations with method annotations\n initMethodParameterGenerators(methodAnnotationMap);\n\n // 3.create ParameterGenerators remains method annotations\n initRemainMethodAnnotationsParameterGenerators(methodAnnotationMap);\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "public Index() {\n EntityManager emgr = new BeanBase().getEntityManager();\n this.listaUltimasEntradas = new BeanBaseJWiki().getUltimosCincoArticulosSmall();\n this.listaExistenciasFallidas = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=2\").getResultList();\n this.listaExistenciasMantenimiento = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=3\").getResultList();\n this.listaEquiposFallidos = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=2\").getResultList();\n this.listaEquiposMantenimiento = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=3\").getResultList();\n\n Calendar cal = Calendar.getInstance(); \n this.listaReservasHoy = new BeanBaseJCanon().getReservasMismoDia(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR));\n\n }", "public IndicesAliasesRequest prepareAliases() {\n \treturn new IndicesAliasesRequest(this); \n }", "public interface ItemService {\n\n /**\n * 导入商品数据到索引库\n * @return\n */\n TaotaoResult importAllItems() throws SolrServerException, IOException;\n}", "private void ElasticIndexValidation(TransportClient client) {\n if (!client.admin().indices().prepareExists(ES_TAG_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_TAG_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_TAG_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/tag_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_TAG_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_TAG_INDEX, e);\n }\n }\n // Create/migrate the logbook index\n if (!client.admin().indices().prepareExists(ES_LOGBOOK_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_LOGBOOK_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_LOGBOOK_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/logbook_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_LOGBOOK_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_LOGBOOK_INDEX, e);\n }\n }\n\n // Create/migrate the property index\n if (!client.admin().indices().prepareExists(ES_PROPERTY_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_PROPERTY_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_PROPERTY_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/property_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_PROPERTY_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_PROPERTY_INDEX, e);\n }\n }\n\n // Create/migrate the sequence index\n if (!client.admin().indices().prepareExists(ES_SEQ_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_SEQ_INDEX).setSettings(Settings.builder() \n .put(\"index.number_of_shards\", 1)\n .put(\"auto_expand_replicas\", \"0-all\")).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_SEQ_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/seq_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_SEQ_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }\n\n // create/migrate log template\n PutIndexTemplateRequestBuilder templateRequest = client.admin().indices().preparePutTemplate(ES_LOG_INDEX);\n templateRequest.setPatterns(Arrays.asList(ES_LOG_INDEX));\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/log_template_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n templateRequest.addMapping(ES_LOG_TYPE, XContentFactory.jsonBuilder().map(jsonMap)).get();\n// templateRequest.setSource(jsonMap);\n// templateRequest.addMapping(ES_LOG_TYPE, jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }", "@Parameterized.Parameters(name = \"persist={0}\")\n public static List<Object[]> parameters() throws IgniteCheckedException {\n ArrayList<Object[]> params = new ArrayList<>();\n\n // Without persistence\n IgniteStatisticsStore storeInMemory = new IgniteStatisticsInMemoryStoreImpl(\n IgniteStatisticsRepositoryTest::getLogger);\n GridSystemViewManager sysViewMgr = Mockito.mock(GridSystemViewManager.class);\n IgniteStatisticsRepository inMemRepo = new IgniteStatisticsRepository(storeInMemory, sysViewMgr, null,\n IgniteStatisticsRepositoryTest::getLogger);\n params.add(new Object[] {false, inMemRepo});\n\n // With persistence\n MetastorageLifecycleListener lsnr[] = new MetastorageLifecycleListener[1];\n\n GridInternalSubscriptionProcessor subscriptionProcessor = Mockito.mock(GridInternalSubscriptionProcessor.class);\n Mockito.doAnswer(invocation -> lsnr[0] = invocation.getArgument(0))\n .when(subscriptionProcessor).registerMetastorageListener(Mockito.any(MetastorageLifecycleListener.class));\n IgniteCacheDatabaseSharedManager db = Mockito.mock(IgniteCacheDatabaseSharedManager.class);\n\n IgniteStatisticsRepository statsRepos[] = new IgniteStatisticsRepository[1];\n IgniteStatisticsStore storePersistent = new IgniteStatisticsPersistenceStoreImpl(subscriptionProcessor, db,\n IgniteStatisticsRepositoryTest::getLogger);\n IgniteStatisticsHelper helper = Mockito.mock(IgniteStatisticsHelper.class);\n statsRepos[0] = new IgniteStatisticsRepository(storePersistent, sysViewMgr, helper,\n IgniteStatisticsRepositoryTest::getLogger);\n\n ReadWriteMetaStorageMock metastorage = new ReadWriteMetaStorageMock();\n lsnr[0].onReadyForReadWrite(metastorage);\n\n params.add(new Object[]{true, statsRepos[0]});\n\n return params;\n }", "@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}", "ServiceLocator(Supplier<Iterator<ServiceInstance>> instanceSupplier,\n\t\t\tSupplier<ServiceLocator> fallbackSupplier) {\n\t\tthis.instanceSupplier = instanceSupplier;\n\t\tthis.fallbackSupplier = fallbackSupplier;\n\t}", "public interface IIndexBuilder {\n\n public IIndex getIndex( Class<?> searchable ) throws BuilderException;\n\n public IFieldVisitor getFieldVisitor();\n\n public void setFieldVisitor( IFieldVisitor visitor );\n\n}", "public void setParameters(Properties props) {\n\n\t}", "public interface InvertedIndex extends Serializable {\n\n\n /**\n * Sampling for creating mini batches\n * @return the sampling for mini batches\n */\n double sample();\n\n /**\n * Iterates over mini batches\n * @return the mini batches created by this vectorizer\n */\n Iterator<List<VocabWord>> miniBatches();\n\n /**\n * Returns a list of words for a document\n * @param index\n * @return\n */\n List<VocabWord> document(int index);\n\n /**\n * Returns the list of documents a vocab word is in\n * @param vocabWord the vocab word to get documents for\n * @return the documents for a vocab word\n */\n int[] documents(VocabWord vocabWord);\n\n /**\n * Returns the number of documents\n * @return\n */\n int numDocuments();\n\n /**\n * Returns a list of all documents\n * @return the list of all documents\n */\n int[] allDocs();\n\n\n\n /**\n * Add word to a document\n * @param doc the document to add to\n * @param word the word to add\n */\n void addWordToDoc(int doc,VocabWord word);\n\n\n /**\n * Adds words to the given document\n * @param doc the document to add to\n * @param words the words to add\n */\n void addWordsToDoc(int doc,List<VocabWord> words);\n\n\n /**\n * Finishes saving data\n */\n void finish();\n\n /**\n * Total number of words in the index\n * @return the total number of words in the index\n */\n int totalWords();\n\n /**\n * For word vectors, this is the batch size for which to train on\n * @return the batch size for which to train on\n */\n int batchSize();\n\n /**\n * Iterate over each document\n * @param func the function to apply\n * @param exec exectuor service for execution\n */\n void eachDoc(Function<List<VocabWord>, Void> func, ExecutorService exec);\n}", "public interface IExchangeDataIndexer {\n\t/**\n\t * Get the exchange indexed by this indexer.\n\t * \n\t * @return {@link Exchange}\n\t */\n\tpublic Exchange getExchange();\n\t\n\t/**\n\t * Get the list of indexes managed by this indexer.\n\t * \n\t * @return The list of names of indexes managed by this indexer.\n\t */\n\tpublic List<String> getExchangeIndexes();\n\t\n\t/**\n\t * Updates the list of stocks in this index, by fetching latest data from the source. \n\t * \n\t * @return Updated list of the stocks.\n\t */\n\tList<MarketData> getMarketDataItems(String index);\n\t\n\t/**\n\t * Synchronizes the recently fetched stock data(of a single index) to the data store.\n\t * \n\t * @param exchangeCode Code for this exchange.\n\t * @param items Recently fetched stock data.\n\t */\n\tpublic void syncToDataStore(String exchangeCode, Collection<MarketData> items);\n}", "private IndexOperations getIndexOperations() {\n return elasticsearchOperations.indexOps(itemClazz);\n }", "public void setSupplier (jkt.hms.masters.business.MasStoreSupplier supplier) {\n\t\tthis.supplier = supplier;\n\t}", "public interface Feeder {\n\n Client client();\n\n /**\n * Index document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @param source the source\n * @return this\n */\n Feeder index(String index, String type, String id, String source);\n\n /**\n * Index document\n *\n * @param indexRequest the index request\n * @return this\n */\n Feeder index(IndexRequest indexRequest);\n\n /**\n * Delete document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @return this\n */\n Feeder delete(String index, String type, String id);\n\n Feeder delete(DeleteRequest deleteRequest);\n\n\n}", "public interface ILuceneIndexDAO extends IStatefulIndexerSession {\n // ===================================================================\n // The domain of indexing creates a separation between\n // readers and writers. In lucene, these are searchers\n // and writers. This DAO creates the more familiar DAO-ish interface\n // for developers to use and attempts to hide the details of\n // the searcher and write.\n // Calls are stateless meaning calling a find after a save does\n // not guarantee data will be reflected for the instance of the DAO\n // ===================================================================\n\n /**\n * Updates a document by first deleting the document(s) containing a term and then adding the new document. A Term is created by termFieldName, termFieldValue.\n *\n * @param termFieldName - Field name of the index.\n * @param termFieldValue - Field value of the index.\n * @param document - Lucene document to be updated.\n * @return - True for successful addition.\n */\n boolean saveDocument(String termFieldName, String termFieldValue, Document document);\n\n /**\n * Generates a BooleanQuery from the given fields Map and uses it to delete the documents matching in the IndexWriter.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @return - True for successful deletion.\n */\n boolean deleteDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields.\n *\n * @param fields - A Map data structure contains the field(Key) and text(value).\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields. Offset is the starting position for the search and numberOfResults\n * is the length from offset position.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @param offset - Starting position of the search.\n * @param numberOfResults - Number of documents to be searched from an offset position.\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);\n\n /**\n * Return the count of the documents present in the IndexSearcher.\n *\n * @return - Integer representing the count of documents.\n */\n int getDocumentCount();\n\n}", "public static void main(String[] args)\n\t{\n\t\tsqlindexer si=new sqlindexer();\n\t\tsi.indexAll();\n\t\t\n\t\t\n\t}", "public IndexBuilderTest(String testName) {\n super(testName);\n }", "public void setUp() throws Exception {\n Project project = new Project();\n\n IndexTask task = new IndexTask();\n FileSet fs = new FileSet();\n fs.setDir(new File(docsDir));\n task.addFileset(fs);\n task.setOverwrite(true);\n task.setDocumentHandler(docHandler);\n task.setIndex(new File(indexDir));\n task.setProject(project);\n task.execute();\n\n searcher = new IndexSearcher(indexDir);\n analyzer = new StopAnalyzer();\n }", "void setParameters(IParameterCollection parameters);", "@Test (dataProvider= \"My data provider\")\r\n\tpublic void TestCalcParamitarized(String in1,String Op, String in2,String Expec){ //.... 1- Parameterized test method -Define method input parameters-\r\n\t\tCalc(in1, Op, in2);\r\n\t\tassertResult(Expec);\t\t\r\n\t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "@Override\n protected void init()\n throws ReadWriteException\n {\n // 商品マスタ\n _ItemHandler = new ItemHandler(getConnection());\n _ItemKey = new ItemSearchKey();\n\n // 商品固定棚マスタ\n _fixedHandler = new FixedLocateInfoHandler(getConnection());\n _fixedKey = new FixedLocateInfoSearchKey();\n\n // 入荷予定情報\n _recHandler = new ReceivingPlanHandler(getConnection());\n _recKey = new ReceivingPlanSearchKey();\n\n // 入庫予定情報\n _stHandler = new StoragePlanHandler(getConnection());\n _stKey = new StoragePlanSearchKey();\n\n // 出庫予定情報\n _retHandler = new RetrievalPlanHandler(getConnection());\n _retKey = new RetrievalPlanSearchKey();\n\n // 入出庫作業情報\n _wIHandler = new WorkInfoHandler(getConnection());\n _wIKey = new WorkInfoSearchKey();\n\n // 出荷予定情報\n _shipHandler = new ShipPlanHandler(getConnection());\n _shipKey = new ShipPlanSearchKey();\n\n // 移動作業情報\n _moveHandler = new MoveWorkInfoHandler(getConnection());\n _moveKey = new MoveWorkInfoSearchKey();\n\n // 棚卸作業情報\n _invHandler = new InventWorkInfoHandler(getConnection());\n _invKey = new InventWorkInfoSearchKey();\n\n // 在庫情報\n _stkHandler = new StockHandler(getConnection());\n _stkKey = new StockSearchKey();\n\n // 作業単位数マスタ\n _wkUnitHandler = new WorkingUnitHandler(getConnection());\n _wkUnitKey = new WorkingUnitSearchKey();\n\n // AS/RSソフトゾーン情報\n _softHandler = new SoftZoneHandler(getConnection());\n _softKey = new SoftZoneSearchKey();\n }", "protected void setUp() {\r\n columnNames = new HashMap();\r\n columnNames.put(DbBaseFilterFactory.CREATION_DATE_COLUMN_NAME, \"creation_date\");\r\n columnNames.put(DbBaseFilterFactory.MODIFICATION_DATE_COLUMN_NAME, \"modification_date\");\r\n columnNames.put(DbBaseFilterFactory.CREATION_USER_COLUMN_NAME, \"creation_user\");\r\n columnNames.put(DbBaseFilterFactory.MODIFICATION_USER_COLUMN_NAME, \"modification_user\");\r\n\r\n instance = new DbBaseFilterFactory(columnNames);\r\n }", "@FunctionalInterface\npublic interface IIndexer<T extends IDocument> {\n\tList<T> getDocuments(String query, int limit);\n}", "private void createProductIndex() {\n\t\tLinkedList<String> ids = new LinkedList<>(productIds.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(productIds.values());\n\t\tint k = 8;\n\t\tKFront kf = new KFront();\n\t\tkf.createKFront(k, ids);\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tkf.getTable().get(i).addAll(vals.get(i));\n\t\t}\n\n\t\tProductIndex pIndex = new ProductIndex(k);\n\t\tpIndex.insertData(kf.getTable(), kf.getConcatString());\n\t\tsaveToDir(PRODUCT_INDEX_FILE, pIndex);\n\t}", "public void index(Map<Integer, Document> docs) {\r\n this.docs = docs;\r\n\r\n // index\r\n this.index.process(this.docs);\r\n\r\n // tf-idf model\r\n this.tfidf.inject(this.index, this.docs.size());\r\n this.tfidf.process();\r\n }", "@Override\r\n\tprotected Indexing initializeVariables(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request) {\n\t\t\r\n\t\treturn null;\r\n\t}", "private BrowseIndex() {\n }", "public void initAllCalculators(){\n for(int i=0; i< calculators.length; i++){\n initRow(i);\n }\n }", "@Before\n public void setup() {\n context.build().resource(OAK_INDEX).commit();\n context.registerService(Scheduler.class,scheduler);\n context.registerService(RequireAem.class,requireAem,\"distribution\",\"classic\");\n\n ScheduleOptions options = mock(ScheduleOptions.class);\n lenient().when(scheduler.NOW()).thenReturn(options);\n lenient().when(scheduler.schedule(any(), any())).thenAnswer((InvocationOnMock invocation) -> {\n EnsureOakIndexJobHandler handler = invocation.getArgument(0);\n handler.run();\n return true;\n });\n\n context.registerService(ChecksumGenerator.class, new ChecksumGeneratorImpl());\n \n ensureOakIndexManagerProperties = new HashMap<>();\n ensureOakIndexManagerProperties.put(\"properties.ignore\", null);\n \n }", "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "public interface RegisterAdminService {\n\n\tHashMap<String, Item> INVENTORY = new HashMap<String, Item>();\n\tHashMap<String, Special> SPECIALS = new HashMap<String, Special>();\n\tHashMap<String, Markdown> MARKDOWNS = new HashMap<String, Markdown>();\n\n\t/**\n\t * Creates a new {@link Item} using the item name, item price, and if <code>true</code>\n\t * setting item as charge by weight.\n\t * \n\t * @param itemName\t\t\tname of the item being created.\n\t * @param itemPrice\t\t\tdefault price of the item.\n\t * @param isChargeByWeight\t<code>true</code> if the item will need to be scaled\n\t * \t\t\t\t\t\t\twhen completing the {@link CartItem} creation.\n\t */\n\tvoid createItem(String itemName, String itemPrice, boolean isChargeByWeight);\n\n\t/**\n\t * Gets item from <code>INVENTORY</code>. Used whenever we need to verify that an item\n\t * exists in inventory. Returns the item by using the <code>itemName</code> as the key\n\t * in the map.\n\t * \n\t * @param itemName\t\t\tname of the item to search for.\n\t * @return\t\t\t\t\t{@link Item}\n\t */\n\tItem getItem(String itemName);\n\n\t/**\n\t * Creates a new {@link Special} of type {@link BuyNForX} using the special name, minimum\n\t * quantity of items required to buy, and the price amount for the group.\n\t * \n\t * @param specialName\t\tidentifying name of the special.\n\t * @param buyQtyRequirement\tminimum quantity of items needed in cart\n\t * \t\t\t\t\t\t\tbefore Special applies. \n\t * @param discountPrice \tprice to return for group of items purchased.\n\t */\n\tvoid createSpecialBuyNForX(String specialName, int buyQtyRequirement, String discountPrice);\n\n\t/**\n\t * Creates a new {@link Special} of type {@link BuyNGetMatXPercentOff} using the special name, minimum\n\t * quantity of items required to buy, number of items to receive at discounted percentage \n\t * and the discount percentage.\n\t * \n\t * @param specialName\t\tidentifying name of the special.\n\t * @param buyQtyRequirement\tminimum quantity of items needed in cart\n\t * \t\t\t\t\t\t\tbefore Special applies. \n\t * @param receiveQtyItems\tnumber of items to receive at discounted rate.\n\t * @param percentOff\t\tdiscount percentage entered as a whole number.\n\t * \t\t\t\t\t\t\t<strong>Example:</strong> 50% is entered as\n\t * \t\t\t\t\t\t\t50 or 50.0.\n\t */\n\tvoid createSpecialBuyNGetMAtXPercentOff(String specialName, int buyQtyRequirement, \n\t\t\tint receiveQtyItems, double percentOff); \n\t\n\t/**\n\t * Gets special from <code>SPECIALS</code> using name of the special \n\t * as a key for the object map.\n\t * \n\t * @param specialName\t\tname of the special to search for.\n\t * @return\t\t\t\t\t{@link Special}\n\t * @see \t\t\t\t\tSpecial\n\t * @see\t\t\t\t\t\tBuyNGetMatXPercentOff\n\t * @see\t\t\t\t\t\tBuyNForX\n\t */\n\tSpecial getSpecial(String specialName);\n\n\t/**\n\t * Creates a new {@link Markdown} using a mark down description and price.\n\t * \n\t * @param description\t\tdescription of the markdown for reference.\n\t * @param markdownAmount\trepresents the amount to subtract from the default price.\n\t */\n\tvoid createMarkdown(String description, String markdownAmount);\n\n\t/**\n\t * Gets mark-down from <code>MARKDOWNS</code> using the name of the mark-down\n\t * as a key for the object map.\n\t * \n\t * @param markdownDescription\tname of the mark-down to search for.\n\t * @return\t\t\t\t\t\t{@link Markdown}\n\t * @see \t\t\t\t\t\tMarkdown\n\t */\n\tMarkdown getMarkdown(String markdownDescription);\n\n\t/**\n\t * Gets the inventory collection for referencing items within \n\t * the collection.\n\t * \n\t * @return\t\t\t\t\t\tCollection of Items within <code>INVENTORY</code>.\n\t */\n\tCollection<Item> getInventory();\n\n\t/**\n\t * Gets the collection of Specials for referencing the specials stored.\n\t * \n\t * @return\t\t\t\t\tCollection of Specials which can be any type of \n\t * \t\t\t\t\t\t\t{@link Special} such as,{@link BuyNGetMatXPercentOff} \n\t * \t\t\t\t\t\t\tor {@link BuyNForX}.\n\t */\n\tCollection<? extends Special> getSpecials();\n\n\t/**\n\t * Gets the collection of Markdowns for referencing the markdowns available for\n\t * use.\n\t * \n\t * @return\t\t\t\tCollection of Markdowns.\n\t */\n\tCollection<Markdown> getMarkdowns();\n\n\t/**\n\t * Updates {@link Item}'s default price or adds {@link Markdown} or \n\t * assigns {@link Special}. <code>itemName</code> is required.\n\t * \n\t * @param itemName\t\t\t\tname of item to search for.\n\t * @param newDefaultPrice\t\tassignment of new default price.\n\t * @param markdownDescription\tname of mark-down to search for and apply.\n\t * @param specialName\t\t\tname of special to search for and apply.\n\t */\n\tvoid updateItem(String itemName, String newDefaultPrice, String markdownDescription\n\t\t\t, String specialName);\n\n\t/**\n\t * Adds a limit to {@limit Special} using the <code>specialName</code>\n\t * to search for the special and uses <code>limitQty</code> to assign\n\t * the limit quantity.\n\t * \n\t * @param specialName\t\t\tname of special to search for.\n\t * @param limitQty\t\t\t\tamount to set limit to\n\t */\n\tvoid addLimitToSpecial(String specialName, int limitQty);\n\n\n}", "protected void initSupportedIntensityMeasureParams() {\n\n\t\t// Create saParam:\n\t\tDoubleDiscreteConstraint periodConstraint = new DoubleDiscreteConstraint();\n\t\tTreeSet set = new TreeSet();\n\t\tEnumeration keys = coefficientsBJF.keys();\n\t\twhile (keys.hasMoreElements()) {\n\t\t\tBJF_1997_AttenRelCoefficients coeff = (BJF_1997_AttenRelCoefficients)\n\t\t\tcoefficientsBJF.get(keys.nextElement());\n\t\t\tif (coeff.period >= 0) {\n\t\t\t\tset.add(new Double(coeff.period));\n\t\t\t}\n\t\t}\n\t\tIterator it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tperiodConstraint.addDouble( (Double) it.next());\n\t\t}\n\t\tperiodConstraint.setNonEditable();\n\t\tsaPeriodParam = new PeriodParam(periodConstraint);\n\t\tsaDampingParam = new DampingParam();\n\t\tsaParam = new SA_Param(saPeriodParam, saDampingParam);\n\t\tsaParam.setNonEditable();\n\n\t\t// Create PGA Parameter (pgaParam):\n\t\tpgaParam = new PGA_Param();\n\t\tpgaParam.setNonEditable();\n\n\t\t// Create PGV Parameter (pgvParam):\n\t\tpgvParam = new PGV_Param();\n\t\tpgvParam.setNonEditable();\n\n\t\t// The MMI parameter\n\t\tmmiParam = new MMI_Param();\n\n\t\t// Add the warning listeners:\n\t\tsaParam.addParameterChangeWarningListener(listener);\n\t\tpgaParam.addParameterChangeWarningListener(listener);\n\t\tpgvParam.addParameterChangeWarningListener(listener);\n\n\t\t// create supported list\n\t\tsupportedIMParams.clear();\n\t\tsupportedIMParams.addParameter(saParam);\n\t\tsupportedIMParams.addParameter(pgaParam);\n\t\tsupportedIMParams.addParameter(pgvParam);\n\t\tsupportedIMParams.addParameter(mmiParam);\n\n\t}", "private void setSearchParameters() {\n List obSys = dbm.getHQLManager().executeHQLQuery(\"from NewuserParamters where USERID=0\"); //user 0 is the system user\n NewuserParamters paramsSys = null;\n if (obSys != null) {\n paramsSys = (NewuserParamters) obSys.get(0);\n } else {\n System.out.println(\"User System Properties missing\");\n }\n //modify the settings of the search parameter based on user specification\n List ob = null;\n\n try {\n ob = dbm.getHQLManager().executeHQLQuery(\"from NewuserParamters where USERID=\" + UserId);\n if (ob.size() > 0) {\n NewuserParamters params = (NewuserParamters) ob.get(0);\n Integer val = 0;\n if ((val = params.getGlobalSessionSize()) != null) {\n NoOfglobalSessions = val;\n } else {\n this.NoOfglobalSessions = paramsSys.getGlobalSessionSize();\n }\n\n if ((val = params.getHdmGeneration()) != null) {\n this.noHDMGenerations = val;\n } else {\n this.noHDMGenerations = paramsSys.getHdmGeneration();\n }\n\n if ((val = params.getHdmPopulationSize()) != null) {\n this.HDMPopulation = val;\n } else {\n this.HDMPopulation = paramsSys.getHdmPopulationSize();\n }\n\n if ((val = params.getLearningType()) != null) {\n this.learningType = val;\n } else {\n this.learningType = paramsSys.getLearningType();\n }\n\n if ((val = params.getOptimizationType()) != null) {\n this.optimizationType = val;\n } else {\n this.optimizationType = paramsSys.getOptimizationType();\n }\n\n if ((val = params.getSdmGeneration()) != null) {\n this.noSDMGenerations = val;\n } else {\n this.noSDMGenerations = paramsSys.getSdmGeneration();\n }\n\n if ((val = params.getSdmPopulationSize()) != null) {\n this.SDMPopulation = val;\n } else {\n this.SDMPopulation = paramsSys.getSdmPopulationSize();\n }\n Double valdou = 0.0;\n if ((valdou = params.getGaMutationProbability()) != null) {\n this.MUTATION_PROBABILITY = valdou;\n } else {\n this.MUTATION_PROBABILITY = paramsSys.getGaMutationProbability();\n }\n\n if ((valdou = params.getGaCrossoverProbability()) != null) {\n this.CROSSOVER_PROBABILITY = valdou;\n } else {\n this.CROSSOVER_PROBABILITY = paramsSys.getGaCrossoverProbability();\n }\n }\n else {\n //use system default parameters\n this.NoOfglobalSessions = paramsSys.getGlobalSessionSize();\n this.noHDMGenerations = paramsSys.getHdmGeneration();\n this.HDMPopulation = paramsSys.getHdmPopulationSize();\n this.learningType = paramsSys.getLearningType();\n this.optimizationType = paramsSys.getOptimizationType();\n this.noSDMGenerations = paramsSys.getSdmGeneration();\n this.SDMPopulation = paramsSys.getSdmPopulationSize();\n this.MUTATION_PROBABILITY = paramsSys.getGaMutationProbability();\n this.CROSSOVER_PROBABILITY = paramsSys.getGaCrossoverProbability();\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "@Inject\n\tpublic MetaDataCreateIndexService(Settings settings, Environment environment, ThreadPool threadPool,\n\t\t\tClusterService clusterService, IndicesService indicesService, AllocationService allocationService,\n\t\t\tNodeIndexCreatedAction nodeIndexCreatedAction, MetaDataService metaDataService,\n\t\t\t@RiverIndexName String riverIndexName) {\n\t\tsuper(settings);\n\t\tthis.environment = environment;\n\t\tthis.threadPool = threadPool;\n\t\tthis.clusterService = clusterService;\n\t\tthis.indicesService = indicesService;\n\t\tthis.allocationService = allocationService;\n\t\tthis.nodeIndexCreatedAction = nodeIndexCreatedAction;\n\t\tthis.metaDataService = metaDataService;\n\t\tthis.riverIndexName = riverIndexName;\n\t}", "public static SolrIndexer indexerFromProperties(Properties indexingProperties, String searchPath[])\n {\n SolrIndexer indexer = new SolrIndexer();\n indexer.propertyFilePaths = searchPath;\n indexer.fillMapFromProperties(indexingProperties);\n\n return indexer;\n }", "private void _init() throws Exception {\n algorithmconfigDataProvider_search.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.algorithmconfigRowSet_search}\"));\n datatierDataProvider_search.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.datatierRowSet_search}\"));\n primarydatasetDataProvider_saerch.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.primarydatasetRowSet_search}\"));\n runsDataProvider_search.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.runsRowSet_search}\"));\n storageelementDataProvider_search.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.storageelementRowSet_search}\"));\n filebranchDataProvider_search.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.filebranchRowSet_search}\"));\n processeddatasetDataProvider_tier.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue(\"#{SessionBean1.processeddatasetRowSet_search}\"));\n \n }", "protected BaseController(DialogProvider aDialogProvider, DesktopProvider aDesktopProvider) {\n\n this.dialogProvider = aDialogProvider;\n this.desktopProvider = aDesktopProvider;\n }", "private Module(Hashtable functions) {\n\t\tthis.functions = functions;\n\t}", "public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }" ]
[ "0.5749043", "0.5222492", "0.50003636", "0.49691585", "0.49620843", "0.48921874", "0.48853588", "0.48584783", "0.4829861", "0.48294276", "0.48209372", "0.4810999", "0.48077598", "0.48019353", "0.47996023", "0.4793313", "0.476213", "0.4752996", "0.47379974", "0.47339052", "0.47301662", "0.47238603", "0.47189742", "0.47109917", "0.46882936", "0.46845597", "0.46680617", "0.46263015", "0.46144253", "0.46143818", "0.46141908", "0.45996287", "0.45941693", "0.4578573", "0.45758373", "0.45634007", "0.4560238", "0.45472777", "0.45456457", "0.45419532", "0.45414653", "0.45364764", "0.45288447", "0.45168468", "0.45081773", "0.45069528", "0.45051157", "0.4504439", "0.45004284", "0.44964847", "0.44921994", "0.44857106", "0.4479568", "0.4472914", "0.44707868", "0.4455475", "0.4453455", "0.44516993", "0.44373938", "0.4437302", "0.44290075", "0.4421506", "0.44148782", "0.4408861", "0.44020852", "0.4391144", "0.4388618", "0.43847162", "0.43842426", "0.43795702", "0.43745384", "0.43735626", "0.43633825", "0.43620545", "0.43566313", "0.43530965", "0.435033", "0.43495387", "0.4348668", "0.4346702", "0.43449956", "0.43396252", "0.43340048", "0.43297285", "0.43190536", "0.43174776", "0.4317195", "0.4316007", "0.43132237", "0.4313199", "0.43130958", "0.43122277", "0.43059352", "0.4304593", "0.43008047", "0.4298238", "0.4292599", "0.4291019", "0.429096", "0.42866638" ]
0.75322485
0
Test whether the numbers of documents in flushed segments are reported correctly
@Test public void flushedTest() { for (int i = 0; i < InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD * 2; i++) { iim.addDocument(dummy); } assertEquals( InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD, iim.getNumDocuments(0) ); assertEquals( InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD, iim.getNumDocuments(1) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized boolean verifyDocCounts() {\n\t\tfinal int docCount = mInfo.getSegmentInfo().getDocCount();\n\t\t\n\t\tint count;\n\t\tif (mLiveDocs != null) {\n\t\t\tcount = 0;\n\t\t\tfor (int docID=0; docID < docCount; docID++) {\n\t\t\t\tif (mLiveDocs.get(docID)) \n\t\t\t\t\tcount ++;\n\t\t\t}\n\t\t} else {\n\t\t\tcount = docCount;\n\t\t}\n\n\t\tassert docCount - mInfo.getDelCount() - mPendingDeleteCount == count: \n\t\t\t\"info.docCount=\" + docCount + \" info.getDelCount()=\" + mInfo.getDelCount() + \n\t\t\t\" pendingDeleteCount=\" + mPendingDeleteCount + \" count=\" + count;\n\t\t\n\t\treturn true;\n\t}", "boolean hasChunksCount();", "@Test\n public void testByteSizeTooBig() {\n ds.setMaxDocumentBytes(150);\n putD1();\n putD2();\n \n assertEquals(true, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n putD3();\n System.out.println(\"hey\");\n assertEquals(false, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n assertEquals(true, docExists(testStringNumber.STRING3));\n \n }", "@Test\n public void viewAndRefCountTest() throws IOException {\n String segmentName = \"log_current\";\n LogSegment segment = getSegment(segmentName, LogSegmentTest.STANDARD_SEGMENT_SIZE, true);\n try {\n long startOffset = segment.getStartOffset();\n int readSize = 100;\n int viewCount = 5;\n byte[] data = appendRandomData(segment, (readSize * viewCount));\n for (int i = 0; i < viewCount; i++) {\n getAndVerifyView(segment, startOffset, (i * readSize), data, (i + 1));\n }\n for (int i = 0; i < viewCount; i++) {\n segment.closeView();\n Assert.assertEquals(\"Ref count is not as expected\", ((viewCount - i) - 1), segment.refCount());\n }\n } finally {\n closeSegmentAndDeleteFile(segment);\n }\n }", "int getDocumentCount();", "@Test\n public void mergedTest() {\n for (\n int i = 0;\n i < InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD\n * InvertedIndexManager.DEFAULT_MERGE_THRESHOLD;\n i++\n ) {\n iim.addDocument(dummy);\n }\n\n for (int i = 0; i < InvertedIndexManager.DEFAULT_MERGE_THRESHOLD / 2; i++) {\n assertEquals(\n InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD * 2,\n iim.getNumDocuments(i)\n );\n }\n }", "int getTokenSegmentCount();", "int getNumSegments();", "int numDocuments();", "boolean shouldMerge() {\n return mergeState.segmentInfo.getDocCount() > 0;\n }", "boolean hasSegments();", "private native int numberOfSegments0(byte msgBuffer[], int msgLen,\n int msgType, boolean hasPort);", "private int indexUntilCheckpointCount() {\n int total = 0;\n for (int i = 0; i < MAX_CHECKPOINTS_BEHIND; i++) {\n final int numDocs = randomIntBetween(1, 5);\n for (int j = 0; j < numDocs; ++j) {\n indexDoc();\n }\n total += numDocs;\n refresh(INDEX_NAME);\n }\n return total;\n }", "boolean hasStarted() {\n return includedLength > 0;\n }", "boolean hasSegment();", "int getSentenceSegmentCount();", "int countSpecifiedEnds();", "@Test\n public void testPersistedSegmentCount_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n int expResult = 2;\n int result = instance.persistedSegmentCount();\n assertEquals(expResult, result);\n\n }", "public void batchProcessComplete() {\n System.out.print(\"Completed \" + entityCount + \" documents\");\n if (size > 0) {\n System.out.print(\"; \" + size + \" characters\");\n }\n System.out.println();\n long elapsedTime = System.currentTimeMillis() - mStartTime;\n System.out.println(\"Time Elapsed : \" + elapsedTime + \" ms \");\n }", "@Test\n public void mergeWithStopAfterFirstSegment() throws IOException, MkvElementVisitException {\n final CountVisitor countVisitor = runMergerToStopAtFirstNonMatchingSegment(\"output_get_media.mkv\");\n\n //Validate that there is only one EBML header and segment and tracks\n //but there are 32 clusters and tracks as expected.\n assertCountsAfterMerge(countVisitor);\n }", "@Test\n void testProcess() {\n HtmlDocumentProcessor documentProcessor = new HtmlDocumentProcessor();\n Document document = Document.createShell(\"\");\n document.text(\"2hh 3aaa 4bbbbbb 5CCCCC 8eeeeeeee\"); // sets body text\n documentProcessor.process(document);\n Map<Integer, Long> counts = documentProcessor.getCounts();\n // expecting 10 e's (ASCII 101), 8 b's (ASCII 98), 5 C's (ASCII 67), 7 h's (ASCII 104), 2 t's (ASCII 116)\n assertEquals(counts.get(101), 10L);\n assertEquals(counts.get(98), 8L);\n assertEquals(counts.get(104), 6L);\n assertEquals(counts.get(67), 5L);\n assertEquals(counts.get(116), 2L);\n\n // process same doc again and verify doubled counts\n documentProcessor.process(document);\n counts = documentProcessor.getCounts();\n assertEquals(counts.get(101), 20L);\n assertEquals(counts.get(98), 16L);\n assertEquals(counts.get(104), 12L);\n assertEquals(counts.get(67), 10L);\n assertEquals(counts.get(116), 4L);\n }", "int getNumberOfDocuments();", "@Test\n public void testPersistedSegmentCount() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n int expResult = 0;\n int result = instance.persistedSegmentCount();\n assertEquals(expResult, result);\n\n }", "public void sanityCheckNumNodes() {\n\t\tint sanity = viewedPos.sanityCheckGetNumberOfNodes();\n\t\tif(sanity != numPosRecorded) {\n\t\t\tSystem.err.println(\"ERROR: the number of nodes in the tree is not equal to the number of nodes added. #Added: \" + numPosRecorded + \" number received: \" + sanity);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public long size() {\n return segment.size();\n }", "public int numberOfSegments() {\n return 0;\n }", "boolean hasCount();", "public void collectionProcessComplete() {\n long time = System.currentTimeMillis();\n System.out.print(\"Completed \" + entityCount + \" documents\");\n if (size > 0) {\n System.out.print(\"; \" + size + \" characters\");\n }\n System.out.println();\n long initTime = mInitCompleteTime - mStartTime;\n long processingTime = time - mInitCompleteTime;\n long elapsedTime = initTime + processingTime;\n System.out.println(\"Total Time Elapsed: \" + elapsedTime + \" ms \");\n System.out.println(\"Initialization Time: \" + initTime + \" ms\");\n System.out.println(\"Processing Time: \" + processingTime + \" ms\");\n\n System.out.println(\"\\n\\n ------------------ PERFORMANCE REPORT ------------------\\n\");\n System.out.println(cpe.getPerformanceReport().toString());\n if (docsProcessedWithException > 0) {\n System.out.println(String.format(\n \"There are %s entities that caused exceptions:\\n%s\\n\"\n + \"Check previous output for details\",\n docsProcessedWithException, docsWithException));\n }\n }", "boolean hasFrequencyOffset();", "public int numberOfSegments() {\n return segments.size();\n }", "boolean hasCompletePartition();", "@java.lang.Override\n public int getTokenSegmentCount() {\n return tokenSegment_.size();\n }", "boolean hasTotalSize();", "private int checkIntersections(ArrayList<Segment> segments){\n\t\tint numberOfIntersections = 0;\n\t\tfor (Segment s: segments){\n\t\t\tSegment firstSegment = s;\n\t\t\tfor (Segment t: segments){\n\t\t\t\tSegment secondSegment = t;\n\t\t\t\tif (!(firstSegment.equals(secondSegment))){\n\t\t\t\t\tif (!this.checkSharedVertex(firstSegment, secondSegment)){\n\t\t\t\t\t\tif(this.isIntersected(firstSegment.w1, firstSegment.w2, secondSegment.w1, secondSegment.w2))\n\t\t\t\t\t\t\tnumberOfIntersections ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn numberOfIntersections;\n\t}", "abstract public int numDocs();", "public boolean hasChunksCount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public int sizeOfSegmentArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SEGMENT$2);\n }\n }", "public static int count() {\n return segmentList.size();\n }", "public boolean hasChunksCount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public int getTotalSegments() {\n return totalSegments;\n }", "public int getSegmentCount() {\n\t\treturn this.segments.size();\n\t}", "boolean hasCounter();", "@java.lang.Override\n public int getSentenceSegmentCount() {\n return sentenceSegment_.size();\n }", "public int numberOfSegments() {\n\t\treturn count;\n\t}", "void updateShowCounts() {\n /*\n * once we have passed the threshold, we don't need to keep checking the\n * number of rows in tsk_files\n */\n if (showCounts) {\n try {\n if (skCase.countFilesWhere(\"1=1\") > NODE_COUNT_FILE_TABLE_THRESHOLD) { //NON-NLS\n showCounts = false;\n }\n } catch (TskCoreException tskCoreException) {\n showCounts = false;\n logger.log(Level.SEVERE, \"Error counting files.\", tskCoreException); //NON-NLS\n }\n }\n }", "int getChunksLocationCount();", "public static int getNSectors()\n {\n return Disk.NUM_OF_SECTORS - ADisk.REDO_LOG_SECTORS - 1;\n }", "public boolean haveCount () ;", "boolean hasPagesize();", "boolean hasDocument();", "boolean hasDocument();", "boolean hasDocument();", "public int getWriteFormatCount();", "public boolean isSetTotalFilesMaterializedCount() {\n return EncodingUtils.testBit(__isset_bitfield, __TOTALFILESMATERIALIZEDCOUNT_ISSET_ID);\n }", "public int getNumXPathSegments() {\n return xPath.size();\n }", "public int getDocCount(){\n\t\treturn index.size();\r\n\t}", "@Override\n public int getCurrentRecordsProcessed() {\n return 0;\n }", "public boolean hasStoreChunkResponse() {\n return msgCase_ == 8;\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "boolean hasChunkSize();", "public boolean hasStoreChunkResponse() {\n return msgCase_ == 8;\n }", "boolean hasTotalElements();", "private int cleanupSegmentsToMaintainSize(Log log) {\n if (log.config.retentionSize < 0 || log.size() < log.config.retentionSize)\n return 0;\n\n final AtomicLong diff = new AtomicLong(log.size() - log.config.retentionSize);\n\n return log.deleteOldSegments(new Predicate<LogSegment>() {\n @Override\n public boolean apply(LogSegment segment) {\n if (diff.get() - segment.size() >= 0) {\n diff.addAndGet(-segment.size());\n return true;\n } else {\n return false;\n }\n }\n });\n }", "private boolean isNormalCountOK(int normalObs, int numNormalReads, int tumorObs) {\n\t\treturn normalObs == 0 || (tumorObs >= 20 && numNormalReads >= 20);\t\t\n\t}", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "public int numberOfSegments() { \n\t\treturn numOfSeg;\n\t}", "private void verifyBinary(byte[][][] docValues, int[] ids, int numBytesPerDim) throws Exception {\n IndexWriterConfig iwc = newIndexWriterConfig();\n\n int numDims = docValues[0].length;\n int bytesPerDim = docValues[0][0].length;\n\n // Else we can get O(N^2) merging:\n int mbd = iwc.getMaxBufferedDocs();\n if (mbd != -1 && mbd < docValues.length / 100) {\n iwc.setMaxBufferedDocs(docValues.length / 100);\n }\n iwc.setCodec(getCodec());\n\n Directory dir;\n if (docValues.length > 100000) {\n dir = newFSDirectory(createTempDir(\"TestPointQueries\"));\n } else {\n dir = newDirectory();\n }\n\n IndexWriter w = new IndexWriter(dir, iwc);\n\n int numValues = docValues.length;\n if (VERBOSE) {\n System.out.println(\n \"TEST: numValues=\"\n + numValues\n + \" numDims=\"\n + numDims\n + \" numBytesPerDim=\"\n + numBytesPerDim);\n }\n\n int missingPct = random().nextInt(100);\n int deletedPct = random().nextInt(100);\n if (VERBOSE) {\n System.out.println(\" missingPct=\" + missingPct);\n System.out.println(\" deletedPct=\" + deletedPct);\n }\n\n BitSet missing = new BitSet();\n BitSet deleted = new BitSet();\n\n Document doc = null;\n int lastID = -1;\n\n for (int ord = 0; ord < numValues; ord++) {\n if (ord % 1000 == 0) {\n if (VERBOSE) {\n System.out.println(\"Adding docs: \" + ord);\n }\n }\n int id = ids[ord];\n if (id != lastID) {\n if (random().nextInt(100) < missingPct) {\n missing.set(id);\n if (VERBOSE) {\n System.out.println(\" missing id=\" + id);\n }\n }\n\n if (doc != null) {\n w.addDocument(doc);\n if (random().nextInt(100) < deletedPct) {\n int idToDelete = random().nextInt(id);\n w.deleteDocuments(new Term(\"id\", \"\" + idToDelete));\n deleted.set(idToDelete);\n if (VERBOSE) {\n System.out.println(\" delete id=\" + idToDelete);\n }\n }\n }\n\n doc = new Document();\n doc.add(newStringField(\"id\", \"\" + id, Field.Store.NO));\n doc.add(new NumericDocValuesField(\"id\", id));\n lastID = id;\n }\n\n if (missing.get(id) == false) {\n doc.add(new BinaryPoint(\"value\", docValues[ord]));\n if (VERBOSE) {\n System.out.println(\"id=\" + id);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\" dim=\" + dim + \" value=\" + bytesToString(docValues[ord][dim]));\n }\n }\n }\n }\n\n w.addDocument(doc);\n\n if (random().nextBoolean()) {\n if (VERBOSE) {\n System.out.println(\" forceMerge(1)\");\n }\n w.forceMerge(1);\n }\n final IndexReader r = DirectoryReader.open(w);\n w.close();\n\n IndexSearcher s = newSearcher(r, false);\n\n int numThreads = TestUtil.nextInt(random(), 2, 5);\n\n if (VERBOSE) {\n System.out.println(\"TEST: use \" + numThreads + \" query threads; searcher=\" + s);\n }\n\n List<Thread> threads = new ArrayList<>();\n final int iters = atLeast(100);\n\n final CountDownLatch startingGun = new CountDownLatch(1);\n final AtomicBoolean failed = new AtomicBoolean();\n\n for (int i = 0; i < numThreads; i++) {\n Thread thread =\n new Thread() {\n @Override\n public void run() {\n try {\n _run();\n } catch (Exception e) {\n failed.set(true);\n throw new RuntimeException(e);\n }\n }\n\n private void _run() throws Exception {\n startingGun.await();\n\n for (int iter = 0; iter < iters && failed.get() == false; iter++) {\n\n byte[][] lower = new byte[numDims][];\n byte[][] upper = new byte[numDims][];\n for (int dim = 0; dim < numDims; dim++) {\n lower[dim] = new byte[bytesPerDim];\n random().nextBytes(lower[dim]);\n\n upper[dim] = new byte[bytesPerDim];\n random().nextBytes(upper[dim]);\n\n if (Arrays.compareUnsigned(lower[dim], 0, bytesPerDim, upper[dim], 0, bytesPerDim)\n > 0) {\n byte[] x = lower[dim];\n lower[dim] = upper[dim];\n upper[dim] = x;\n }\n }\n\n if (VERBOSE) {\n System.out.println(\n \"\\n\" + Thread.currentThread().getName() + \": TEST: iter=\" + iter);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n }\n }\n\n Query query = BinaryPoint.newRangeQuery(\"value\", lower, upper);\n\n if (VERBOSE) {\n System.out.println(Thread.currentThread().getName() + \": using query: \" + query);\n }\n\n final FixedBitSet hits =\n s.search(query, FixedBitSetCollector.createManager(r.maxDoc()));\n\n if (VERBOSE) {\n System.out.println(\n Thread.currentThread().getName() + \": hitCount: \" + hits.cardinality());\n }\n\n BitSet expected = new BitSet();\n for (int ord = 0; ord < numValues; ord++) {\n int id = ids[ord];\n if (missing.get(id) == false\n && deleted.get(id) == false\n && matches(bytesPerDim, lower, upper, docValues[ord])) {\n expected.set(id);\n }\n }\n\n NumericDocValues docIDToID = MultiDocValues.getNumericValues(r, \"id\");\n\n int failCount = 0;\n for (int docID = 0; docID < r.maxDoc(); docID++) {\n assertEquals(docID, docIDToID.nextDoc());\n int id = (int) docIDToID.longValue();\n if (hits.get(docID) != expected.get(id)) {\n System.out.println(\n \"FAIL: iter=\"\n + iter\n + \" id=\"\n + id\n + \" docID=\"\n + docID\n + \" expected=\"\n + expected.get(id)\n + \" but got \"\n + hits.get(docID)\n + \" deleted?=\"\n + deleted.get(id)\n + \" missing?=\"\n + missing.get(id));\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" range: \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n failCount++;\n }\n }\n }\n if (failCount != 0) {\n fail(failCount + \" hits were wrong\");\n }\n }\n }\n };\n thread.setName(\"T\" + i);\n thread.start();\n threads.add(thread);\n }\n\n startingGun.countDown();\n for (Thread thread : threads) {\n thread.join();\n }\n\n IOUtils.close(r, dir);\n }", "boolean isCounting();", "@Test\n public void testQueryWithAllSegmentsAreEmpty() throws SqlParseException {\n\n val project = \"heterogeneous_segment\";\n val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\";\n // val seg1Id = \"8892fa3f-f607-4eec-8159-7c5ae2f16942\" [20120101000000_20120102000000]\n // val seg2Id = \"d75a822c-788a-4592-a500-cf20186dded1\" [20120102000000_20120103000000]\n // val seg3Id = \"54eaf96d-6146-45d2-b94e-d5d187f89919\" [20120103000000_20120104000000]\n // val seg4Id = \"411f40b9-a80a-4453-90a9-409aac6f7632\" [20120104000000_20120105000000]\n // val seg5Id = \"a8318597-cb75-416f-8eb8-96ea285dd2b4\" [20120105000000_20120106000000]\n\n EnhancedUnitOfWork.doInTransactionWithCheckAndRetry(() -> {\n NDataflowManager dfMgr = NDataflowManager.getInstance(getTestConfig(), project);\n NDataflow dataflow = dfMgr.getDataflow(dfId);\n Segments<NDataSegment> segments = dataflow.getSegments();\n // update\n NDataflowUpdate dataflowUpdate = new NDataflowUpdate(dfId);\n dataflowUpdate.setToRemoveSegs(segments.toArray(new NDataSegment[0]));\n dfMgr.updateDataflow(dataflowUpdate);\n return null;\n }, project);\n\n val sql = \"select cal_dt, sum(price), count(*) from test_kylin_fact inner join test_account \\n\"\n + \"on test_kylin_fact.seller_id = test_account.account_id \\n\"\n + \"where cal_dt between date'2012-01-01' and date'2012-01-03'\\n\" //\n + \"group by cal_dt\\n\";\n\n MetadataTestUtils.updateProjectConfig(project, \"kylin.query.index-match-rules\", QueryRouter.USE_VACANT_INDEXES);\n try (QueryContext queryContext = QueryContext.current()) {\n OLAPContext olapContext = OlapContextTestUtil.getOlapContexts(project, sql).get(0);\n StorageContext storageContext = olapContext.storageContext;\n Assert.assertEquals(-1L, storageContext.getLayoutId().longValue());\n Assert.assertFalse(queryContext.getQueryTagInfo().isVacant());\n }\n }", "public synchronized boolean writeLiveDocs() throws IOException {\n\t\tif (mPendingDeleteCount != 0) {\n\t\t\t// We have new deletes\n\t\t\tassert mLiveDocs.length() == mInfo.getSegmentInfo().getDocCount();\n\n\t\t\t// We can write directly to the actual name (vs to a\n\t\t\t// .tmp & renaming it) because the file is not live\n\t\t\t// until segments file is written:\n\t\t\tILiveDocsFormat liveDocsFormat = mWriter.getIndexFormat().getLiveDocsFormat();\n\t\t\tliveDocsFormat.writeLiveDocs(mWriter.getDirectory(), \n\t\t\t\t\t(MutableBits)mLiveDocs, mInfo, mPendingDeleteCount);\n\n\t\t\t// If we hit an exc in the line above (eg disk full)\n\t\t\t// then info remains pointing to the previous\n\t\t\t// (successfully written) del docs:\n\t\t\tmInfo.advanceDelGen();\n\t\t\tmInfo.setDelCount(mInfo.getDelCount() + mPendingDeleteCount);\n\n\t\t\tmPendingDeleteCount = 0;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Test\n public void write100Megs() throws Exception {\n final int segmentSize = 0x00100000;\n final int expectedSegments = 100;\n \n for (int i = 0; i < expectedSegments; i++) {\n journal.append(bytes(segmentSize));\n }\n journal.drain();\n \n Assert.assertEquals(expectedSegments * 2, dir.list().length);\n }", "int getChunksCount();", "int getChunksCount();", "int docValueCount() throws IOException;", "boolean hasStoreChunkResponse();", "public Integer getDocumentCount() {\n return null;\n }", "@Test\n public void testChunkType() {\n final int[] count = new int[255];\n final SctpChunk.Type[] types = SctpChunk.Type.values();\n for (int i = 0; i < types.length; ++i) {\n count[types[i].getType()] = count[types[i].getType()] + 1;\n }\n\n for (int i = 0; i < count.length; ++i) {\n assertThat(\"Found multiple type definitions for Chunk Type \" + i, count[i] < 2, is(true));\n }\n\n }", "public void testMarkFragmentProcessed() throws XMLStreamException {\n\t\tmoveCursorBeforeFragmentStart();\n\n\t\tfragmentReader.markStartFragment(); // mark the fragment start\n\t\t\n\t\t// read only one event to move inside the fragment\n\t\tXMLEvent startFragment = fragmentReader.nextEvent(); \n\t\tassertTrue(startFragment.isStartDocument());\n\t\tfragmentReader.markFragmentProcessed(); // mark fragment as processed\n\n\t\tfragmentReader.nextEvent(); // skip whitespace\n\t\t// the next element after fragment end is <misc2/>\n\t\tXMLEvent misc2 = fragmentReader.nextEvent(); \n\t\tassertTrue(EventHelper.startElementName(misc2).equals(\"misc2\"));\n\t}", "public void know_doc_Report()\n {\n\t boolean knowedgepresent =knowdoc.size()>0;\n\t if(knowedgepresent)\n\t {\n\t\t // System.out.println(\"Knowledge document details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Knowledge document details report is not present\");\n\t }\n }", "public boolean hasCounter() {\n return counterBuilder_ != null || counter_ != null;\n }", "boolean hasStoreChunk();", "int getHdfsMetricsCount();", "public int numberOfSegments() {\n return nOfSegs;\n }", "public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) {\n if (aStatus.isException()) {\n String docURI = getDocumentURI(aCas);\n docsWithException.add(docURI);\n docsProcessedWithException++;\n System.err.println(String.format(\"During the processing of %s\", docURI));\n List<Exception> exceptions = aStatus.getExceptions();\n for (int i = 0; i < exceptions.size(); i++) {\n ((Throwable) exceptions.get(i)).printStackTrace();\n }\n return;\n }\n entityCount++;\n String docText = aCas.getDocumentText();\n if (docText != null) {\n size += docText.length();\n }\n if (entityReportingInterval != 0 && entityCount % entityReportingInterval == 0) {\n System.out.println(String.format(\"%s entities have been processed\", entityCount));\n }\n }", "@Override\n public boolean isEmpty() {\n\t/*\n\t * Sum per-segment modCounts to avoid mis-reporting when\n\t * elements are concurrently added and removed in one segment\n\t * while checking another, in which case the table was never\n\t * actually empty at any point. (The sum ensures accuracy up\n\t * through at least 1&lt;&lt;31 per-segment modifications before\n\t * recheck.) Methods size() and containsValue() use similar\n\t * constructions for stability checks.\n\t */\n\tlong sum = 0L;\n\tfinal Segment&lt;K, V&gt;[] segments = this.segments;\n\tfor (int j = 0; j &lt; segments.length; ++j) {\n\t Segment&lt;K, V&gt; seg = segmentAt(segments, j);\n\t if (seg != null) {\n\t\tif (seg.count != 0) {\n\t\t return false;\n\t\t}\n\t\tsum += seg.modCount;\n\t }\n\t}\n\tif (sum != 0L) { // recheck unless no modifications\n\t for (int j = 0; j &lt; segments.length; ++j) {\n\t\tSegment&lt;K, V&gt; seg = segmentAt(segments, j);\n\t\tif (seg != null) {\n\t\t if (seg.count != 0) {\n\t\t\treturn false;\n\t\t }\n\t\t sum -= seg.modCount;\n\t\t}\n\t }\n\t if (sum != 0L) {\n\t\treturn false;\n\t }\n\t}\n\treturn true;\n }", "public int size() {\n return documents.size();\n }", "int getReceivingMinorFragmentIdCount();", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n Range range0 = Range.of(1002L, 2447L);\n range0.spliterator();\n List<Range> list0 = range0.split(1002L);\n assertFalse(list0.contains(range0));\n assertEquals(2, list0.size());\n }", "int getPartsCount();", "int getPartsCount();", "public abstract long countAllClinicalDocuments();", "public int getDocumentCount() {\n return this.documentCount;\n }", "boolean hasFrequency();", "public boolean isSetFilesMaterializedFromCASCount() {\n return EncodingUtils.testBit(__isset_bitfield, __FILESMATERIALIZEDFROMCASCOUNT_ISSET_ID);\n }", "private static int df(TLongLongMap docs, Map<Long, Document> docsMap) {\n\t\tint compteur = 0;\n\t\tlong[] keys = docs.keys();\n\t\t\n\t\tfor (int i = 0; i < keys.length; i ++) {\n\t\t\tif (docsMap.get(keys[i]).getType() == Document.Type_Element.ARTICLE \n\t\t\t\t\t&& docsMap.get(keys[i]).getCheminDocument().equals(\"article[1]/\")) {\n\t\t\t\tcompteur += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn compteur;\n\t}", "int getEventMetadataCount();", "long getPersistenceCount();", "public void print_documents_per_label_count() {\n\t\tSystem.out.println(\"SPORTS=\" + m_sports_count);\n\t\tSystem.out.println(\"BUSINESS=\" + m_business_count);\n\t}", "boolean hasEmbeddingTokenHigh();", "boolean hasEmbeddingTokenHigh();" ]
[ "0.6867201", "0.6019951", "0.59725845", "0.5728855", "0.5695923", "0.5607622", "0.5581056", "0.5554607", "0.5511263", "0.55013144", "0.5499854", "0.54692584", "0.54627293", "0.54070145", "0.5403452", "0.53707457", "0.53568536", "0.53343827", "0.531267", "0.53118104", "0.5297844", "0.5295272", "0.5275299", "0.5261964", "0.52554244", "0.5248105", "0.52464616", "0.5246126", "0.52442074", "0.5225377", "0.5223879", "0.52200884", "0.51567894", "0.5151026", "0.5148864", "0.5132963", "0.51324135", "0.51290935", "0.5122475", "0.5120131", "0.51173365", "0.5094094", "0.5090872", "0.5080386", "0.5077648", "0.5076475", "0.5072847", "0.5065008", "0.5062596", "0.5060988", "0.5060988", "0.5060988", "0.50598395", "0.5056997", "0.50496453", "0.50424737", "0.5026643", "0.50223154", "0.50200623", "0.5019569", "0.5017325", "0.5016872", "0.5016753", "0.50148743", "0.50118047", "0.50085247", "0.50077456", "0.5004464", "0.5002315", "0.5001848", "0.49982047", "0.49931446", "0.49931446", "0.49912435", "0.49813747", "0.49807653", "0.49781078", "0.49722266", "0.49698672", "0.496377", "0.49543163", "0.49540794", "0.49467763", "0.49426", "0.49370924", "0.49354064", "0.49347538", "0.49217764", "0.4918481", "0.4918481", "0.49065492", "0.4904719", "0.4894738", "0.48887935", "0.48821795", "0.48754242", "0.4873347", "0.48652688", "0.48638347", "0.48638347" ]
0.6185506
1
Test whether the numbers of documents in merged segments are reported correctly
@Test public void mergedTest() { for ( int i = 0; i < InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD * InvertedIndexManager.DEFAULT_MERGE_THRESHOLD; i++ ) { iim.addDocument(dummy); } for (int i = 0; i < InvertedIndexManager.DEFAULT_MERGE_THRESHOLD / 2; i++) { assertEquals( InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD * 2, iim.getNumDocuments(i) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean shouldMerge() {\n return mergeState.segmentInfo.getDocCount() > 0;\n }", "private int checkIntersections(ArrayList<Segment> segments){\n\t\tint numberOfIntersections = 0;\n\t\tfor (Segment s: segments){\n\t\t\tSegment firstSegment = s;\n\t\t\tfor (Segment t: segments){\n\t\t\t\tSegment secondSegment = t;\n\t\t\t\tif (!(firstSegment.equals(secondSegment))){\n\t\t\t\t\tif (!this.checkSharedVertex(firstSegment, secondSegment)){\n\t\t\t\t\t\tif(this.isIntersected(firstSegment.w1, firstSegment.w2, secondSegment.w1, secondSegment.w2))\n\t\t\t\t\t\t\tnumberOfIntersections ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn numberOfIntersections;\n\t}", "public synchronized boolean verifyDocCounts() {\n\t\tfinal int docCount = mInfo.getSegmentInfo().getDocCount();\n\t\t\n\t\tint count;\n\t\tif (mLiveDocs != null) {\n\t\t\tcount = 0;\n\t\t\tfor (int docID=0; docID < docCount; docID++) {\n\t\t\t\tif (mLiveDocs.get(docID)) \n\t\t\t\t\tcount ++;\n\t\t\t}\n\t\t} else {\n\t\t\tcount = docCount;\n\t\t}\n\n\t\tassert docCount - mInfo.getDelCount() - mPendingDeleteCount == count: \n\t\t\t\"info.docCount=\" + docCount + \" info.getDelCount()=\" + mInfo.getDelCount() + \n\t\t\t\" pendingDeleteCount=\" + mPendingDeleteCount + \" count=\" + count;\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void mergeWithStopAfterFirstSegment() throws IOException, MkvElementVisitException {\n final CountVisitor countVisitor = runMergerToStopAtFirstNonMatchingSegment(\"output_get_media.mkv\");\n\n //Validate that there is only one EBML header and segment and tracks\n //but there are 32 clusters and tracks as expected.\n assertCountsAfterMerge(countVisitor);\n }", "int getNumSegments();", "boolean hasSegments();", "boolean hasChunksCount();", "int getTokenSegmentCount();", "@Test\n @Ignore(\"Not necessary anymore\")\n public void doWeNeedToRepointParentOrganisationsAfterMerge() {\n String line;\n Long mergingID;\n Long survivingID;\n List<Long> mergedIds = new ArrayList<>();\n int counter = 0;\n try {\n\n File file = new File(\"OrganisationsThatHaveBeenMergedOnVertec.txt\");\n\n FileReader reader = new FileReader(file.getAbsolutePath());\n BufferedReader breader = new BufferedReader(reader);\n while ((line = breader.readLine()) != null) {\n String[] parts = line.split(\",\");\n mergingID = Long.parseLong(parts[0]);\n survivingID = Long.parseLong(parts[1]);\n mergedIds.add(mergingID);\n\n }\n for (Long id : mergedIds) {\n String uri = baseURI + \"/org/\" + id;\n JSONOrganisation org = getFromVertec(uri, JSONOrganisation.class).getBody();\n if (!org.getChildOrganisationList().isEmpty() || org.getParentOrganisationId() != null) {\n System.out.println(\"parent: \" + org.getParentOrganisationId());\n System.out.println(\"child: \" + org.getChildOrganisationList());\n System.out.println(\"Org: \" + org.getName() + \"(v_id: \" + org.getObjid() + \")\");\n\n counter++;\n }\n }\n System.out.println(\"Total nr of merged away orgs with relatives: \" + counter);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Test\n public void testExecute() {\n for (int i = 0; i < 10; i++) {\n // create test objects\n List<TranslationFile> c = TestObjectBuilder.getCommittedTestCorpus();\n TranslationFile mainFile = c.get(0);\n Dispatcher d = TestObjectBuilder.getDispatcher(mainFile, c);\n mainFile = d.getState().getMainFile();\n\n // makes 5 segments\n Segment seg1 = mainFile.getActiveSegs().get(0);\n Segment seg2 = mainFile.getActiveSegs().get(1);\n Segment seg3 = mainFile.getActiveSegs().get(2);\n Segment seg4 = mainFile.getActiveSegs().get(3);\n Segment seg5 = mainFile.getActiveSegs().get(4);\n\n ArrayList<Segment> selectedSegs = new ArrayList();\n switch (i) {\n case 0: {\n // if i=0 --> 'merge' first seg (no change)\n\n selectedSegs.add(seg1);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 1: {\n // if i=1 --> merge first two\n StringBuilder sb = new StringBuilder(seg1.getThai());\n sb.append(seg2.getThai()); // combine the Thai from both segs\n\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 2: {\n // if i=2 --> merge first three\n StringBuilder sb = new StringBuilder(seg1.getThai());\n sb.append(seg2.getThai());\n sb.append(seg3.getThai());// combine the Thai from the three segs\n\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(3, mainFile.getActiveSegs().size());\n assertEquals(3, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(seg4.getThai(), d.getUIState().getMainFileSegs().get(1).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n case 3: {\n // if i=3 --> merge tu2-tu3\n StringBuilder sb = new StringBuilder(seg2.getThai());\n sb.append(seg3.getThai());\n\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(sb.toString(), d.getUIState().getMainFileSegs().get(1).getThai());\n assertEquals(seg1.getThai(), d.getUIState().getMainFileSegs().get(0).getThai());\n assertEquals(seg4.getThai(), d.getUIState().getMainFileSegs().get(2).getThai());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=4 --> merge 1-3\n case 4: {\n\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(4, mainFile.getActiveSegs().size());\n assertEquals(2, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=5 --> merge 3-end\n case 5: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(3, d.getState().getMainFile().getActiveSegs().size());\n assertEquals(3, d.getState().getMainFile().getHiddenSegs().size());\n assertEquals(\"th1th2th3\", mainFile.getActiveSegs().get(0).getThai());\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg5), true);\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=6 --> merge only end (no difference)\n case 6: {\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=7 --> merge all segs\n case 7: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(1, mainFile.getActiveSegs().size());\n assertEquals(5, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getHiddenSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getHiddenSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=8 --> selectedItems is empty (but not null)\n case 8: {\n d.acceptAction(new Merge(selectedSegs));\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=9 --> merge repeatedly\n case 9: {\n // merges seg1 and seg2\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n d.acceptAction(new Merge(selectedSegs));\n\n //merges seg3 and seg4\n selectedSegs = new ArrayList();\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n d.acceptAction(new Merge(selectedSegs));\n\n // at this point the file should have three segments in activeSegs\n // the first two segs are the result of the prior merges\n // the last seg is seg5\n // now we merge the second merged seg with seg5\n selectedSegs = new ArrayList();\n selectedSegs.add(mainFile.getActiveSegs().get(1));\n selectedSegs.add(seg5);\n d.acceptAction(new Merge(selectedSegs));\n\n // this should result in the file now only having two active segs\n assertEquals(2, mainFile.getActiveSegs().size());\n assertEquals(6, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getHiddenSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getHiddenSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getHiddenSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getHiddenSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getHiddenSegs().get(5).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n // if i=10 --> merge invalid argument (segs not contiguous)\n case 10: {\n selectedSegs.add(seg1);\n selectedSegs.add(seg2);\n selectedSegs.add(seg3);\n selectedSegs.add(seg4);\n selectedSegs.add(seg2); // this seg is repeated and out of order\n d.acceptAction(new Merge(selectedSegs));\n\n assertEquals(5, mainFile.getActiveSegs().size());\n assertEquals(0, mainFile.getHiddenSegs().size());\n assertEquals(mainFile.getActiveSegs().get(0).equals(seg1), true);\n assertEquals(mainFile.getActiveSegs().get(1).equals(seg2), true);\n assertEquals(mainFile.getActiveSegs().get(2).equals(seg3), true);\n assertEquals(mainFile.getActiveSegs().get(3).equals(seg4), true);\n assertEquals(mainFile.getActiveSegs().get(4).equals(seg5), true);\n\n assertEquals(mainFile, DatabaseOperations.getFile(mainFile.getFileID()));\n break;\n }\n default:\n break;\n }\n\n }\n }", "boolean hasSegment();", "int getSentenceSegmentCount();", "@Test\n public void testSegmentSelection() {\n assertMetrics(\"segments:2 absoluteProximity:0.1 proximity:1 segmentStarts:19,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a b c x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n // Same as above but best matching segment have too low exactness\n assertMetrics(\"segments:2 absoluteProximity:0.0903 proximity:0.9033 segmentStarts:1,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a:0.2 b:0.3 c:0.4 x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n assertMetrics(\"segments:1 absoluteProximity:0.0778 proximity:0.778\",\"a b c d e f\",\"x x a b b b c f e d a b c d x e x x x x x f d e f a b c a a b b c c d d e e f f\");\n\n // Prefer one segment with ok proximity over two segments with great proximity\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x x x x x x x x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n }", "@Test\n public void testPersistedSegmentCount_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n int expResult = 2;\n int result = instance.persistedSegmentCount();\n assertEquals(expResult, result);\n\n }", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n Range range0 = Range.ofLength(0L);\n Range range1 = Range.of(0L);\n Range range2 = range1.intersection(range0);\n boolean boolean0 = range0.equals(range2);\n assertFalse(range1.isEmpty());\n assertTrue(range2.isEmpty());\n assertFalse(range2.equals((Object)range1));\n assertTrue(boolean0);\n }", "private static int df(TLongLongMap docs, Map<Long, Document> docsMap) {\n\t\tint compteur = 0;\n\t\tlong[] keys = docs.keys();\n\t\t\n\t\tfor (int i = 0; i < keys.length; i ++) {\n\t\t\tif (docsMap.get(keys[i]).getType() == Document.Type_Element.ARTICLE \n\t\t\t\t\t&& docsMap.get(keys[i]).getCheminDocument().equals(\"article[1]/\")) {\n\t\t\t\tcompteur += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn compteur;\n\t}", "@java.lang.Override\n public int getTokenSegmentCount() {\n return tokenSegment_.size();\n }", "int section(float mbr[])\r\n {\r\n boolean inside;\r\n boolean overlap;\r\n int i;\r\n \r\n overlap = true;\r\n inside = true;\r\n for (i = 0; i < dimension; i++)\r\n {\r\n if (mbr[2*i] > bounces[2*i + 1] ||\r\n mbr[2*i + 1] < bounces[2*i]) \r\n overlap = false;\r\n if (mbr[2*i] < bounces[2*i] ||\r\n mbr[2*i + 1] > bounces[2*i + 1]) \r\n inside = false;\r\n }\r\n if (inside)\r\n return Constants.INSIDE;\r\n else if (overlap)\r\n return Constants.OVERLAP;\r\n else\r\n return Constants.S_NONE;\r\n }", "@Test\n public void testPersistedSegmentCount() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n int expResult = 0;\n int result = instance.persistedSegmentCount();\n assertEquals(expResult, result);\n\n }", "private static int mergeAndCountSplit(Comparable[] a, Comparable[] aux, int lo, int mid, int hi) {\n // assert that the sub arrays are sorted\n assert isSorted(a, lo, mid);\n assert isSorted(a, mid+1, hi);\n\n // copy all elements from a to aux\n for (int i = lo; i <= hi; i++)\n aux[i] = a[i];\n\n // maintain a count of number of split inversions\n int splitInversions = 0;\n\n // do a merge and count\n int i = lo, j = mid+1;\n for (int k = lo; k <= hi; k++) {\n // boundary check\n if (i > mid) a[k] = aux[j++];\n else if(j > hi) a[k] = aux[i++];\n else if (less(aux[i], aux[j])) a[k] = aux[i++];\n else {\n // copy element into a\n a[k] = aux[j++];\n // this is where split inversions are\n splitInversions += (mid - i + 1);\n }\n if (debug)\n System.out.println(\"a[k]: \" + a[k]);\n }\n\n // assert that entire array is sorted\n assert isSorted(a, lo, hi);\n return splitInversions;\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n Range range0 = Range.ofLength(212L);\n range0.getEnd();\n Range range1 = Range.ofLength(126L);\n Range range2 = range0.intersection(range1);\n assertFalse(range2.isEmpty());\n \n Object object0 = new Object();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals(211L, long0);\n assertFalse(range0.equals((Object)range2));\n \n long long1 = range1.getBegin();\n assertSame(range1, range2);\n assertEquals(0L, long1);\n }", "@Test\n public void fieldMergeRec() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"Dear \");\n FieldMergeField fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Name\");\n builder.writeln(\",\");\n\n // A MERGEREC field will print the row number of the data being merged in every merge output document.\n builder.write(\"\\nRow number of record in data source: \");\n FieldMergeRec fieldMergeRec = (FieldMergeRec) builder.insertField(FieldType.FIELD_MERGE_REC, true);\n\n Assert.assertEquals(fieldMergeRec.getFieldCode(), \" MERGEREC \");\n\n // A MERGESEQ field will count the number of successful merges and print the current value on each respective page.\n // If a mail merge skips no rows and invokes no SKIP/SKIPIF/NEXT/NEXTIF fields, then all merges are successful.\n // The MERGESEQ and MERGEREC fields will display the same results of their mail merge was successful.\n builder.write(\"\\nSuccessful merge number: \");\n FieldMergeSeq fieldMergeSeq = (FieldMergeSeq) builder.insertField(FieldType.FIELD_MERGE_SEQ, true);\n\n Assert.assertEquals(fieldMergeSeq.getFieldCode(), \" MERGESEQ \");\n\n // Insert a SKIPIF field, which will skip a merge if the name is \"John Doe\".\n FieldSkipIf fieldSkipIf = (FieldSkipIf) builder.insertField(FieldType.FIELD_SKIP_IF, true);\n builder.moveTo(fieldSkipIf.getSeparator());\n fieldMergeField = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n fieldMergeField.setFieldName(\"Name\");\n fieldSkipIf.setLeftExpression(\"=\");\n fieldSkipIf.setRightExpression(\"John Doe\");\n\n // Create a data source with 3 rows, one of them having \"John Doe\" as a value for the \"Name\" column.\n // Since a SKIPIF field will be triggered once by that value, the output of our mail merge will have 2 pages instead of 3.\n // On page 1, the MERGESEQ and MERGEREC fields will both display \"1\".\n // On page 2, the MERGEREC field will display \"3\" and the MERGESEQ field will display \"2\".\n DataTable table = new DataTable(\"Employees\");\n table.getColumns().add(\"Name\");\n table.getRows().add(new String[]{\"Jane Doe\"});\n table.getRows().add(new String[]{\"John Doe\"});\n table.getRows().add(new String[]{\"Joe Bloggs\"});\n\n doc.getMailMerge().execute(table);\n doc.save(getArtifactsDir() + \"Field.MERGEREC.MERGESEQ.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.MERGEREC.MERGESEQ.docx\");\n\n Assert.assertEquals(0, doc.getRange().getFields().getCount());\n\n Assert.assertEquals(\"Dear Jane Doe,\\r\" +\n \"\\r\" +\n \"Row number of record in data source: 1\\r\" +\n \"Successful merge number: 1\\fDear Joe Bloggs,\\r\" +\n \"\\r\" +\n \"Row number of record in data source: 3\\r\" +\n \"Successful merge number: 2\", doc.getText().trim());\n }", "private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);\r\n int vertexCount = outline.getVertexCount();\r\n for(int i=0; i < outline.getVertexCount(); i++) {\r\n final Vertex currentVertex = outline.getVertex(i);\r\n if ( !currentVertex.isOnCurve()) {\r\n final Vertex nextV = outline.getVertex((i+1)%vertexCount);\r\n final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);\r\n final Vertex overlap;\r\n\r\n // check for overlap even if already set for subdivision\r\n // ensuring both triangular overlaps get divided\r\n // for pref. only check in first pass\r\n // second pass to clear the overlaps array(reduces precision errors)\r\n if( firstpass ) {\r\n overlap = checkTriOverlaps0(prevV, currentVertex, nextV);\r\n } else {\r\n overlap = null;\r\n }\r\n if( overlaps.contains(currentVertex) || overlap != null ) {\r\n overlaps.remove(currentVertex);\r\n\r\n subdivideTriangle(outline, prevV, currentVertex, nextV, i);\r\n i+=3;\r\n vertexCount+=2;\r\n addedVerticeCount+=2;\r\n\r\n if(overlap != null && !overlap.isOnCurve()) {\r\n if(!overlaps.contains(overlap)) {\r\n overlaps.add(overlap);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n firstpass = false;\r\n } while( !overlaps.isEmpty() );\r\n }", "private boolean isNormalCountOK(int normalObs, int numNormalReads, int tumorObs) {\n\t\treturn normalObs == 0 || (tumorObs >= 20 && numNormalReads >= 20);\t\t\n\t}", "public int getTotalSegments() {\n return totalSegments;\n }", "int getMergedCellCount();", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n Range range0 = Range.of(1002L, 2447L);\n range0.spliterator();\n List<Range> list0 = range0.split(1002L);\n assertFalse(list0.contains(range0));\n assertEquals(2, list0.size());\n }", "int getDocumentCount();", "int numDocuments();", "public void FPsOverlapSeperateSections(CollectionReader reader) throws IOException {\n\t\tString outputfile = \"./output/TermOverlap/termoverlp-FPs-config(2):seperatesections.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\t\tEvaluateResults er = new EvaluateResults();\n\t\t//\t\tAnalyseFNs afn = new AnalyseFNs();\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics.xml\");\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\t//\t\t\tArrayList<String> enfns = afn.getEnglishFNs(queryid);\n\t\t\tif(fps != null){\n\t\t\t\tint n_fps = fps.size();\n\n\t\t\t\tQueryGneration query = new QueryGneration(querypath + queryfile, 0, 1, 0, 0, 0, 0, true, true);\n\t\t\t\tMap<String, Integer> qterms = query.getSectionTerms(queryfield);\n\t\t\t\tint querysize = qterms.size();\n\n\t\t\t\tfloat sum =0;\n\t\t\t\tfloat usum =0;\n\t\t\t\tfloat avg = 0;\n\t\t\t\tfloat uavg = 0;\n\t\t\t\tfloat overlapratio = 0;\n\t\t\t\tfloat uoverlapratio = 0;\n\t\t\t\t//\t\t\tint querydocintersection;\n\t\t\t\tint querytitleoverlap;\n\t\t\t\tint queryabsoverlap;\n\t\t\t\tint querydescoverlap;\n\t\t\t\tint queryclaimsoverlap;\n\t\t\t\tint SectionsSumOverlap;\n\t\t\t\t//\t\t\tint union;\n\t\t\t\tint titleunion;\n\t\t\t\tint absunion;\n\t\t\t\tint descunion;\n\t\t\t\tint claimsunion;\n\t\t\t\t//\t\t\tint dminusoverlap = 0;\n\t\t\t\tint titleminusoverlap;\n\t\t\t\tint absminusoverlap;\n\t\t\t\tint descminusoverlap;\n\t\t\t\tint claimsminusoverlap;\n\n\t\t\t\tint titlesize;\n\t\t\t\tint abssize;\n\t\t\t\tint descsize;\n\t\t\t\tint claimssize;\n\n\t\t\t\tif(n_fps != 0){\n\n\t\t\t\t\tSystem.out.println(queryid);\n\t\t\t\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\t//\t\t\t\tSystem.out.println(\"FN patent ID\" + \"\\t\" + \"overlap\" + \"\\t\" + \"|Q|\" + \"\\t\" + \"|D|\" + \"\\t\" + \"D-olap\" + \"\\t\" + \"|Q U D|\" + \"\\t\" + \"olap/|Q|\" + \"\\t\" + \"olap/|Q U D|\");\n\t\t\t\t\tSystem.out.println(\"TP patent ID\" + \"\\t\" + \"(qD,dT)\" + \"\\t\" + \"(qD,dA)\" + \"\\t\" + \"(qD,dD)\" + \"\\t\" + \"(qD,dC)\" + \"\\t\" + \"|Q|\" + \"\\t\" + \"|D U T|\" + \"\\t\" + \"|D U A|\" + \"\\t\" + \"|D U D|\" + \"\\t\" + \"|D U C|\"+ \"\\t\" + \"|sum/Q|\" + \" \\t\" + \"sum|O(docSecs)|\");\n\t\t\t\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\tfor (String doc : fps) { \n\t\t\t\t\t\t//\t\t\t\t\tquerydocintersection = 0;\n\t\t\t\t\t\tquerytitleoverlap = 0;\n\t\t\t\t\t\tqueryabsoverlap = 0;\n\t\t\t\t\t\tquerydescoverlap = 0;\n\t\t\t\t\t\tqueryclaimsoverlap = 0;\n\t\t\t\t\t\tSectionsSumOverlap = 0;\n\t\t\t\t\t\tHashSet<String> titleterms = reader.getDocTerms(\"UN-\"+doc, titlefield);\n\t\t\t\t\t\tHashSet<String> absterms = reader.getDocTerms(\"UN-\"+doc, absfield);\n\t\t\t\t\t\tHashSet<String> descterms = reader.getDocTerms(\"UN-\"+doc, descfield);\n\t\t\t\t\t\tHashSet<String> claimsterms = reader.getDocTerms(\"UN-\"+doc, claimsfield);\n\t\t\t\t\t\tif(titleterms!=null){titlesize = titleterms.size();}else{titlesize=0;}\n\t\t\t\t\t\tif(absterms!=null){abssize = absterms.size();}else{abssize = 0;}\n\t\t\t\t\t\tif(descterms!=null){descsize = descterms.size();}else{descsize = 0;}\n\t\t\t\t\t\tif(claimsterms!=null){claimssize = claimsterms.size();}else{claimssize = 0;}\n\n\t\t\t\t\t\tfor(Entry<String, Integer> t : qterms.entrySet()){\n\t\t\t\t\t\t\tif(titleterms!=null){boolean titleexists = titleterms.contains(t.getKey());\n\t\t\t\t\t\t\tif(titleexists){\n\t\t\t\t\t\t\t\tquerytitleoverlap++;}}\t\t\n\n\t\t\t\t\t\t\tif(absterms!=null){boolean absexists = absterms.contains(t.getKey());\n\t\t\t\t\t\t\tif(absexists){\n\t\t\t\t\t\t\t\tqueryabsoverlap++;\t}}\n\n\t\t\t\t\t\t\tif(descterms!=null){boolean descexists = descterms.contains(t.getKey());\n\t\t\t\t\t\t\tif(descexists){\n\t\t\t\t\t\t\t\tquerydescoverlap++;\t}}\n\n\t\t\t\t\t\t\tif(claimsterms!=null){boolean claimsexists = claimsterms.contains(t.getKey());\n\t\t\t\t\t\t\tif(claimsexists){\n\t\t\t\t\t\t\t\tqueryclaimsoverlap++;\t}}\t\t\t\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSectionsSumOverlap = querytitleoverlap + queryabsoverlap \n\t\t\t\t\t\t\t\t+ querydescoverlap + queryclaimsoverlap;\n\n\t\t\t\t\t\ttitleminusoverlap = titlesize - querytitleoverlap;\n\t\t\t\t\t\tabsminusoverlap = abssize - queryabsoverlap;\n\t\t\t\t\t\tdescminusoverlap = descsize - querydescoverlap;\n\t\t\t\t\t\tclaimsminusoverlap = claimssize - queryclaimsoverlap;\n\n\t\t\t\t\t\ttitleunion = querysize + titleminusoverlap;\n\t\t\t\t\t\tabsunion = querysize + absminusoverlap;\n\t\t\t\t\t\tdescunion = querysize + descminusoverlap;\n\t\t\t\t\t\tclaimsunion = querysize + claimsminusoverlap;\n\n\t\t\t\t\t\toverlapratio = (float)SectionsSumOverlap/querysize;\n\n\t\t\t\t\t\t/*System.out.println(querytitleoverlap + \"\\t\"+ titleunion + \"\\t\"+ (float)querytitleoverlap/titleunion); \n\t\t\t\t\tSystem.out.println(queryabsoverlap + \"\\t\"+ absunion+ \"\\t\"+ (float)queryabsoverlap/absunion); \n\t\t\t\t\tSystem.out.println(querydescoverlap + \"\\t\"+ descunion+ \"\\t\"+ (float)querydescoverlap/descunion); \n\t\t\t\t\tSystem.out.println(queryclaimsoverlap + \"\\t\"+ claimsunion+ \"\\t\"+(float)queryclaimsoverlap/claimsunion); */\n\n\t\t\t\t\t\tuoverlapratio = ((float)querytitleoverlap/titleunion\n\t\t\t\t\t\t\t\t+(float)queryabsoverlap/absunion+(float)querydescoverlap/descunion\n\t\t\t\t\t\t\t\t+(float)queryclaimsoverlap/claimsunion);\n\n\t\t\t\t\t\tsum = sum + overlapratio;\n\t\t\t\t\t\tusum = usum + uoverlapratio;\n\n\n\t\t\t\t\t\tSystem.out.println(doc + \"\\t\" + querytitleoverlap + \"\\t\" + queryabsoverlap + \"\\t\" + querydescoverlap + \"\\t\" + queryclaimsoverlap + \"\\t\" + querysize + \"\\t\" +titleunion + \"\\t\" +absunion + \"\\t\" +descunion + \"\\t\" + claimsunion + \"\\t\" + overlapratio + \"\\t\" + uoverlapratio);\n\t\t\t\t\t}\n\n\t\t\t\t\tavg = (float)sum/n_fps;\n\t\t\t\t\tuavg = (float)usum/n_fps;\n\t\t\t\t\tSystem.out.println(\"-----------------------------------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"Average Term Overlap: \" + avg);\n\t\t\t\t\tSystem.out.println(\"Union Average Term Overlap: \" + uavg);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tps.println(queryid + \"\\t\" + avg + \"\\t\" + uavg);\n\n\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(queryid+\"\\t\" + \"No FP for this query\");\n\t\t\t\t\tps.println(queryid+\"\\t\"+ \"No FP for this query\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\t\n\t}", "int countSpecifiedEnds();", "public int numberOfSegments() { \n\t\treturn numOfSeg;\n\t}", "public int numberOfSegments() {\n return segments.size();\n }", "@Test\n public void testNestedAlternatives() {\n assertMetrics(\"segmentStarts:6,19,32 proximity:1\",\n \"a b c d e f\",\n \"a x b x x x a b x x x x x x x x x x x c d x x x x x x x x x x x e f\");\n assertMetrics(\"segmentStarts:6,19,47 proximity:1\",\n \"a b c d e f\",\n \"a x b x x x a b x x x x x x x x x x x c d x x x x x x x x x x x e x f x x x x x x x x x x x x e f\");\n }", "protected int checkMergeShapes(FoundShape shapeA, FoundShape shapeB) {\n\t\tmembersAinB.clear();\n\t\tmembersBinA.clear();\n\n\t\t// find points which are mutual members\n\t\tfindMembersRigorous(shapeA, shapeB.points, membersBinA);\n\t\tfindMembersRigorous(shapeB, shapeA.points, membersAinB);\n\n\t\t// see if one of the shapes has a bunch of points in the other\n\t\tdouble fracAinB = membersAinB.size() / (double) shapeA.points.size();\n\t\tdouble fracBinA = membersBinA.size() / (double) shapeB.points.size();\n\n\t\tif (Math.max(fracAinB, fracBinA) <= commonMembershipFraction) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (fracAinB > fracBinA) {\n\t\t\t// B is the dominant one\n\t\t\tmodifiedDominant = mergeShape(shapeB, shapeA.points);\n\t\t\treturn 2;\n\t\t} else {\n\t\t\t// A is the dominant one\n\t\t\tmodifiedDominant = mergeShape(shapeA, shapeB.points);\n\t\t\treturn 1;\n\t\t}\n\t}", "public boolean hasRegionsCount() {\n return regionsCountBuilder_ != null || regionsCount_ != null;\n }", "public int numberOfSegments() {\n return 0;\n }", "MergeState merge() throws IOException {\n if (!shouldMerge()) {\n throw new IllegalStateException(\"Merge would result in 0 document segment\");\n }\n // NOTE: it's important to add calls to\n // checkAbort.work(...) if you make any changes to this\n // method that will spend alot of time. The frequency\n // of this check impacts how long\n // IndexWriter.close(false) takes to actually stop the\n // threads.\n mergeFieldInfos();\n setMatchingSegmentReaders();\n long t0 = 0;\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n int numMerged = mergeFields();\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge stored fields [\" + numMerged + \" docs]\");\n }\n assert numMerged == mergeState.segmentInfo.getDocCount();\n\n final SegmentWriteState segmentWriteState = new SegmentWriteState(mergeState.infoStream, directory, mergeState.segmentInfo, mergeState.fieldInfos, termIndexInterval, null, context);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n mergeTerms(segmentWriteState);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge postings [\" + numMerged + \" docs]\");\n }\n\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n if (mergeState.fieldInfos.hasDocValues()) {\n mergeDocValues(segmentWriteState);\n }\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge doc values [\" + numMerged + \" docs]\");\n }\n\n if (mergeState.fieldInfos.hasNorms()) {\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n mergeNorms(segmentWriteState);\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge norms [\" + numMerged + \" docs]\");\n }\n }\n\n if (mergeState.fieldInfos.hasVectors()) {\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n t0 = System.nanoTime();\n }\n numMerged = mergeVectors();\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n long t1 = System.nanoTime();\n mergeState.infoStream.message(\"SM\", ((t1 - t0) / 1000000) + \" msec to merge vectors [\" + numMerged + \" docs]\");\n }\n assert numMerged == mergeState.segmentInfo.getDocCount();\n }\n\n // write the merged infos\n FieldInfosWriter fieldInfosWriter = codec.fieldInfosFormat().getFieldInfosWriter();\n fieldInfosWriter.write(directory, mergeState.segmentInfo.name, \"\", mergeState.fieldInfos, context);\n\n return mergeState;\n }", "@Test\n void testProcess() {\n HtmlDocumentProcessor documentProcessor = new HtmlDocumentProcessor();\n Document document = Document.createShell(\"\");\n document.text(\"2hh 3aaa 4bbbbbb 5CCCCC 8eeeeeeee\"); // sets body text\n documentProcessor.process(document);\n Map<Integer, Long> counts = documentProcessor.getCounts();\n // expecting 10 e's (ASCII 101), 8 b's (ASCII 98), 5 C's (ASCII 67), 7 h's (ASCII 104), 2 t's (ASCII 116)\n assertEquals(counts.get(101), 10L);\n assertEquals(counts.get(98), 8L);\n assertEquals(counts.get(104), 6L);\n assertEquals(counts.get(67), 5L);\n assertEquals(counts.get(116), 2L);\n\n // process same doc again and verify doubled counts\n documentProcessor.process(document);\n counts = documentProcessor.getCounts();\n assertEquals(counts.get(101), 20L);\n assertEquals(counts.get(98), 16L);\n assertEquals(counts.get(104), 12L);\n assertEquals(counts.get(67), 10L);\n assertEquals(counts.get(116), 4L);\n }", "@Test public void testWithSegmentation() throws IOException\n {\n final File inDir = tempDir.toFile();\n final File outDir = tempDir.toFile();\n // Copy HDD file.\n try(final Reader r = DDNExtractorTest.getETVEGLLHDD2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_HDD)))\n { cpReaderToWriter(r, w); }\n }\n // Copy sample household data file.\n try(final Reader r = ETVParseTest.getNBulkSH2016H1CSVReader())\n {\n try(final FileWriter w = new FileWriter(new File(inDir, ETVSimpleDriverNBulkInputs.INPUT_FILE_NKWH)))\n { cpReaderToWriter(r, w); }\n }\n // Copy valve logs (from compressed to uncompressed form in, in this case).\n try(final Reader r = HDDUtil.getGZIPpedASCIIResourceReader(ETVParseTest.class, ETVParseTest.VALVE_LOG_SAMPLE_DIR + \"/2d1a.json.gz\"))\n {\n try(final FileWriter w = new FileWriter(new File(inDir, \"3015.json\")))\n { cpReaderToWriter(r, w); }\n }\n // Create (trivial) grouping...\n try(final Reader r = new StringReader(\"5013,3015\"))\n {\n try(final FileWriter w = new FileWriter(new File(inDir, OTLogActivityParse.LOGDIR_PATH_TO_GROUPING_CSV)))\n { cpReaderToWriter(r, w); }\n }\n\n // Ensure no old result files hanging around...\n final File basicResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_BASIC);\n basicResultFile.delete(); // Make sure no output file.\n assertFalse(\"output file should not yet exist\", basicResultFile.isFile());\n final File basicFilteredResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_FILTERED_BASIC);\n basicFilteredResultFile.delete(); // Make sure no output file.\n assertFalse(\"output filtered file should not yet exist\", basicFilteredResultFile.isFile());\n final File segmentedResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_SEGMENTED);\n segmentedResultFile.delete(); // Make sure no output file.\n assertFalse(\"output segmented file should not yet exist\", segmentedResultFile.isFile());\n final File summaryResultFile = new File(outDir, ETVSimpleDriverNBulkInputs.OUTPUT_STATS_FILE_MULITHOUSEHOLD_SUMMARY);\n summaryResultFile.delete(); // Make sure no output file.\n assertFalse(\"output summary file should not yet exist\", summaryResultFile.isFile());\n // Do the computation...\n ETVSimpleDriverNBulkInputs.doComputation(inDir, outDir);\n // Check results.\n assertTrue(\"output file should now exist\", basicResultFile.isFile());\n assertTrue(\"output filtered file should now exist\", basicFilteredResultFile.isFile());\n assertTrue(\"output segmented file should now exist\", segmentedResultFile.isFile());\n assertTrue(\"output summary file should now exist\", summaryResultFile.isFile());\n final String expected =\n \"\\\"house ID\\\",\\\"slope energy/HDD\\\",\\\"baseload energy\\\",\\\"R^2\\\",\\\"n\\\",\\\"efficiency gain if computed\\\"\\n\" +\n \"\\\"5013\\\",1.5532478,1.3065631,0.62608224,156,\\n\";\n final String actualBasic = new String(Files.readAllBytes(basicResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualBasic);\n final String actualFilteredBasic = new String(Files.readAllBytes(basicFilteredResultFile.toPath()), \"ASCII7\");\n assertEquals(expected, actualFilteredBasic);\n final String expectedS =\n \"\\\"house ID\\\",\\\"slope energy/HDD\\\",\\\"baseload energy\\\",\\\"R^2\\\",\\\"n\\\",\\\"efficiency gain if computed\\\"\\n\" +\n \"\\\"5013\\\",1.138506,5.764153,0.24607657,10,1.9855182\\n\";\n final String actualSegmented = new String(Files.readAllBytes(segmentedResultFile.toPath()), \"ASCII7\");\n//System.out.println(actualSegmented);\n assertEquals(expectedS, actualSegmented);\n final String expectedSummary =\n ETVHouseholdGroupSimpleSummaryStatsToCSV.headerCSV + '\\n' +\n \"1,1,10,0.24607657,0.0,1.138506,0.0,1.9855182,0.0\\n\";\n final String actualSummary = new String(Files.readAllBytes(summaryResultFile.toPath()), \"ASCII7\");\nSystem.out.println(actualSummary);\n assertEquals(expectedSummary, actualSummary);\n // TODO: verify textual report if any?\n }", "private static boolean isFourCombinedVerbs(AnalyzedTokenReadings[] tokens, int first, int last) {\n return tokens[first].hasPartialPosTag(\"KJ2\") && tokens[first + 1].hasPosTagStartingWith(\"PA2\")\n && tokens[first + 2].matchesPosTagRegex(\"VER:(.*INF|PA[12]).*\")\n && tokens[last].matchesPosTagRegex(\"VER:(MOD|AUX).*\");\n }", "public int numberOfSegments() {\n return nOfSegs;\n }", "int getAndSequenceGroupsCount();", "public static void test_merge() {\n assertThat(merge(new int[] {0, 1}, new int[] {2, 3})).isFalse();\n assertThat(merge(new int[] {2, 3}, new int[] {0, 1})).isFalse();\n\n // a0 b0 b1 a1\n // a0 b0 a1 b1\n assertThat(merge(new int[] {0, 1}, new int[] {0, 1})).isTrue();\n assertThat(merge(new int[] {0, 1}, new int[] {0, 2})).isTrue();\n assertThat(merge(new int[] {0, 1}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 2}, new int[] {1, 3})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 3})).isTrue();\n\n // b0 a0 a1 b1\n // b0 a0 b1 a1\n assertThat(merge(new int[] {0, 3}, new int[] {0, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 2})).isTrue();\n assertThat(merge(new int[] {0, 3}, new int[] {1, 3})).isTrue();\n assertThat(merge(new int[] {1, 2}, new int[] {0, 3})).isTrue();\n }", "int getObjectAnnotationsCount();", "int getObjectAnnotationsCount();", "boolean isMerged();", "private void setMatchingSegmentReaders() {\n int numReaders = mergeState.readers.size();\n mergeState.matchingSegmentReaders = new SegmentReader[numReaders];\n\n // If this reader is a SegmentReader, and all of its\n // field name -> number mappings match the \"merged\"\n // FieldInfos, then we can do a bulk copy of the\n // stored fields:\n for (int i = 0; i < numReaders; i++) {\n AtomicReader reader = mergeState.readers.get(i);\n // TODO: we may be able to broaden this to\n // non-SegmentReaders, since FieldInfos is now\n // required? But... this'd also require exposing\n // bulk-copy (TVs and stored fields) API in foreign\n // readers..\n if (reader instanceof SegmentReader) {\n SegmentReader segmentReader = (SegmentReader) reader;\n boolean same = true;\n FieldInfos segmentFieldInfos = segmentReader.getFieldInfos();\n for (FieldInfo fi : segmentFieldInfos) {\n FieldInfo other = mergeState.fieldInfos.fieldInfo(fi.number);\n if (other == null || !other.name.equals(fi.name)) {\n same = false;\n break;\n }\n }\n if (same) {\n mergeState.matchingSegmentReaders[i] = segmentReader;\n mergeState.matchedCount++;\n }\n }\n }\n\n if (mergeState.infoStream.isEnabled(\"SM\")) {\n mergeState.infoStream.message(\"SM\", \"merge store matchedCount=\" + mergeState.matchedCount + \" vs \" + mergeState.readers.size());\n if (mergeState.matchedCount != mergeState.readers.size()) {\n mergeState.infoStream.message(\"SM\", \"\" + (mergeState.readers.size() - mergeState.matchedCount) + \" non-bulk merges\");\n }\n }\n }", "@java.lang.Override\n public boolean hasRegionsCount() {\n return regionsCount_ != null;\n }", "@java.lang.Override\n public int getSentenceSegmentCount() {\n return sentenceSegment_.size();\n }", "int getNumberOfDocuments();", "public int sizeOfSegmentArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SEGMENT$2);\n }\n }", "@Override\n\tpublic boolean verifySegment(CASIdentifier identifierToVerify)\n\t{\n\t\treturn true;\n\t}", "@Override\n\tpublic int getGroupCount() {\n\t\treturn sections.size();\n\t}", "@Test\n \tpublic void testOverlapsWith()\n \t{\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)));\n \t\t\n \t\t// 1. [1,2] [2,4] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)));\n \t\t\n \t\t// 2. [1,3] [2,5] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)));\n \t\t\n \t\t// 3. [1,5] [0,6] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 0, 6, 0, 0)));\n \t\t\n \t\t// 4. [2,4] [1,2] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)));\n \t\t\n \t\t// 5. [2,5] [1,3] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)));\n \t}", "public static int count_overlap_regions(ArrayList<RegionVO> user_set, ArrayList<RegionVO> test_set){\n\t\tint i = 0, j = 0, count = 0;\n\t\t\n\t\twhile(i < user_set.size() && j < test_set.size()){\n\t\t\t\n\t\t\tif (user_set.get(i).getChr_id() == test_set.get(j).getChr_id() \n\t\t\t\t\t&& Math.max(user_set.get(i).getStart(), test_set.get(j).getStart()) \n\t\t\t\t\t\t<= Math.min(user_set.get(i).getEnd(), test_set.get(j).getEnd())){\n\t\t\t\t\n\t\t\t\tint overlap = Math.min(user_set.get(i).getEnd(), test_set.get(j).getEnd()) - Math.max(user_set.get(i).getStart(), test_set.get(j).getStart());\n\t\t\t\t\n\t\t\t\t//if (overlap > (user_set.get(i).end - user_set.get(i).start) / 2) {\n\t\t\t\tif (overlap > 0) {\t\t\t\t\t\t\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}else if (user_set.get(i).compareTo(test_set.get(j)) > 0) j++;\n\t\t\telse{ \n\t\t\t\ti++;\n\t\t\t\tSystem.out.println(\"Length: \" + (user_set.get(i).getEnd() - user_set.get(i).getStart())/10000);\n\t\t\t\tSystem.out.printf(\"chrom: %s, start: %d, end: %d\\n\", user_set.get(i).getChrom(), user_set.get(i).getStart(), user_set.get(i).getEnd());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn count;\n\t}", "@Test\n public void viewAndRefCountTest() throws IOException {\n String segmentName = \"log_current\";\n LogSegment segment = getSegment(segmentName, LogSegmentTest.STANDARD_SEGMENT_SIZE, true);\n try {\n long startOffset = segment.getStartOffset();\n int readSize = 100;\n int viewCount = 5;\n byte[] data = appendRandomData(segment, (readSize * viewCount));\n for (int i = 0; i < viewCount; i++) {\n getAndVerifyView(segment, startOffset, (i * readSize), data, (i + 1));\n }\n for (int i = 0; i < viewCount; i++) {\n segment.closeView();\n Assert.assertEquals(\"Ref count is not as expected\", ((viewCount - i) - 1), segment.refCount());\n }\n } finally {\n closeSegmentAndDeleteFile(segment);\n }\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n Range range1 = Range.of(9223372036854775806L, 9223372036854775806L);\n range1.split(9223372032559808516L);\n boolean boolean0 = range1.endsBefore(range0);\n assertFalse(boolean0);\n \n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n }", "private static int countRequiredMergeBufferNumWithoutSubtotal(Query query, int foundNum)\n {\n\n final DataSource dataSource = query.getDataSource();\n if (foundNum == MAX_MERGE_BUFFER_NUM_WITHOUT_SUBTOTAL + 1 || !(dataSource instanceof QueryDataSource)) {\n return foundNum - 1;\n } else {\n return countRequiredMergeBufferNumWithoutSubtotal(((QueryDataSource) dataSource).getQuery(), foundNum + 1);\n }\n }", "int getChunksLocationCount();", "private static boolean testSegment(int[] a, int lb, int rb) {\n if ((rb >= a.length - 1 || a[lb] < a[rb + 1])\n && (lb == 0 || a[rb] > a[lb - 1])) {\n return true;\n }\n return false;\n }", "private void verifyBinary(byte[][][] docValues, int[] ids, int numBytesPerDim) throws Exception {\n IndexWriterConfig iwc = newIndexWriterConfig();\n\n int numDims = docValues[0].length;\n int bytesPerDim = docValues[0][0].length;\n\n // Else we can get O(N^2) merging:\n int mbd = iwc.getMaxBufferedDocs();\n if (mbd != -1 && mbd < docValues.length / 100) {\n iwc.setMaxBufferedDocs(docValues.length / 100);\n }\n iwc.setCodec(getCodec());\n\n Directory dir;\n if (docValues.length > 100000) {\n dir = newFSDirectory(createTempDir(\"TestPointQueries\"));\n } else {\n dir = newDirectory();\n }\n\n IndexWriter w = new IndexWriter(dir, iwc);\n\n int numValues = docValues.length;\n if (VERBOSE) {\n System.out.println(\n \"TEST: numValues=\"\n + numValues\n + \" numDims=\"\n + numDims\n + \" numBytesPerDim=\"\n + numBytesPerDim);\n }\n\n int missingPct = random().nextInt(100);\n int deletedPct = random().nextInt(100);\n if (VERBOSE) {\n System.out.println(\" missingPct=\" + missingPct);\n System.out.println(\" deletedPct=\" + deletedPct);\n }\n\n BitSet missing = new BitSet();\n BitSet deleted = new BitSet();\n\n Document doc = null;\n int lastID = -1;\n\n for (int ord = 0; ord < numValues; ord++) {\n if (ord % 1000 == 0) {\n if (VERBOSE) {\n System.out.println(\"Adding docs: \" + ord);\n }\n }\n int id = ids[ord];\n if (id != lastID) {\n if (random().nextInt(100) < missingPct) {\n missing.set(id);\n if (VERBOSE) {\n System.out.println(\" missing id=\" + id);\n }\n }\n\n if (doc != null) {\n w.addDocument(doc);\n if (random().nextInt(100) < deletedPct) {\n int idToDelete = random().nextInt(id);\n w.deleteDocuments(new Term(\"id\", \"\" + idToDelete));\n deleted.set(idToDelete);\n if (VERBOSE) {\n System.out.println(\" delete id=\" + idToDelete);\n }\n }\n }\n\n doc = new Document();\n doc.add(newStringField(\"id\", \"\" + id, Field.Store.NO));\n doc.add(new NumericDocValuesField(\"id\", id));\n lastID = id;\n }\n\n if (missing.get(id) == false) {\n doc.add(new BinaryPoint(\"value\", docValues[ord]));\n if (VERBOSE) {\n System.out.println(\"id=\" + id);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\" dim=\" + dim + \" value=\" + bytesToString(docValues[ord][dim]));\n }\n }\n }\n }\n\n w.addDocument(doc);\n\n if (random().nextBoolean()) {\n if (VERBOSE) {\n System.out.println(\" forceMerge(1)\");\n }\n w.forceMerge(1);\n }\n final IndexReader r = DirectoryReader.open(w);\n w.close();\n\n IndexSearcher s = newSearcher(r, false);\n\n int numThreads = TestUtil.nextInt(random(), 2, 5);\n\n if (VERBOSE) {\n System.out.println(\"TEST: use \" + numThreads + \" query threads; searcher=\" + s);\n }\n\n List<Thread> threads = new ArrayList<>();\n final int iters = atLeast(100);\n\n final CountDownLatch startingGun = new CountDownLatch(1);\n final AtomicBoolean failed = new AtomicBoolean();\n\n for (int i = 0; i < numThreads; i++) {\n Thread thread =\n new Thread() {\n @Override\n public void run() {\n try {\n _run();\n } catch (Exception e) {\n failed.set(true);\n throw new RuntimeException(e);\n }\n }\n\n private void _run() throws Exception {\n startingGun.await();\n\n for (int iter = 0; iter < iters && failed.get() == false; iter++) {\n\n byte[][] lower = new byte[numDims][];\n byte[][] upper = new byte[numDims][];\n for (int dim = 0; dim < numDims; dim++) {\n lower[dim] = new byte[bytesPerDim];\n random().nextBytes(lower[dim]);\n\n upper[dim] = new byte[bytesPerDim];\n random().nextBytes(upper[dim]);\n\n if (Arrays.compareUnsigned(lower[dim], 0, bytesPerDim, upper[dim], 0, bytesPerDim)\n > 0) {\n byte[] x = lower[dim];\n lower[dim] = upper[dim];\n upper[dim] = x;\n }\n }\n\n if (VERBOSE) {\n System.out.println(\n \"\\n\" + Thread.currentThread().getName() + \": TEST: iter=\" + iter);\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n }\n }\n\n Query query = BinaryPoint.newRangeQuery(\"value\", lower, upper);\n\n if (VERBOSE) {\n System.out.println(Thread.currentThread().getName() + \": using query: \" + query);\n }\n\n final FixedBitSet hits =\n s.search(query, FixedBitSetCollector.createManager(r.maxDoc()));\n\n if (VERBOSE) {\n System.out.println(\n Thread.currentThread().getName() + \": hitCount: \" + hits.cardinality());\n }\n\n BitSet expected = new BitSet();\n for (int ord = 0; ord < numValues; ord++) {\n int id = ids[ord];\n if (missing.get(id) == false\n && deleted.get(id) == false\n && matches(bytesPerDim, lower, upper, docValues[ord])) {\n expected.set(id);\n }\n }\n\n NumericDocValues docIDToID = MultiDocValues.getNumericValues(r, \"id\");\n\n int failCount = 0;\n for (int docID = 0; docID < r.maxDoc(); docID++) {\n assertEquals(docID, docIDToID.nextDoc());\n int id = (int) docIDToID.longValue();\n if (hits.get(docID) != expected.get(id)) {\n System.out.println(\n \"FAIL: iter=\"\n + iter\n + \" id=\"\n + id\n + \" docID=\"\n + docID\n + \" expected=\"\n + expected.get(id)\n + \" but got \"\n + hits.get(docID)\n + \" deleted?=\"\n + deleted.get(id)\n + \" missing?=\"\n + missing.get(id));\n for (int dim = 0; dim < numDims; dim++) {\n System.out.println(\n \" dim=\"\n + dim\n + \" range: \"\n + bytesToString(lower[dim])\n + \" TO \"\n + bytesToString(upper[dim]));\n failCount++;\n }\n }\n }\n if (failCount != 0) {\n fail(failCount + \" hits were wrong\");\n }\n }\n }\n };\n thread.setName(\"T\" + i);\n thread.start();\n threads.add(thread);\n }\n\n startingGun.countDown();\n for (Thread thread : threads) {\n thread.join();\n }\n\n IOUtils.close(r, dir);\n }", "SegmentMerger(List<AtomicReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, int termIndexInterval, MergeState.CheckAbort checkAbort, FieldInfos.FieldNumbers fieldNumbers, IOContext context, boolean validate) throws IOException {\n // validate incoming readers\n if (validate) {\n for (AtomicReader reader : readers) {\n reader.checkIntegrity();\n }\n }\n mergeState = new MergeState(readers, segmentInfo, infoStream, checkAbort);\n directory = dir;\n this.termIndexInterval = termIndexInterval;\n this.codec = segmentInfo.getCodec();\n this.context = context;\n this.fieldInfosBuilder = new FieldInfos.Builder(fieldNumbers);\n mergeState.segmentInfo.setDocCount(setDocMaps());\n }", "public double getNumIntersect() {\n\t\treturn m_numIntersect;\n\t}", "public int getSegmentCount() {\n\t\treturn this.segments.size();\n\t}", "boolean intersect(Segment other) {\n\t\tint o1 = orientation(other.from);\n\t\tint o2 = orientation(other.to);\n\t\tint o3 = other.orientation(from);\n\t\tint o4 = other.orientation(to);\n\t\treturn (o1 != o2 && o3 != o4) // <- General case, special case below\n\t\t\t\t|| (o1 == 0 && inBoundingBox(other.from)) || (o2 == 0 && inBoundingBox(other.to))\n\t\t\t\t|| (o3 == 0 && other.inBoundingBox(from)) || (o4 == 0 && other.inBoundingBox(to));\n\t}", "public boolean overlaps(ReadableInterval interval) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[11]++;\r\n long thisStart = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[12]++;\r\n long thisEnd = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[13]++;\nint CodeCoverConditionCoverageHelper_C4;\r\n if ((((((CodeCoverConditionCoverageHelper_C4 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C4 |= (2)) == 0 || true) &&\n ((interval == null) && \n ((CodeCoverConditionCoverageHelper_C4 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[7]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[14]++;\r\n long now = DateTimeUtils.currentTimeMillis();\r\n return (thisStart < now && now < thisEnd);\n\r\n } else {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[8]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[15]++;\r\n long otherStart = interval.getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[16]++;\r\n long otherEnd = interval.getEndMillis();\r\n return (thisStart < otherEnd && otherStart < thisEnd);\r\n }\r\n }", "abstract public int numDocs();", "boolean hasPagesize();", "public int numberOfSegments() {\n return p;\n }", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "@java.lang.Override\n public boolean hasBoundingBoxesCount() {\n return boundingBoxesCount_ != null;\n }", "private boolean multiFieldMatch(int doc1, int doc2)\n {\n int titleScore = 0;\n int authorScore = 0;\n int dateScore = 0;\n int idScore = 0;\n \n // Compare each field to each other field. We assume that there are not\n // very many, so that this isn't terribly inefficient.\n //\n for (int p1 = data.docTags.firstPos(doc1); p1 >= 0; p1 = data.docTags.nextPos(p1)) {\n int tag1 = data.docTags.getValue(p1);\n int type1 = data.tags.getType(tag1);\n \n for (int p2 = data.docTags.firstPos(doc2); p2 >= 0; p2 = data.docTags.nextPos(p2)) {\n int tag2 = data.docTags.getValue(p2);\n int type2 = data.tags.getType(tag2);\n \n if (type1 != type2)\n continue;\n \n switch (type1) {\n case FRBRData.TYPE_TITLE:\n titleScore = Math.max(titleScore, scoreTitleMatch(tag1, tag2));\n break;\n case FRBRData.TYPE_AUTHOR:\n authorScore = Math.max(authorScore, scoreAuthorMatch(tag1, tag2));\n break;\n case FRBRData.TYPE_DATE:\n dateScore = Math.max(dateScore, scoreDateMatch(tag1, tag2));\n break;\n case FRBRData.TYPE_ID:\n idScore = Math.max(idScore, scoreIdMatch(tag1, tag2));\n break;\n } // switch\n } // for p2\n } // for p1\n \n // Is the total score high enough?\n int totalScore = titleScore + authorScore + dateScore + idScore;\n return totalScore >= 200;\n }", "private static void verifyLongs(long[] values, int[] ids) throws Exception {\n IndexWriterConfig iwc = newIndexWriterConfig();\n\n // Else we can get O(N^2) merging:\n int mbd = iwc.getMaxBufferedDocs();\n if (mbd != -1 && mbd < values.length / 100) {\n iwc.setMaxBufferedDocs(values.length / 100);\n }\n iwc.setCodec(getCodec());\n Directory dir;\n if (values.length > 100000) {\n dir = newMaybeVirusCheckingFSDirectory(createTempDir(\"TestRangeTree\"));\n } else {\n dir = newMaybeVirusCheckingDirectory();\n }\n\n int missingPct = random().nextInt(100);\n int deletedPct = random().nextInt(100);\n if (VERBOSE) {\n System.out.println(\" missingPct=\" + missingPct);\n System.out.println(\" deletedPct=\" + deletedPct);\n }\n\n BitSet missing = new BitSet();\n BitSet deleted = new BitSet();\n\n Document doc = null;\n int lastID = -1;\n\n IndexWriter w = new IndexWriter(dir, iwc);\n for (int ord = 0; ord < values.length; ord++) {\n int id;\n if (ids == null) {\n id = ord;\n } else {\n id = ids[ord];\n }\n if (id != lastID) {\n if (random().nextInt(100) < missingPct) {\n missing.set(id);\n if (VERBOSE) {\n System.out.println(\" missing id=\" + id);\n }\n }\n\n if (doc != null) {\n w.addDocument(doc);\n if (random().nextInt(100) < deletedPct) {\n int idToDelete = random().nextInt(id);\n w.deleteDocuments(new Term(\"id\", \"\" + idToDelete));\n deleted.set(idToDelete);\n if (VERBOSE) {\n System.out.println(\" delete id=\" + idToDelete);\n }\n }\n }\n\n doc = new Document();\n doc.add(newStringField(\"id\", \"\" + id, Field.Store.NO));\n doc.add(new NumericDocValuesField(\"id\", id));\n lastID = id;\n }\n\n if (missing.get(id) == false) {\n doc.add(new LongPoint(\"sn_value\", values[id]));\n byte[] bytes = new byte[8];\n NumericUtils.longToSortableBytes(values[id], bytes, 0);\n doc.add(new BinaryPoint(\"ss_value\", bytes));\n }\n }\n\n w.addDocument(doc);\n\n if (random().nextBoolean()) {\n if (VERBOSE) {\n System.out.println(\" forceMerge(1)\");\n }\n w.forceMerge(1);\n }\n final IndexReader r = DirectoryReader.open(w);\n w.close();\n\n IndexSearcher s = newSearcher(r, false);\n\n int numThreads = TestUtil.nextInt(random(), 2, 5);\n\n if (VERBOSE) {\n System.out.println(\"TEST: use \" + numThreads + \" query threads; searcher=\" + s);\n }\n\n List<Thread> threads = new ArrayList<>();\n final int iters = atLeast(100);\n\n final CountDownLatch startingGun = new CountDownLatch(1);\n final AtomicBoolean failed = new AtomicBoolean();\n\n for (int i = 0; i < numThreads; i++) {\n Thread thread =\n new Thread() {\n @Override\n public void run() {\n try {\n _run();\n } catch (Exception e) {\n failed.set(true);\n throw new RuntimeException(e);\n }\n }\n\n private void _run() throws Exception {\n startingGun.await();\n\n for (int iter = 0; iter < iters && failed.get() == false; iter++) {\n Long lower = randomValue();\n Long upper = randomValue();\n\n if (upper < lower) {\n long x = lower;\n lower = upper;\n upper = x;\n }\n\n Query query;\n\n if (VERBOSE) {\n System.out.println(\n \"\\n\"\n + Thread.currentThread().getName()\n + \": TEST: iter=\"\n + iter\n + \" value=\"\n + lower\n + \" TO \"\n + upper);\n byte[] tmp = new byte[8];\n NumericUtils.longToSortableBytes(lower, tmp, 0);\n System.out.println(\" lower bytes=\" + Arrays.toString(tmp));\n NumericUtils.longToSortableBytes(upper, tmp, 0);\n System.out.println(\" upper bytes=\" + Arrays.toString(tmp));\n }\n\n if (random().nextBoolean()) {\n query = LongPoint.newRangeQuery(\"sn_value\", lower, upper);\n } else {\n byte[] lowerBytes = new byte[8];\n NumericUtils.longToSortableBytes(lower, lowerBytes, 0);\n byte[] upperBytes = new byte[8];\n NumericUtils.longToSortableBytes(upper, upperBytes, 0);\n query = BinaryPoint.newRangeQuery(\"ss_value\", lowerBytes, upperBytes);\n }\n\n if (VERBOSE) {\n System.out.println(Thread.currentThread().getName() + \": using query: \" + query);\n }\n\n final FixedBitSet hits =\n s.search(query, FixedBitSetCollector.createManager(r.maxDoc()));\n\n if (VERBOSE) {\n System.out.println(\n Thread.currentThread().getName() + \": hitCount: \" + hits.cardinality());\n }\n\n NumericDocValues docIDToID = MultiDocValues.getNumericValues(r, \"id\");\n\n for (int docID = 0; docID < r.maxDoc(); docID++) {\n assertEquals(docID, docIDToID.nextDoc());\n int id = (int) docIDToID.longValue();\n boolean expected =\n missing.get(id) == false\n && deleted.get(id) == false\n && values[id] >= lower\n && values[id] <= upper;\n if (hits.get(docID) != expected) {\n // We do exact quantized comparison so the bbox query should never disagree:\n fail(\n Thread.currentThread().getName()\n + \": iter=\"\n + iter\n + \" id=\"\n + id\n + \" docID=\"\n + docID\n + \" value=\"\n + values[id]\n + \" (range: \"\n + lower\n + \" TO \"\n + upper\n + \") expected \"\n + expected\n + \" but got: \"\n + hits.get(docID)\n + \" deleted?=\"\n + deleted.get(id)\n + \" query=\"\n + query);\n }\n }\n }\n }\n };\n thread.setName(\"T\" + i);\n thread.start();\n threads.add(thread);\n }\n startingGun.countDown();\n for (Thread thread : threads) {\n thread.join();\n }\n IOUtils.close(r, dir);\n }", "@Test\n @Ignore(\"Already ran, organisations merged\")\n public void mergeOrganisations() {\n List<List<Long>> idsList = new ArrayList<>();\n List<Long> mergingIds = new ArrayList<>(); //<mergingId, survivingId>\n List<Long> survivingIds = new ArrayList<>(); //<mergingId, survivingId>\n\n //ECS\n mergingIds.add(20066194L);\n survivingIds.add(17913930L);\n\n //Waveguide -->2\n mergingIds.add(19440239L);\n survivingIds.add(20067398L);\n\n //Goldman Sachs -->3\n mergingIds.add(1807900L);\n survivingIds.add(710854L);\n\n //Elekta -->5\n mergingIds.add(16374120L);\n survivingIds.add(9050265L);\n //Bank of England -->12\n mergingIds.add(1878532L);\n survivingIds.add(710744L);\n //Nordea -->14\n mergingIds.add(692179L);\n survivingIds.add(13109201L);\n //HSBC Bank PLC -- 28\n mergingIds.add(15315614L);\n survivingIds.add(710229L);\n\n //Lein applied diagnostics -->16\n mergingIds.add(20066543L);\n survivingIds.add(20015906L);\n\n //Mitsubishi -->17\n mergingIds.add(709719L);\n survivingIds.add(710917L);\n //Travelex -->18\n mergingIds.add(1808837L);\n survivingIds.add(3613025L);\n //zedsen -->19\n mergingIds.add(25361568L);\n survivingIds.add(24436501L);\n //RaymondJames ->20\n mergingIds.add(20019540L);\n survivingIds.add(20311840L);\n //Elektron -->22\n mergingIds.add(19440192L);\n survivingIds.add(12776071L);\n //Glaxo Smith Kline -->23\n mergingIds.add(25881446L);\n survivingIds.add(17430668L);\n //UCL -->24\n mergingIds.add(3604761L);\n survivingIds.add(711204L);\n //Safeguard -->25\n mergingIds.add(710501L);\n survivingIds.add(2721808L);\n //Francis Crick Institute-->26\n mergingIds.add(17488058L);\n survivingIds.add(24075580L);\n //Elekta 2 -->27\n mergingIds.add(20746251L);\n survivingIds.add(9050265L);\n //Scentrics -->29\n mergingIds.add(3648896L);\n survivingIds.add(4819987L);\n //Imperial --> 30\n mergingIds.add(1808803L);\n survivingIds.add(3585109L);\n //M&G -->33\n mergingIds.add(1369007L);\n survivingIds.add(17765068L);\n //World programming Company --> 34\n mergingIds.add(6570392L);\n survivingIds.add(6231419L);\n //British Airways --> 35\n mergingIds.add(710006L);\n survivingIds.add(710401L);\n //Deloitte--> 36\n mergingIds.add(3604552L);\n survivingIds.add(3586027L);\n //Morgan Stanley--> 37\n mergingIds.add(711029L);\n survivingIds.add(709877L);\n\n assertEquals(mergingIds.size(), survivingIds.size());\n\n for (int i = 0; i < mergingIds.size(); i++) {\n String uri = baseURI + \"/organisation/\" + mergingIds.get(i) + \"/mergeInto/\" + survivingIds.get(i);\n System.out.print(uri);\n String res = getFromVertec(uri, String.class).getBody();\n System.out.println(\"============= \" + res + \" ===================\");\n }\n\n }", "private static boolean areOverlapping( int a[], int sz, int pos, int len )\n {\n \tfor( int i=0; i<sz; i++ ){\n \t if( areOverlapping( a[i], pos, len ) ){\n \t\treturn true;\n \t }\n \t}\n \treturn false;\n }", "@Test\n public void testOverlappingPartitionsOverlappingClusters()\n {\n check(overlappingClustersWithOverlappingPartitions(), 0.75, 1.0);\n }", "public static int count() {\n return segmentList.size();\n }", "private boolean intersectsAggregate( Aggregate mprim ) throws Exception {\n boolean inter = false;\n\n int cnt = mprim.getSize();\n\n for ( int i = 0; i < cnt; i++ ) {\n if ( intersects( mprim.getObjectAt( i ) ) ) {\n inter = true;\n break;\n }\n }\n\n return inter;\n }", "private void positionIntersects(LinkedList<TermPositions> p1, LinkedList<TermPositions> p2, int k) {\n if (p1 != null && p2 != null) {\n int df1 = p1.size();\n int df2 = p2.size();\n while (!p1.isEmpty() && !p2.isEmpty()) {\n int tf1 = p1.peek().getPositionList().size();\n int tf2 = p1.peek().getPositionList().size();\n if (p1.peek().getDocId() == p2.peek().getDocId()) {\n LinkedList<Integer> pp1 = p1.peek().getPositionList();\n while (!pp1.isEmpty()) {\n for (Integer integer : p2.peek().getPositionList()) {\n if ((pp1.peek() - integer) < 0 && Math.abs(pp1.peek() - integer) <= (k + 1)) {\n double score = (1 + Math.log(tf1) * Math.log(N / df1)) + (1 + Math.log(tf2) * Math.log(N / df2));\n resultsCollector.add(new DocCollector(p1.peek().getDocId(), score));\n break;\n }\n }\n pp1.pop();\n }\n } else if (p1.peek().getDocId() < p2.peek().getDocId())\n p1.pop();\n else\n p2.pop();\n\n p1.pop();\n p2.pop();\n\n }\n\n }\n\n\n }", "@Test\n\tpublic void totalWordsInGroups() {\n\t\tint totalWords = 0;\n\t\tfor(NewsGroup g: groups) {\n\t\t\ttotalWords+= g.getTotalWords();\n\t\t}\n\t\tSystem.out.println(totalWords);\n\t\tassertTrue(totalWords == TOTAL_WORDS_ACROSS_GROUPS);\n\t}", "private static int[] countInversion(int[] left, int[] right)\n {\n int i = 0, j = 0, k = 0, leftLen = left.length, rightLen = right.length;\n int l = leftLen + rightLen;\n int[] merged = new int[l];\n do\n {\n if(left[i] <= right[j])\n merged[k++] = left[i++];\n else\n {\n splitCount += (leftLen - i);\n merged[k++] = right[j++];\n }\n\n } while (i < leftLen && j < rightLen);\n\n //copy remaining\n if(i < leftLen)\n for(; i < leftLen; i++)\n merged[k++] = left[i];\n\n else if(j < rightLen)\n for(; j < rightLen; j++)\n merged[k++] = right[j];\n\n return merged;\n }", "private static int compareGoListOverlap(HashMap<String, Double> un_GoMap, HashMap<String, Double> wn_GoMap) {\n\t\tint overlap = 0; \n\t\t/* iterate over significant GO Terms in weighted Network, count those found also in unweighted network*/ \n\t\tfor(String GO: wn_GoMap.keySet()) {\n\t\t\tif(un_GoMap.containsKey(GO)) {\n\t\t\t\toverlap += 1;\n\t\t\t}\n\t\t}\n\t\treturn overlap;\n\t}", "@Test\n public void testByteSizeTooBig() {\n ds.setMaxDocumentBytes(150);\n putD1();\n putD2();\n \n assertEquals(true, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n putD3();\n System.out.println(\"hey\");\n assertEquals(false, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n assertEquals(true, docExists(testStringNumber.STRING3));\n \n }", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "static boolean SegmentsIntersect(PT a, PT b, PT c, PT d) {\r\n\t\tif (LinesCollinear(a, b, c, d)) {\r\n\t\t\tif (dist2(a, c) < EPS || dist2(a, d) < EPS || dist2(b, c) < EPS || dist2(b, d) < EPS)\r\n\t\t\t\treturn true;\r\n\t\t\tif (dot(c.subtract(a), c.subtract(b)) > 0 && dot(d.subtract(a), d.subtract(b)) > 0\r\n\t\t\t\t\t&& dot(c.subtract(b), d.subtract(b)) > 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (cross(d.subtract(a), b.subtract(a)) * cross(c.subtract(a), b.subtract(a)) > 0)\r\n\t\t\treturn false;\r\n\t\tif (cross(a.subtract(c), d.subtract(c)) * cross(b.subtract(c), d.subtract(c)) > 0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "boolean hasTotalElements();", "private static boolean isTwoPlusCombinedVerbs(AnalyzedTokenReadings[] tokens, int first, int last) {\n return tokens[first].matchesPosTagRegex(\".*PA[12]:.*\") && tokens[last-1].matchesPosTagRegex(\"VER:.*INF.*\");\n }", "public int numberOfSegments() {\r\n return numberOfSegments;\r\n }", "int getPartsCount();", "int getPartsCount();", "public static int getNSectors()\n {\n return Disk.NUM_OF_SECTORS - ADisk.REDO_LOG_SECTORS - 1;\n }", "public int numberOfSegments() {\n\t\treturn count;\n\t}", "public void setTotalSegments(int value) {\n this.totalSegments = value;\n }", "private static boolean isPerfect(AnalyzedTokenReadings[] tokens, int first, int second) {\n return tokens[first].hasPosTagStartingWith(\"VER:AUX:\") && tokens[second].matchesPosTagRegex(\"VER:.*(INF|PA2).*\");\n }", "public int getTokenSegmentCount() {\n if (tokenSegmentBuilder_ == null) {\n return tokenSegment_.size();\n } else {\n return tokenSegmentBuilder_.getCount();\n }\n }", "private void assertSegmentListEqual(final List<SVAnnotateEngine.SVSegment> segmentsA,\n final List<SVAnnotateEngine.SVSegment> segmentsB) {\n final int lengthA = segmentsA.size();\n if (lengthA != segmentsB.size()) {\n Assert.fail(\"Segment lists differ in length\");\n }\n for (int i = 0; i < lengthA; i++) {\n SVAnnotateEngine.SVSegment segmentA = segmentsA.get(i);\n SVAnnotateEngine.SVSegment segmentB = segmentsB.get(i);\n if (!segmentA.equals(segmentB)) {\n Assert.fail(\"Segment items differ\");\n }\n }\n }", "private String checkSegments(ArrayList<DataSegment> list, int start, int end) {\n if (list.isEmpty()) return \"38020\";\n if (list.get(0).getSegmentStart()!=start) return \"38021\";\n if (list.get(list.size()-1).getSegmentEnd()!=end) return \"38022\";\n int lastend=start-1; \n for (int i=0;i<list.size();i++) {\n DataSegment segment=list.get(i);\n if (segment.getSegmentStart()!=lastend+1) return \"38023[\"+(i+1)+\"/\"+(list.size())+\"]\";\n lastend=segment.getSegmentEnd();\n if (lastend>end) return \"38024[\"+(i+1)+\"/\"+(list.size())+\"]\";\n }\n return null;\n }", "private static HashMap<Integer, ArrayList<String>> checkAndMergeIntersectedPoints(HashMap<Integer, ArrayList<String>> boundedRegionPointsMap) {\n\n\t\t// Iterate over regions one by one, to validate with rest of the regions iteratively.\n\t for(Integer key1 : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> list1 = boundedRegionPointsMap.get(key1);\n\n\t for (Integer key2 : boundedRegionPointsMap.keySet()) {\n\t \t// Only need to check for keys (region counters) incrementally\n\t if (key1 < key2) {\n\t ArrayList<String> list2 = boundedRegionPointsMap.get(key2);\n\t for(String point : list2) {\n\t \t// If there is an intersecting point in two regions, merge them.\n\t if (list1.contains(point)) {\n\t list1.addAll(list2);\n\t // Just to make sure there won't be any duplicate points introduced after the merge.\n\t Set<String> uniquePoints = new HashSet<String>(list1);\n\t boundedRegionPointsMap.put(key1, new ArrayList<String>(uniquePoints));\n\t break;\n\t }\n\t }\n\t }\n\t }\n\n\t }\n\t return boundedRegionPointsMap;\n\t}", "private void test() {\n\t\tCoordinate[] polyPts = new Coordinate[]{ \n\t\t\t\t new Coordinate(-98.50165524249245,45.216163960194365), \n\t\t\t\t new Coordinate(-96.07562805826798,39.725652270504796), \t\n\t\t\t\t new Coordinate(-88.95179971518155,39.08088689505274), \t\n\t\t\t\t new Coordinate(-87.96893561066132,44.647653935023214),\n\t\t \t\t new Coordinate(-89.72876449996915,41.54448973482366)\n\t\t\t\t };\n Coordinate[] seg = new Coordinate[2]; \n \n \tCoordinate midPt = new Coordinate();\n \tmidPt.x = ( polyPts[ 0 ].x + polyPts[ 2 ].x ) / 2.0 - 1.0;\n \tmidPt.y = ( polyPts[ 0 ].y + polyPts[ 2 ].y ) / 2.0 - 1.0;\n seg[0] = polyPts[ 0 ];\n seg[1] = midPt; \n \n \n\t\tfor ( int ii = 0; ii < (polyPts.length - 2); ii++ ) {\n\t\t\tfor ( int jj = ii + 2; jj < (polyPts.length); jj ++ ) {\n\t\t seg[0] = polyPts[ii];\n\t\t seg[1] = polyPts[jj]; \n\t\t \n\t\t\t boolean good = polysegIntPoly( seg, polyPts );\n\t String s;\n\t\t\t if ( good ) {\n\t\t\t\t\ts = \"Qualify!\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ts = \"Not qualify\";\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t\t\n\t\t\t System.out.println( \"\\npoint \" + ii + \"\\t<Point Lat=\\\"\" + \n\t\t\t\t\t polyPts[ii].y + \"\\\" Lon=\\\"\" + polyPts[ii].x + \"\\\"/>\" \n\t\t\t\t\t + \"\\t=>\\t\" + \"point \" + jj+ \"\\t<Point Lat=\\\"\" + \n polyPts[jj].y + \"\\\" Lon=\\\"\" + polyPts[jj].x + \"\\\"/>\"\n + \"\\t\" + s );\n \n\t\t\t}\n\t }\n\n\t}" ]
[ "0.685209", "0.6404354", "0.6073466", "0.5970264", "0.59034777", "0.5795977", "0.5739462", "0.5705154", "0.5599118", "0.5529491", "0.55046666", "0.5499533", "0.5349635", "0.5347908", "0.5347157", "0.5292448", "0.5289352", "0.5285139", "0.52558005", "0.5254945", "0.52519697", "0.5244595", "0.52303237", "0.52184486", "0.51947755", "0.5169576", "0.5163051", "0.5152638", "0.51503533", "0.5136956", "0.51236004", "0.5120303", "0.5107976", "0.51016533", "0.5099923", "0.5095146", "0.50770205", "0.5050484", "0.5039588", "0.50395334", "0.5039471", "0.50374955", "0.5033152", "0.50243944", "0.50231516", "0.50231516", "0.50171673", "0.50131786", "0.50057435", "0.5004282", "0.50011384", "0.49857545", "0.498564", "0.49853483", "0.4981224", "0.49796635", "0.49732533", "0.49722993", "0.49686217", "0.49640882", "0.49587226", "0.4957249", "0.49551758", "0.49438936", "0.49419272", "0.49401617", "0.49383187", "0.49304098", "0.49180338", "0.49105787", "0.49075904", "0.4898928", "0.48892027", "0.48863146", "0.48756766", "0.4869175", "0.48668912", "0.48619112", "0.48618856", "0.48609883", "0.48594388", "0.48590955", "0.4856851", "0.48553476", "0.4852212", "0.48520836", "0.48491162", "0.48435697", "0.4840809", "0.4837309", "0.4837309", "0.48365712", "0.48363152", "0.48339757", "0.4831388", "0.4831137", "0.4830579", "0.48290828", "0.48281989", "0.48242325" ]
0.61580664
2
Delete a directory recursively.
private void deleteDirectory(Path path) throws IOException { if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) { try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) { for (Path entry : entries) { deleteDirectory(entry); } } } Files.delete(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteDirectory(String path, boolean recursive) throws IOException;", "public static void deleteDirectory(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\t//directory is empty, then delete it\n\t\t\tif (dir.list().length == 0) {\n\t\t\t\tdir.delete();\n\t\t\t} else {\n\t\t\t\t//list all the directory contents\n\t\t\t\tString[] subFiles = dir.list();\n\t\t\t\tfor (int i = 0; i < subFiles.length; i++) {\n\t\t\t\t\t//construct the file structure\n\t\t\t\t\tFile fileDelete = new File(dir, subFiles[i]);\n\t\t\t\t\t//recursive delete\n\t\t\t\t\tdeleteDirectory(fileDelete);\n\t\t\t\t}\n\t\t\t\t//check the directory again, if empty then delete it\n\t\t\t\tif (dir.list().length == 0) {\n\t\t\t\t\tdir.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdir.delete();\n\t\t}\n\t}", "@Override\n public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {\n }", "private static void deleteDirectory(File directory) {\r\n File[] files = directory.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n } else {\r\n files[i].delete();\r\n }\r\n }\r\n // Now that the directory is empty. Delete it.\r\n directory.delete();\r\n }", "public static void deleteDir(File dir) {\n\t if (dir.isDirectory()) {\n\t String[] children = dir.list();\n\t for (int i=0; i<children.length; i++) {\n\t File file = new File(dir, children[i]);\n\t log.info(\"Deleting file:\" + file.toString());\n\t file.delete();\n\t }\n\t }\n\t }", "public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (exc == null) {\n Files.delete(dir);\n return FileVisitResult.CONTINUE;\n } else {\n throw exc;\n }\n }\n });\n }\n }", "public static void deleteDirectoryRecursively(Path pathToBeDeleted) throws IOException {\n\n Files.walk(pathToBeDeleted).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);\n }", "public static void deleteFolder(File folder) {\r\nFile[] files = folder.listFiles();\r\nif(files!=null) { //some JVMs return null for empty dirs\r\nfor(File f: files) {\r\nif(f.isDirectory()) {\r\ndeleteFolder(f);\r\n} else {\r\nf.delete();\r\n}\r\n}\r\n}\r\nfolder.delete();\r\n}", "public static synchronized void deleteDirectory(File directory) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.deleteDirectory: [\" + directory.getPath() + \"]\");\n File[] firstDirectoryFiles = directory.listFiles();\n if (firstDirectoryFiles != null) {\n for (File file : firstDirectoryFiles) {\n file.delete();\n }\n }\n directory.delete();\n }", "public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}", "public static void deleteDirectory(File directory) {\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting directory \"\n // + directory.toString());\n File[] files = directory.listFiles();\n for (int n = 0; n < files.length; n++) {\n File nextFile = files[n];\n\n // if it's a directory, delete sub-directories and files before\n // removing the empty directory\n if (nextFile.isDirectory() == true) {\n deleteDirectory(nextFile);\n } else {\n nextFile.delete(); // otherwise just delete the file\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting file \"\n // + nextFile.toString());\n }\n }\n\n // finally, delete the specified directory\n if (directory.delete() == false) {\n LOG.warn(\"ics.core.io.FileUtils.deleteDirectory(): Unable to delete \"\n + directory.toString());\n }\n }", "private boolean deleteDir(File dir) {\r\n if (dir.isDirectory()) {\r\n \r\n //Borra todos los ficheros del directorio\r\n String[] children = dir.list();\r\n for (int i=0; i<children.length; i++) {\r\n boolean success = deleteDir(new File(dir, children[i]));\r\n if (!success) {\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n //Ahora que el directorio está vacío, se puede borrar\r\n return dir.delete();\r\n }", "public static void deleteFilesInDirectory(File dir, boolean deleteDir) {\n \t\tif (dir != null && dir.isDirectory()) {\n \t\t\tFile[] files = dir.listFiles();\n \t\t\tif (files != null) {\n \t\t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\t\tif (files[i].isFile()) {\n \t\t\t\t\t\tfiles[i].delete();\n \t\t\t\t\t} else {\n \t\t\t\t\t\t// recursively delete\n \t\t\t\t\t\tdeleteFilesInDirectory(files[i], true);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t// now delete the directory itself\n \t\t\tif (deleteDir) {\n \t\t\t\tdir.delete();\n \t\t\t}\n \t\t}\n \t}", "public static void deleteDir(File dir) throws RepositoryException {\n String list[] = dir.list();\n\n if (list == null) {\n return;\n }\n\n for (int i = 0; i < list.length; i++) {\n File file = new File(dir, list[i]);\n\n if (file.isDirectory()) {\n deleteDir(file);\n } else {\n if (!file.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"cannot-delete-file\", file.getAbsolutePath()));\n }\n }\n }\n\n if (!dir.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"directory-cannot-be-deleted\", dir.getAbsolutePath()));\n }\n }", "public static boolean recursiveDelete(File d) {\n // If d is not a directory, just delete it.\n if (!d.isDirectory())\n if (d.delete() == false) {\n return false;\n } else {\n return true;\n }\n else {\n // Construct a file list.\n File[] ar = d.listFiles();\n \n // Iterate through the file list.\n for (int i = 0; i < ar.length; i++) {\n // Recurse into directories. Deep directories will need a lot of stack space for this.\n if (ar[i].isDirectory()) {\n if (!recursiveDelete(ar[i])) {\n return false; // Failed!\n }\n }\n else {\n // Delete a file.\n if (!ar[i].delete()) {\n return false; // Failed!\n }\n }\n }\n \n //Delete the empty directory\n if (!d.delete()) {\n return false;\n } else {\n return true;\n } \n }\n }", "private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n else {\r\n files[i].delete();\r\n }\r\n }\r\n }\r\n return (path.delete());\r\n }", "private static boolean deleteDirectory(File directory) {\n\t if(directory.exists()){\n\t File[] files = directory.listFiles();\n\t if(null!=files){\n\t for(int i=0; i<files.length; i++) {\n\t if(files[i].isDirectory()) {\n\t deleteDirectory(files[i]);\n\t }\n\t else {\n\t files[i].delete();\n\t }\n\t }\n\t }\n\t }\n\t return(directory.delete());\n\t}", "public static void deleteDirectory(String path) throws KubernetesPluginException {\n Path pathToBeDeleted = Paths.get(path);\n if (!Files.exists(pathToBeDeleted)) {\n return;\n }\n try {\n Files.walk(pathToBeDeleted)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to delete directory: \" + path, e);\n }\n\n }", "public static void cleanDirectory(File dir) {\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n cleanDirectory( f );\n }\n }\n dir.delete();\n }", "protected void deleteDirectory(String oneDir) {\n \n File[] listOfFiles;\n File cleanDir;\n\t\n cleanDir = new File(oneDir);\n if (!cleanDir.exists()) {// Nothing to do. Return; \n\t return;\n\t}\n listOfFiles = cleanDir.listFiles();\n if(listOfFiles != null) { \n for(int countFiles = 0; countFiles < listOfFiles.length; countFiles++) { \n if (listOfFiles[countFiles].isFile()) {\n listOfFiles[countFiles].delete();\n } else { // It is a directory\n String nextCleanDir = cleanDir + separator + listOfFiles[countFiles].getName();\n\t\t File newCleanDir = new File(nextCleanDir);\n deleteDirectory(newCleanDir.getAbsolutePath());\n } \n }// End for loop\n } // End if statement \n cleanDir.delete();\n }", "private static boolean deleteDir(File dir) {\n\n if (dir.isDirectory()) {\n String[] children = dir.list();\n for (int i=0; i<children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n }\n\n // The directory is now empty so now it can be smoked\n return dir.delete();\n }", "public boolean delete(String path, boolean recurse) throws SystemException;", "private static void deleteDir(File file) {\n\t\tFile[] contents = file.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File f : contents) {\n\t\t\t\tdeleteDir(f);\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}", "public static void deleteDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n return;\n }\n\n if ( !isSymlink( directory ) )\n {\n cleanDirectory( directory );\n }\n\n if ( !directory.delete() )\n {\n throw new IOException( I18n.err( I18n.ERR_17004_UNABLE_DELETE_DIR, directory ) );\n }\n }", "public static void deleteDirectoryTree(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteDirectoryTree(child);\n }\n }\n\n fileOrDirectory.delete();\n }", "private void deleteRecursive(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child);\n }\n }\n fileOrDirectory.delete();\n }", "public static boolean deleteDirectory(File dir) {\n \n\t\tif (dir == null) { \n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tFile candir;\n try {\n candir = dir.getCanonicalFile();\n } catch (IOException e) {\n return false;\n }\n \n // a symbolic link has a different canonical path than its actual path,\n // unless it's a link to itself\n if (!candir.equals(dir.getAbsoluteFile())) {\n // this file is a symbolic link, and there's no reason for us to\n // follow it, because then we might be deleting something outside of\n // the directory we were told to delete\n return false;\n }\n \n // now we go through all of the files and subdirectories in the\n // directory and delete them one by one\n File [] files = candir.listFiles();\n \n if (files != null) {\n for (int i = 0; i < files.length; i++) {\n File file = files[i];\n \n // in case this directory is actually a symbolic link, or it's\n // empty, we want to try to delete the link before we try\n // anything\n boolean deleted = file.delete();\n \n if (!deleted) {\n // deleting the file failed, so maybe it's a non-empty\n // directory\n if (file.isDirectory()) {\n \tdeleteDirectory(file);\n }\n \n // otherwise, there's nothing else we can do\n }\n }\n }\n \n // now that we tried to clear the directory out, we can try to delete it\n // again\n return dir.delete(); \n }", "public static void deleteDirectory(String directory) {\n if (directory == null) {\n return;\n }\n\n File dir = new File(directory);\n if (dir.isDirectory() == false) {\n return;\n }\n\n deleteDirectory(dir);\n }", "private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }", "private static void doDeleteEmptyDir(String dir) {\n\n boolean success = (new File(dir)).delete();\n\n if (success) {\n System.out.println(\"Successfully deleted empty directory: \" + dir);\n } else {\n System.out.println(\"Failed to delete empty directory: \" + dir);\n }\n\n }", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}", "public static final void deleteDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n return;\n }\n\n cleanDirectory(directory);\n\n if (!directory.delete()) {\n throw new IOException(\"Unable to delete directory \" + directory + \".\");\n }\n }", "public static boolean deleteDir(File dir) {\n if (dir != null && dir.isDirectory()) {\n String[] children = dir.list();\n for (int i = 0; i < children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n return dir.delete();\n }\n else if(dir!= null && dir.isFile()) return dir.delete();\n else return false;\n }", "public boolean deleteDir(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\tString[] children = dir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\t\t\t\tboolean success = deleteDir(new File(dir, children[i]));\n\t\t\t\tif (!success) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// The directory is now empty so delete it\n\t\treturn dir.delete();\n\t}", "public static void deleteDirectory(String directory){\n\t\tlog.info(\"Removing \" + directory + \" directory\");\n\t\tFile tempDir = new File(directory);\n\t\tdeleteDirectory(tempDir);\n\t\tlog.info(\"Finished removing directory\");\n\t}", "public static boolean deleteDirectory(File path) {\n\t\tif (path.exists()) {\n\t\t\tFile[] files = path.listFiles();\n\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\tdeleteDirectory(files[i]);\n\t\t\t\t} else {\n\t\t\t\t\tfiles[i].delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (path.delete());\n\t}", "public void clearDirectory(File directory) {\n if (directory.exists()) {\n for (File file : directory.listFiles()) {\n file.delete();\n }\n }\n }", "public static void deleteRecursively(File file) throws IOException {\n\t\tboolean successful = true;\n\t\tif (file.isDirectory()) {\n\t\t\tfor (File sub : file.listFiles()) {\n\t\t\t\tdeleteRecursively(sub);\n\t\t\t}\n\t\t\tsuccessful = file.delete();\n\t\t} else if (file.isFile()) {\n\t\t\tsuccessful = file.delete();\n\t\t}\n\t\tif (!successful) {\n\t\t\tthrow new IOException(\"Could not delete:\" + file.getName());\n\t\t}\n\t}", "public static boolean delete(File dir) {\r\n boolean success = true;\r\n File files[] = dir.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n // delete the directory and all of its contents.\r\n if (!delete(files[i])) {\r\n success = false;\r\n }\r\n }\r\n // delete each file in the directory\r\n if (!files[i].delete()) {\r\n success = false;\r\n }\r\n }\r\n }\r\n // finally delete the directory\r\n if (!dir.delete()) {\r\n success = false;\r\n }\r\n return success;\r\n }", "public static boolean deleteDir(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\tString[] children = dir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\t\t\t\tboolean success = deleteDir(new File(dir, children[i]));\n\t\t\t\tif (!success) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// The directory is now empty so delete it\n\t\treturn dir.delete();\n\t}", "public static boolean deleteDir(File dir) {\n if (dir != null && dir.isDirectory()) {\n String[] children = dir.list();\n for (int i = 0; i < children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n return dir.delete();\n } else if(dir!= null && dir.isFile()) {\n return dir.delete();\n } else {\n return false;\n }\n }", "public static boolean deleteDir(File dir) {\n if (dir.isDirectory()) {\n String[] children = dir.list();\n if (children != null) {\n for (String child : children) {\n boolean success = deleteDir(new File(dir, child));\n if (!success) {\n return false;\n }\n }\n }\n }\n\n // The directory is now empty so delete it\n return dir.delete();\n }", "private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }", "public void removeFolder(File path){\n if (path.isDirectory()){\n String subdirectories[] = path.list();\n for(String subdirectory: subdirectories){\n File file = new File(path.getPath()+\"\\\\\"+subdirectory);\n LOG.info(\"file.getAbsolutePath(): \"+file.getPath());\n if (file.isFile()){\n boolean isDeleted = file.delete();\n if (isDeleted){\n LOG.success(\"file was delete, path: \"+file.getPath());\n }else{\n LOG.error(\"file does not delete, path: \"+file.getPath());\n }\n }else{\n removeFolder(file);\n boolean folderIsDelete = file.delete();\n if (folderIsDelete){\n LOG.success(\"folder was delete, path: \"+file);\n }else{\n LOG.error(\"folder does not delete, path: \"+file);\n }\n }\n }\n }else {\n LOG.info(\"file.getAbsolutePath(): \"+path.getPath());\n }\n }", "private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }", "public void deleteFiles(File directory) {\n File[] contents = directory.listFiles();\n if (contents != null) {\n for (File file : contents) {\n deleteFiles(file);\n }\n }\n directory.delete();\n }", "public static void cleanDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17006_DOES_NOT_EXIST, directory ) );\n }\n\n if ( !directory.isDirectory() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17007_IS_NOT_DIRECTORY, directory ) );\n }\n\n File[] files = directory.listFiles();\n\n if ( files == null )\n {\n // null if security restricted\n throw new IOException( I18n.err( I18n.ERR_17008_FAIL_LIST_DIR, directory ) );\n }\n\n IOException exception = null;\n\n for ( File file : files )\n {\n try\n {\n forceDelete( file );\n }\n catch ( IOException ioe )\n {\n exception = ioe;\n }\n }\n\n if ( null != exception )\n {\n throw exception;\n }\n }", "public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }", "public static void deleteDirectory(String inputDirectory) {\n File directory = new File(inputDirectory);\n //check if it is a directory\n if (directory.isDirectory()) {\n //check if the directory has children\n if (directory.listFiles().length == 0) {\n directory.delete();\n System.out.println(\"Directory is deleted: \"\n + directory.getAbsolutePath());\n } else {\n //ask user whether he wants to delete the directory\n System.out.println(\"The chosen directory contains few files.\");\n viewDirectory(inputDirectory);\n System.out.println(\"Do you really want to delete the whole directory: \\n 1.Yes\\n 2.No\");\n Scanner userInput = new Scanner(System.in);\n String userRes = userInput.nextLine();\n if (userRes.equalsIgnoreCase(\"yes\") || userRes.equalsIgnoreCase(\"1\")) {\n //delete files inside the directory one by one\n deleteFilesInsideDirectory(directory);\n //delete parent directory\n directory.delete();\n if (!directory.exists()) {\n System.out.println(\"Directory has been deleted.\");\n } else {\n System.out.println(\"Deletion failed\");\n }\n } else if (userRes.equalsIgnoreCase(\"no\") || userRes.equalsIgnoreCase(\"2\")) {\n System.out.println(\"Delete directory request cancelled by user.\");\n } else {\n deleteDirectory(inputDirectory);\n }\n }\n } else {\n System.out.println(\"Invalid path or directory.\");\n }\n }", "void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }", "public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "public static boolean removeDirectory(File directory) {\n\t\r\n\t\t if (directory == null)\r\n\t\t return false;\r\n\t\t if (!directory.exists())\r\n\t\t return true;\r\n\t\t if (!directory.isDirectory())\r\n\t\t return false;\r\n\t\r\n\t\t String[] list = directory.list();\r\n\t\r\n\t\t // Some JVMs return null for File.list() when the\r\n\t\t // directory is empty.\r\n\t\t if (list != null) {\r\n\t\t for (int i = 0; i < list.length; i++) {\r\n\t\t File entry = new File(directory, list[i]);\r\n\t\r\n\t\t // System.out.println(\"\\tremoving entry \" + entry);\r\n\t\r\n\t\t if (entry.isDirectory())\r\n\t\t {\r\n\t\t if (!removeDirectory(entry))\r\n\t\t return false;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t if (!entry.delete())\r\n\t\t return false;\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\r\n\t\t return directory.delete();\r\n\t}", "public static final void cleanDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n throw new IllegalArgumentException(directory + \" does not exist\");\n }\n\n if (!directory.isDirectory()) {\n throw new IllegalArgumentException(directory + \" is not a directory\");\n }\n\n File[] files = directory.listFiles();\n if (files == null) { // null if security restricted\n throw new IOException(\"Failed to list contents of \" + directory);\n }\n\n IOException exception = null;\n for (File file : files) {\n try {\n forceDelete(file);\n } catch (IOException ioe) {\n exception = ioe;\n }\n }\n\n if (exception != null) {\n throw exception;\n }\n }", "public boolean folderCleaner(String folderPath, Boolean ifDeleteSubdirs, Boolean ifDeleteFiles, Boolean ifDeleteRoot, Boolean ifPrompt) throws IOException { \n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"CLEANED\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n if(child.isDirectory()){ if(ifDeleteSubdirs) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifDeleteFiles) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteFiles) {System.out.print(\" FILE \");} }\n \n current = !child.exists();\n success = success && current;\n if(current) { how = \" DELETED: \\\"\"; } else { how = \"NOT DELETED: \\\"\"; }\n if(ifPrompt && current) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifDeleteRoot) { FileUtils.forceDelete(dir); success = success && !dir.exists(); action = \"DELETED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }", "protected boolean cleanUpDir(File dir) {\n if (dir.isDirectory()) {\n LOG.info(\"Cleaning up \" + dir.getName());\n String[] children = dir.list();\n for (String string : children) {\n boolean success = cleanUpDir(new File(dir, string));\n if (!success)\n return false;\n }\n }\n // The directory is now empty so delete it\n return dir.delete();\n }", "private void deleteDir(File fileDir)\n {\n try\n {\n FileHelper.deleteDir(fileDir);\n }\n catch (Exception e)\n {\n // ignore\n }\n }", "public static void deleteBundleParentDirectory(Bundle bundle) throws IOException {\n if (bundle != null) {\n Path bundleSource = bundle.getSource();\n File parent = bundleSource.getParent().toFile();\n if (parent.exists() && parent.isDirectory()) {\n File[] files = parent.listFiles();\n // We expect the directory to be empty or contain just one file (the ZIP bundle,\n // since the bundle files are stored temporarily in another temporary directory).\n if (files != null && files.length <= 1) {\n org.apache.commons.io.FileUtils.forceDelete(parent);\n }\n }\n }\n }", "public static void deletePath(Path path) throws IOException {\n if (!Files.isDirectory(path) || Files.list(path).count() == 0) { Files.deleteIfExists(path); }\n else {\n try (Stream<Path> files = Files.list(path)) {\n files.forEach(p -> {\n try { deletePath(p); }\n catch (IOException e) { e.printStackTrace(); }\n });\n Files.delete(path);\n }\n }\n }", "public static void deleteFilesRecursive(String strPath) {\n\n File fileOrDirectory = new File(strPath);\n\n if (fileOrDirectory.isDirectory()){\n for (File child : fileOrDirectory.listFiles())\n deleteFilesRecursive(child.getPath());\n fileOrDirectory.delete();\n }else\n fileOrDirectory.delete();\n }", "public String do_rmdir(String pathOnServer) throws RemoteException {\r\n\t\tString directoryPath = pathOnServer;\r\n\t\tString message;\r\n\t\t\r\n\t\t\tFile dir = new File(directoryPath);\r\n\t\t\tif (!dir.isDirectory()) {\r\n\t\t\t\tmessage = \"Invalid directory\";\t}\t\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\tif(dir.list().length>0) {\r\n\r\n\t\t\tFile[] filesList = dir.listFiles();\r\n\t\t\t//Deleting Directory Content\r\n\t\t\tfor(File file : filesList){\r\n\t\t\t\tSystem.out.println(\"Deleting \"+file.getName());\r\n\t\t\t\tfile.delete();\r\n\t\t\t}}\r\n\t\t\tif (dir.delete()) message =\"Successfully deleted the Directory: \" + directoryPath ;\r\n\t\t\telse message =\"Error deleting the directory: \" + directoryPath ;\r\n\t\t\t}//else end \r\n\t\treturn message;\r\n\t}", "public static long deleteDirectory(String filePath) {\n if (!filePath.endsWith(File.separator)) {\n filePath = filePath + File.separator;\n }\n File dirFile = new File(filePath);\n if (!dirFile.exists()) {\n return 0;\n }\n if(!dirFile.isDirectory()) {\n return dirFile.delete() ? dirFile.length() : 0;\n }\n long delSize = 0;\n File[] files = dirFile.listFiles();\n for (int i = 0; i < files.length; i++) {\n File f = files[i];\n if(!f.exists()) continue;\n if (f.isFile()) {\n long len = f.length();\n boolean del = deleteFile(f);\n if (del) {\n delSize += len;\n } else {\n Log.w(TAG, \"Delete file failed: \" + f.getPath());\n }\n } else {\n delSize += deleteDirectory(files[i].getAbsolutePath());\n }\n }\n dirFile.delete();\n if (delSize <= 0)\n Log.w(TAG, \"Delete directory failed: \" + filePath);\n return delSize;\n }", "private void deleteWorkingRoot(WorkUnit workUnit, boolean copy) {\n\n // Construct folder name (will be copy or not)\n String folderToDelete = format(\"%s%s\", workUnit.root, (copy ? \"_copy\" : \"\"));\n\n // 7. Clean work directory\n MigrationHistory history = historyMgr.startStep(workUnit.migration,\n StepEnum.CLEANING, format(\"Remove %s\", folderToDelete));\n\n // Sanity check\n if (!StringUtils.isBlank(folderToDelete) && folderToDelete.contains(\"20\") && folderToDelete.contains(\"_\")) {\n\n try {\n\n if (isWindows) {\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails occassionally on windows with file lock issue\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails on windows not able to delete a large number of files?..\n String gitCommand = format(\"rd /s /q %s\", folderToDelete);\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n } else {\n // Seems to work ok on linux. Keeping Java command for the moment\n FileSystemUtils.deleteRecursively(new File(folderToDelete));\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n } catch (Exception exc) {\n LOG.error(\"Failed deleteDirectory: \", exc);\n historyMgr.endStep(history, StatusEnum.FAILED, exc.getMessage());\n }\n\n } else {\n LOG.error(\"Failed deleteDirectory: Badly formed delete path\");\n historyMgr.endStep(history, StatusEnum.FAILED, \"Badly formed delete path\");\n }\n }", "public static void deleteRecursive(File fileOrDirectory, long olderThen) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child, olderThen);\n }\n } else {\n long lastModified = fileOrDirectory.lastModified();\n long fileAge = System.currentTimeMillis() - lastModified;\n if (fileAge >= olderThen) {\n fileOrDirectory.delete();\n }\n }\n }", "public static void cleanDirectory(final ContextualLogger logger, Path start) throws IOException {\n if (!start.toFile().exists()) {\n boolean didMake = start.toFile().mkdir();\n Assert.assertTrue(didMake);\n }\n // We need the directory to be a directory (as we don't want to follow symlinks anywhere in this delete operation).\n Assert.assertTrue(start.toFile().isDirectory());\n // We don't want to delete the starting directory, but we do want to delete everything in it.\n Files.walkFileTree(start, new FileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n // Do nothing.\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n // This clearly can't be the start.\n Assert.assertFalse(start.equals(file));\n // Delete the file.\n Files.delete(file);\n logger.output(\"Deleted file \" + file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n logger.error(\"visitFileFailed: \\\"\" + file + \"\\\"\");\n throw exc;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (null == exc) {\n // Make sure that this isn't the starting directory.\n if (!start.equals(dir)) {\n Files.delete(dir);\n logger.output(\"Deleted directory \" + dir);\n }\n } else {\n throw exc;\n }\n return FileVisitResult.CONTINUE;\n }\n }\n );\n }", "public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;", "@Override\n\tpublic boolean delete() {\n\t\tboolean result = false;\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).delete();\n\t\t\t\t\t\t\telse if (file.isFile()) super.delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsuper.delete();\n\t\t\t\t} else if (this.isFile()) super.delete();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void delete(String source) {\n Path directory = Paths.get(source);\n try {\n Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)\n throws IOException {\n Files.delete(file);\n return CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(final Path file, final IOException e) {\n return handleException(e);\n }\n\n private FileVisitResult handleException(final IOException e) {\n e.printStackTrace(); // replace with more robust error handling\n return TERMINATE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException e)\n throws IOException {\n if (e != null) {\n return handleException(e);\n }\n Files.delete(dir);\n return CONTINUE;\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(FolderManager.class.getName()).log(Level.SEVERE, null, ex);\n delete(source);\n }\n }", "public void rmdir(String name) \n\t\t\tthrows NoSuchDirectoryException, IsFileException, DirectoryNotEmptyException\n\t{\n\t\tIterable<Position<FileElement>> toCheck = fileSystem.children(currentFileElement);\n\t\tif (toCheck != null)\n\t\t{\n\t\t\tfor (Position<FileElement> fe : toCheck )\n\t\t\t{\n\t\t\t\tif (fe.toString().equals(name) && fe.getValue().isDirectory() == false)\n\t\t\t\t{\n\t\t\t\t\tthrow new IsFileException();\n\t\t\t\t}\n\t\t\t\telse if (fe.toString().equals(name) && fe.getValue().isDirectory())\n\t\t\t\t{\n\t\t\t\t\tif (fileSystem.remove(fe) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new DirectoryNotEmptyException();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {throw new NoSuchDirectoryException();}\n\t}", "public static void blockingDeleteDirectory(final String pathToDirectory) {\n final File testBaseFolderF = new File(pathToDirectory);\n try {\n FSUtils.deleteFileFolder(testBaseFolderF);\n } catch (final IOException e) {\n e.printStackTrace();\n }\n boolean finishClean = false;\n while (!finishClean) {\n finishClean = !testBaseFolderF.exists();\n if (!finishClean) {\n try {\n Thread.sleep(SHORT_SLEEP_MILLIS);\n } catch (final InterruptedException e) {\n e.printStackTrace();\n Thread.currentThread().interrupt();\n }\n }\n }\n\n }", "private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }", "@Override\n public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException{\n if (e == null) {\n Files.deleteIfExists(dir);\n }\n return FileVisitResult.CONTINUE;\n }", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "@NonNull\n Completable deleteFolder(@NonNull String folderToDelete);", "private boolean deleteDirectoryWithRetries(File directory, int retryCount) {\n if (retryCount > 100) {\n return false;\n }\n if (FileUtils.deleteQuietly(directory)) {\n return true;\n }\n else {\n try {\n Thread.sleep(10);\n }\n catch (InterruptedException ex) {\n // ignore\n }\n return deleteDirectoryWithRetries(directory, retryCount + 1);\n }\n }", "public static boolean recursiveDelete(File fileOrDir)\n\t{\n\t\tSystem.out.println(\"path\" + fileOrDir.getAbsolutePath());\n\t if(fileOrDir.isDirectory())\n\t {\n\t \tSystem.out.println(\"is a directory --\");\n\t \t\n\t // recursively delete contents\n\t for(File innerFile: fileOrDir.listFiles())\n\t {\n\t \tSystem.out.println(\"list \" + innerFile.getAbsolutePath());\n\t if(recursiveDelete(innerFile))\n\t {\n\t return false;\n\t }\n\t }\n\t }\n\n\t return fileOrDir.delete();\n\t}", "@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }", "@Override\n public FileVisitResult postVisitDirectory(Path dir,\n IOException exc)\n throws IOException {\n Files.delete(dir);\n System.out.printf(\"Directory is deleted : %s%n\", dir);\n return FileVisitResult.CONTINUE;\n }", "public static final void delete(final File file)\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (final String temp : file.list())\n\t\t\t{\n\t\t\t\tdelete(new File(file, temp));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile.delete();\n\t\t}\n\t}", "public void reset(File folder) {\n File[] listOfFiles = folder.listFiles();\n for(int x=0;x<listOfFiles.length;x++) {\n if(listOfFiles[x].isDirectory()) {\n this.reset(listOfFiles[x]);\n listOfFiles[x].delete();\n }\n }\n folder.delete();\n }", "private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }", "@SuppressWarnings(\"unused\")\n\tpublic boolean rmdir(final File folder)\n\t\t\tthrows WritePermissionException\n\t{\n\t\tif (!folder.exists()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!folder.isDirectory()) {\n\t\t\treturn false;\n\t\t}\n\t\tString[] fileList = folder.list();\n\t\tif (fileList != null && fileList.length > 0) {\n\t\t\t// Delete only empty folder.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Try the normal way\n\t\tif (folder.delete()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Try with Storage Access Framework.\n\t\tif (Util.hasLollipop())\n\t\t{\n\t\t\tUsefulDocumentFile document = getDocumentFile(folder, true, true);\n\t\t\treturn document != null && document.delete();\n\t\t}\n\n\t\treturn !folder.exists();\n\t}", "final private static boolean removeTemporaryDirectory(File directory) {\n //System.out.println(\"removeDirectory \" + directory);\n\n if (directory == null)\n return false;\n final File sdirectory = directory;\n\n Boolean b = (Boolean)AccessController.doPrivileged(\n new java.security.PrivilegedAction() {\n public Object run() {\n if (!sdirectory.exists())\n return new Boolean(true);\n if (!sdirectory.isDirectory())\n return new Boolean(false);\n String[] list = sdirectory.list();\n // Some JVMs return null for File.list() when the\n // directory is empty.\n if (list != null) {\n for (int i = 0; i < list.length; i++) {\n File entry = new File(sdirectory, list[i]);\n if (entry.isDirectory())\n {\n if (!removeTemporaryDirectory(entry))\n return new Boolean(false);\n }\n else\n {\n if (!entry.delete())\n return new Boolean(false);\n }\n }\n }\n return new Boolean(sdirectory.delete());\n }\n });\n if (b.booleanValue())\n {\n return true;\n }\n else return false;\n }", "public final boolean recursiveDelete(File file) {\r\n if (isFileSystem(file)) {\r\n if (file.isDirectory()) {\r\n // delete all children first\r\n File[] children = FileSystemView.getFileSystemView().getFiles(file, false);\r\n for (File f : children) {\r\n if (!recursiveDelete(f)) {\r\n return false;\r\n }\r\n }\r\n // delete this file.\r\n return file.delete();\r\n }\r\n else {\r\n return file.delete();\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "private static void deleteTempFolder(String folderName) throws IOException {\n Path tempFolderPath = Paths.get(folderName);\n\n if (Files.exists(tempFolderPath) && Files.isDirectory(tempFolderPath)) {\n Files.walk(tempFolderPath)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n }\n }", "public void deleteFile(Path path) throws FileTreeReadingException, CannotDeleteFilesException {\n Boolean isDirectory = projectFiles.get(path);\n if (isDirectory == null)\n return;\n\n List<Path> filesToDelete = new ArrayList<>();\n\n if (isDirectory) {\n try {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\n filesToDelete.add(path);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n filesToDelete.add(path);\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n throw new FileTreeReadingException(projectDirectoryPath, e);\n }\n } else {\n filesToDelete.add(path);\n }\n\n //Walk in reverse order to delete directories too\n ListIterator<Path> iterator = filesToDelete.listIterator(filesToDelete.size());\n Set<Path> failedToDelete = new HashSet<>();\n synchronized (this) {\n while (iterator.hasPrevious()) {\n Path toDelete = iterator.previous();\n try {\n Files.delete(toDelete);\n } catch (IOException e1) {\n logger.warn(\"Cannot delete file \" + toDelete, e1);\n filesToDelete.remove(toDelete);\n failedToDelete.add(toDelete);\n }\n projectFiles.remove(toDelete);\n }\n globalEventManager.fireEventListeners(this,\n new ProjectFileListChangedEvent(new LinkedHashMap<>(),\n new HashSet<>(filesToDelete)));\n }\n if (failedToDelete.size() > 0)\n throw new CannotDeleteFilesException(failedToDelete);\n }", "public boolean removeDirectory(String directory_path) {\n\n\t\t//\n\t\t// delete directory from observed table list\n\t\t//\n\t\tlong rows_affected = m_db.delete(DIRECTORY_TABLE_NAME,\n\t\t\t\tDIRECTORY_FIELD_PATH + \"=?\", new String[] { directory_path });\n\n\t\t//\n\t\t// informal debug message\n\t\t//\n\t\tLogger.i(\"DBManager::removeDirectory> executeInsert: \" + rows_affected);\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn rows_affected != 0;\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic boolean rmdir(final Uri folder)\n\t\t\tthrows WritePermissionException\n\t{\n\t\tUsefulDocumentFile folderDoc = getDocumentFile(folder, true, true);\n\t\tUsefulDocumentFile.FileData file = folderDoc.getData();\n\t\treturn !file.exists || file.isDirectory && folderDoc.listFiles().length <= 0 && folderDoc.delete();\n\t}", "private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}", "@Test\r\n public void testDeleteDirectory() {\r\n System.out.println(\"deleteDirectory\");\r\n File directory = null;\r\n boolean expResult = false;\r\n boolean result = connection.deleteDirectory(directory);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "private static void deletePublicationDir(File pubDir) {\n System.out.println(\" Deleting contents of directory: \" + pubDir);\n for (File pubFile : pubDir.listFiles()) {\n if (pubFile.isFile()) {\n System.out.println(\" Deleting file: \" + pubFile);\n pubFile.delete();\n }\n }\n System.out.println(\" Now deleting directory: \" + pubDir);\n pubDir.delete();\n }", "@PostMapping(\"/deletefolder\")\n @ResponseBody\n public ResponseEntity deleteFolder(@RequestParam String directory, RedirectAttributes redirectAttributes) throws IOException {\n logger.log(Level.INFO, \"Deleting folder...\");\n if (uiCommandService.removeFile(directory)){\n return new ResponseEntity(HttpStatus.OK);\n } else {\n return new ResponseEntity(HttpStatus.BAD_REQUEST);\n }\n }", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "public boolean recursiveDelete(File file) {\n File[] files;\n if (file.isDirectory()) {\n files = file.listFiles();\n if (files != null) {\n for (int x = 0; x < files.length; x++) {\n recursiveDelete(files[x]);\n }\n }\n } else {\n operMatcher.put(new FileInfo(file, context), null);\n }\n file.delete();\n return false;\n }", "public static boolean deleteFile(File file, boolean recursive) {\r\n if (file.isFile() && file.exists() || file.isDirectory() && file.list().length == 0) {\r\n return file.delete();\r\n } else if (file.isDirectory() && recursive) {\r\n boolean result = true;\r\n String[] subDirNames = file.list();\r\n for (String name: subDirNames) {\r\n boolean localrt = deleteFile(file.getAbsolutePath(), name, true);\r\n if (!localrt) {\r\n result = false;\r\n }\r\n }\r\n return result;\r\n }\r\n return false;\r\n }" ]
[ "0.8291789", "0.7132972", "0.70191175", "0.70179", "0.69634104", "0.68902194", "0.67261356", "0.66885465", "0.6684037", "0.6615673", "0.6592248", "0.65739197", "0.65705246", "0.65523547", "0.6549181", "0.6535496", "0.65093195", "0.6492035", "0.64495635", "0.64431095", "0.64251894", "0.6412901", "0.6366376", "0.6356063", "0.63242275", "0.6313929", "0.6296904", "0.62368643", "0.62339497", "0.62146425", "0.6214418", "0.62050194", "0.6192087", "0.61807054", "0.6161881", "0.61612785", "0.6148506", "0.6138333", "0.61276937", "0.61198074", "0.61151254", "0.60853016", "0.6070509", "0.60116893", "0.60086024", "0.5997825", "0.5960554", "0.59460735", "0.59137356", "0.59005076", "0.58837116", "0.5834288", "0.5815921", "0.5724377", "0.57146657", "0.5685967", "0.5670305", "0.5669325", "0.56658643", "0.5664792", "0.5662776", "0.5658641", "0.5648691", "0.56319714", "0.56283665", "0.5624261", "0.56130964", "0.5593514", "0.5587339", "0.5567632", "0.5554272", "0.5553894", "0.5533559", "0.55309105", "0.5497651", "0.54867804", "0.54832935", "0.5469279", "0.5462716", "0.5443056", "0.5417418", "0.5392525", "0.5389879", "0.53843457", "0.5380619", "0.5375488", "0.5361669", "0.5361306", "0.53603625", "0.5359365", "0.535416", "0.53431344", "0.5341997", "0.53310937", "0.5330078", "0.5320146", "0.53115726", "0.53082675", "0.53075975", "0.52819633" ]
0.7217207
1
Factory method, generates a BBT definition from file
public static BBTDefinition loadFromFile(String filename) throws IOException, BBTDefinitionException { // we need to provide the following Hashtable<String,String> setup = new Hashtable<String,String>(); Vector<BBTRequestMember> request = new Vector<BBTRequestMember>(); Vector<BBTResponseMember> response = new Vector<BBTResponseMember>(); // get file reader int lineNr = 0; BufferedReader fileReader = new BufferedReader(new FileReader(new File(filename))); try { String line; // read file line by line while ((line = fileReader.readLine()) != null) { lineNr++; String lineUntrimmed = line; line = line.trim(); // skip on empty lines or comments if (line.length() == 0 || line.startsWith("#")) { continue; } // check for setup, request or response input line if (line.startsWith(PARSE_PREFIX_SETUP)) { // we have a setup line = line.substring(PARSE_PREFIX_SETUP.length()); String key = null; String value = null; StringTokenizer t = new StringTokenizer(line, "="); // parse key if (t.hasMoreTokens()) { key = t.nextToken().trim().toLowerCase(); } // parse key if (t.hasMoreTokens()) { value = t.nextToken().trim(); } // if (key != null && value != null && key.length() > 0 && value.length() > 0) { // setup.put(key, value); } else { throw new BBTDefinitionException( lineNr, BBTDefinitionException.PARSE_SETUP_INVALID ); } } else if (line.startsWith(PARSE_PREFIX_REQUEST)) { line = line.substring(PARSE_PREFIX_REQUEST.length()); // we have a request String name; String type; String value; StringTokenizer t = new StringTokenizer(line, ":"); name = t.nextToken().trim(); StringTokenizer t1 = new StringTokenizer(t.nextToken().trim(), "="); type = t1.nextToken().trim().toLowerCase(); value = t1.nextToken().trim(); request.add( new BBTRequestMember(lineNr, name, type, value) ); } else if (line.startsWith(PARSE_PREFIX_RESPONSE)) { // parse depth of conditions StringTokenizer t = new StringTokenizer(line, ";"); StringTokenizer t2 = new StringTokenizer(t.nextToken(), ":"); // parse "response.accountId : int[20]" int depth = 0; for(int i = 0; i < lineUntrimmed.length(); i++) { if (lineUntrimmed.charAt(i) == '\t') { depth++; } else { break; } } String name = t2.nextToken().trim().substring(PARSE_PREFIX_RESPONSE.length()); String type = t2.nextToken().trim().toLowerCase(); // parse optional expression String expression = null; if (t.hasMoreTokens()) { expression = t.nextToken().trim(); // we dont want to eval empty expressions if (expression.length() == 0) { expression = null; } } // parse optional output String outputTo = null; if (t.hasMoreTokens()) { outputTo = t.nextToken().trim(); } response.add( new BBTResponseMember( lineNr, depth, expression == null?null:new BBTExpression(lineNr, expression), name, type, outputTo ) ); } else { throw new BBTDefinitionException( lineNr, BBTDefinitionException.PARSE_PREFIX_NOTSUPPORTED ); } } // return new BBTDefinition( setup, request, response ); } catch (NoSuchElementException e) { throw new BBTDefinitionException(lineNr, e.getClass().getName() + " : " + e.getMessage()); } finally { // Close the input stream fileReader.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Definition createDefinition();", "public BoardBuilder(File fileName) throws Exception {\n\t\tJAXBContext contextObj = JAXBContext.newInstance(BoardInitializer.class);\n\t\tUnmarshaller mub = contextObj.createUnmarshaller();\n\t\tbi = (BoardInitializer) mub.unmarshal(new FileReader(fileName));\n\t}", "FileContent createFileContent();", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "DefineBlock createDefineBlock();", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "private IProgramElement createFileStructureNode(String sourceFilePath) {\n\t\tint lastSlash = sourceFilePath.lastIndexOf('\\\\');\n\t\tif (lastSlash == -1) {\n\t\t\tlastSlash = sourceFilePath.lastIndexOf('/');\n\t\t}\n\t\t// '!' is used like in URLs \"c:/blahblah/X.jar!a/b.class\"\n\t\tint i = sourceFilePath.lastIndexOf('!');\n\t\tint j = sourceFilePath.indexOf(\".class\");\n\t\tif (i > lastSlash && i != -1 && j != -1) {\n\t\t\t// we are a binary aspect in the default package\n\t\t\tlastSlash = i;\n\t\t}\n\t\tString fileName = sourceFilePath.substring(lastSlash + 1);\n\t\tIProgramElement fileNode = new ProgramElement(asm, fileName, IProgramElement.Kind.FILE_JAVA, new SourceLocation(new File(\n\t\t\t\tsourceFilePath), 1, 1), 0, null, null);\n\t\t// fileNode.setSourceLocation();\n\t\tfileNode.addChild(NO_STRUCTURE);\n\t\treturn fileNode;\n\t}", "public WBzard(String fileName) throws OWLOntologyCreationException, IOException {\n /*Read the ontology from the disk*/\n // final \n//\t\t URL fileURL = ClassLoader.getSystemResource(fileName);\n//\t\tphysicalURI = fileURL.toString();\n physicalURI = fileName;\n\n loader = OntologyManager.getInstance(physicalURI);\n }", "ModuleDefinition createModuleDefinition();", "BElementStructure createBElementStructure();", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "public BrihaspatiProFile() {\n }", "static Sbpayment newInstance(String filePath) {\n return new DefaultSbpayment(filePath);\n }", "BTable createBTable();", "@Override\n public JavaFile generate() {\n String versionCatalogSimpleName = \"VersionFactory\";\n\n // Creates the getCatalog method.\n MethodSpec.Builder getCatalogBuilder =\n MethodSpec.methodBuilder(\"getVersions\")\n .addModifiers(Modifier.PROTECTED, Modifier.STATIC)\n .addException(IllegalAccessException.class)\n .addException(InstantiationException.class)\n .returns(ParameterizedTypeName.get(IMMUTABLE_SET_CLASS_NAME, VERSION_CLASS_NAME))\n .addStatement(\n \"$T.Builder<$T> builder = $T.builder()\",\n IMMUTABLE_SET_CLASS_NAME,\n VERSION_CLASS_NAME,\n IMMUTABLE_SET_CLASS_NAME);\n\n /*\n * <code>\n * builder.add(new Version(\n * \"v123\",\n * new GoogleAdsException.Factory(),\n * GoogleAdsVersion.class,\n * new DefaultMessageProxyProvider(\n * new SearchGoogleAdsStreamResponseMessageProxy())));\n * </code>\n */\n // Creates a Version instance for each version of the API.\n for (Integer version : versions) {\n // Defines the exception factory class name.\n ClassName exceptionFactoryName =\n ClassName.get(\n \"com.google.ads.googleads.v\" + version + \".errors\", \"GoogleAdsException\", \"Factory\");\n // Defines the GoogleAdsVersion class name.\n ClassName versionClassName =\n ClassName.get(\"com.google.ads.googleads.v\" + version + \".services\", \"GoogleAdsVersion\");\n // Adds a Version instance to the builder with the params as defined above.\n getCatalogBuilder.addStatement(\n \"builder.add(new Version(\\n\" + \" $S,\\n\" + \" new $T(),\\n\" + \" $T.class))\",\n \"v\" + version,\n exceptionFactoryName,\n versionClassName);\n }\n\n getCatalogBuilder.addStatement(\"return builder.build()\");\n\n MethodSpec getCatalog = getCatalogBuilder.build();\n\n // Creates and returns the VersionCatalog class.\n TypeSpec versionCatalogGeneratedCode =\n TypeSpec.classBuilder(versionCatalogSimpleName)\n .addAnnotation(Utils.generatedAnnotation())\n .addModifiers(Modifier.PUBLIC)\n .addMethod(getCatalog)\n .build();\n\n JavaFile javaFile =\n Utils.createJavaFile(\"com.google.ads.googleads.lib.catalog\", versionCatalogGeneratedCode);\n Utils.writeGeneratedClassToFile(javaFile, targetDirectory);\n return javaFile;\n }", "public Config createConfig(String filename);", "protected CrTExampleBuilder<?> exampleBuilder(String fileName) {\n Objects.requireNonNull(fileName, \"Example Builder ID cannot be null.\");\n if (!ResourceLocation.isValidPath(fileName)) {\n throw new IllegalArgumentException(\"'\" + fileName + \"' is not a valid path, must be [a-z0-9/._-]\");\n }\n if (examples.containsKey(fileName)) {\n throw new RuntimeException(\"Example '\" + fileName + \"' has already been registered.\");\n }\n CrTExampleBuilder<?> exampleBuilder = new CrTExampleBuilder<>(this, fileName);\n examples.put(fileName, exampleBuilder);\n existingFileHelper.trackGenerated(new ResourceLocation(modid, fileName), PackType.SERVER_DATA, \".zs\", \"scripts\");\n return exampleBuilder;\n }", "BOp createBOp();", "BType createBType();", "public void generate(File file) throws IOException;", "CodegenFactory getCodegenFactory();", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "GmMacro createGmMacro(File file) throws IOException, SAXException, ParserConfigurationException;", "public ModuleMarshaller(String filename) {\n moduleFile = new File(filename);\n }", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "public FileCodeGenXML(FileCodeGen fileGen)\n {\n this.fileGen = fileGen;\n }", "public borFactoryImpl() {\n\t\tsuper();\n\t}", "LoadGenerator createLoadGenerator();", "LoadGenerator createLoadGenerator();", "void generate(String name, List<String> types, Settings settings);", "public static BII createEntity() {\n BII bII = new BII()\n .name(DEFAULT_NAME)\n .type(DEFAULT_TYPE)\n .biiId(DEFAULT_BII_ID)\n .detectionTimestamp(DEFAULT_DETECTION_TIMESTAMP)\n .sourceId(DEFAULT_SOURCE_ID)\n .detectionSystemName(DEFAULT_DETECTION_SYSTEM_NAME)\n .detectedValue(DEFAULT_DETECTED_VALUE)\n .detectionContext(DEFAULT_DETECTION_CONTEXT)\n .etc(DEFAULT_ETC)\n .etcetc(DEFAULT_ETCETC);\n return bII;\n }", "protected String getBuilderNameFor( final String filename )\n throws AntException\n {\n return DEFAULT_BUILDER;\n }", "private void setBlocks() {\n // load the class\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n // create an InputStream object\n InputStream inputStream = cl.getResourceAsStream(this.map.get(\"block_definitions\"));\n // initialize this factory with a factory\n this.factory = BlocksDefinitionReader.fromReader(new InputStreamReader(inputStream));\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public BPELGeneratorImpl() {\r\n \t\tsuper(GENERATOR_NAME);\r\n \t}", "protected static CfDef cfdefFromString(String st) throws IOException\n {\n assert st != null;\n TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory());\n CfDef cfDef = new CfDef();\n try\n {\n deserializer.deserialize(cfDef, Hex.hexToBytes(st));\n }\n catch (TException e)\n {\n throw new IOException(e);\n }\n return cfDef;\n }", "public interface TxtBuilder {\r\n\r\n\t/**\r\n\t * Generates textual information about some graph data.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String build();\r\n\r\n}", "void create(DataTableDef def) throws IOException;", "public FileObjectFactory() {\n }", "public ModuleMarshaller(File file) {\n moduleFile = file;\n }", "public static DefinedStructure loadSingleStructure(File source) throws IOException {\n DefinedStructure structure = new DefinedStructure();\n structure.b(NBTCompressedStreamTools.a(new FileInputStream(source)));\n return structure;\n }", "DirectiveDefinition createDirectiveDefinition();", "public interface DataDescriptorSampleGenerator {\n\n /**\n * Whether this sample generator supports given descriptor object.\n *\n * @param descriptor to generate sample for\n *\n * @return true if supports\n */\n boolean supports(Object descriptor);\n\n /**\n * Generate a sample/template import file\n *\n * @param descriptor to generate sample for\n *\n * @return template file name and content (defines aas list as implementation can add supporting files such as\n * readme files of XSD)\n */\n List<Pair<String, byte[]>> generateSample(Object descriptor);\n\n}", "public interface ISchemaIOBuilder extends INewLineCreator {\r\n\r\n\t/**\r\n\t * Create new empty Line \r\n\t * \r\n\t * @return the new Line\r\n\t * \r\n\t * @throws IOException\r\n\t */\r\n\tpublic abstract AbstractLine newLine() throws IOException;\r\n\r\n\t/**\r\n\t * Create line for supplied data\r\n\t * \r\n\t * @param data data to be store in the line\r\n\t * \r\n\t * @return new line\r\n\t */\r\n\tpublic abstract AbstractLine newLine(byte[] data) throws IOException;\r\n\r\n\t/**\r\n\t * \r\n\t * @return the layout or File-Schema (File Description)\r\n\t */\r\n\tpublic abstract LayoutDetail getLayout() throws\tIOException;\r\n\r\n\t/**\r\n\t * Create a new LineReader for a specified file\r\n\t * \r\n\t * @param filename name of the file to create the reader for\r\n\t * @return Requested LineReader\r\n\t *<pre>\r\n\t *<b>Example:</b>\r\n\t * \r\n * AbstractLineReader reader = JRecordInterface1.COBOL\r\n * .newIOBuilder(\"file-name\")\r\n * .setFileOrganization(Constants.IO_FIXED_LENGTH)\r\n * .<b>newReader(\"Data-Filename\")</b>;\r\n * \r\n * while ((l = reader.read()) != null) { ... }\r\n * reader.close()\r\n *</pre>\r\n\t * \r\n\t * @throws FileNotFoundException\r\n\t * @throws IOException anyIoexception that occurs\r\n\t */\r\n\tpublic abstract AbstractLineReader newReader(String filename)\r\n\t\t\tthrows FileNotFoundException, IOException;\r\n\r\n\t/**\r\n\t * Create a new LineReader for a supplied input stream\r\n\t * \r\n\t * @param datastream input datastream\r\n\t * @return Requested LineReader\r\n\t * <pre>\r\n\t *<b>Example:</b>\r\n * AbstractLineReader reader = JRecordInterface1.COBOL\r\n * .newIOBuilder(\"file-name\")\r\n * .setFileOrganization(Constants.IO_FIXED_LENGTH)\r\n * .<b>newReader(dataStream)</b>;\r\n * \r\n * while ((l = reader.read()) != null) { ... }\r\n * reader.close()\r\n * </pre>\r\n\t * @throws IOException \r\n\t */\r\n\tpublic abstract AbstractLineReader newReader(InputStream datastream)\r\n\t\t\tthrows IOException;\r\n\r\n\t/**\r\n\t * Create LineWriter for a supplied filename\r\n\t * \r\n\t * @param filename output filename\r\n\t * @return Requested LineWriter\r\n\t * <pre>\r\n\t * \r\n * ICobolIOBuilder ioBldr = RecordInterface1.COBOL\r\n * .newIOBuilder(\"CoboolCopybook)\r\n * .setFileOrganization(Constants.IO_FIXED_LENGTH);\r\n * LaytoutDetail schema = ioBldr.getLayout();\r\n * AbstractLineWriter writer = ioBldr.<b>newWriter(\"DataFileName\")</b>;\r\n * Line line = new Line(schema);\r\n * \r\n * line.getFieldValue(\"fieldName\").set(\"Field Value\");\r\n * ....\r\n * writer.write(line);\r\n * ...\r\n * \r\n * writer.close\r\n *\r\n *</pre>\r\n *\r\n\t * \r\n\t * @throws FileNotFoundException\r\n\t * @throws IOException\r\n\t */\r\n\tpublic abstract AbstractLineWriter newWriter(String filename)\r\n\t\t\tthrows FileNotFoundException, IOException;\r\n\r\n\t/**\r\n\t * Create LineWriter for a supplied stream\r\n\t * @param datastream output stream where the file is going to be written\r\n\t * @return the Requested LineWriter\r\n\t * \r\n\t * <pre>\r\n\t * \r\n * ICobolIOBuilder ioBldr = RecordInterface1.COBOL\r\n * .newIOBuilder(\"CoboolCopybook)\r\n * .setFileOrganization(Constants.IO_FIXED_LENGTH);\r\n * LaytoutDetail schema = ioBldr.getLayout();\r\n * AbstractLineWriter writer = ioBldr.<b>newWriter(dataStream)</b>;\r\n * Line line = new Line(schema);\r\n * \r\n * line.getFieldValue(\"fieldName\").set(\"Field Value\");\r\n * ....\r\n * writer.write(line);\r\n * ...\r\n * \r\n * writer.close\r\n *\r\n *</pre>\r\n\t * \r\n\t * @throws IOException\r\n\t */\r\n\tpublic abstract AbstractLineWriter newWriter(OutputStream datastream)\r\n\t\t\tthrows IOException;\r\n\r\n}", "BElement createBElement();", "public ModelSourceFile() {\n\t\t\n\t}", "@Nonnull\n public TSDBDef build() {\n if ( mergePolicy == null || fieldTypes == null) {\n throw new IllegalArgumentException(\"Field types and merge policies must be specified.\");\n }\n if ( blockPeriod == null || recordPeriod == null) {\n throw new IllegalArgumentException(\"Both the block period and record period must be specified.\");\n }\n if ( blockPeriod.length != recordPeriod.length) {\n throw new IllegalArgumentException(\"Both the block period and record period must be the same length.\");\n }\n // check that its possible to build a fixed period structure from the input data.\n for(int i = 0; i < blockPeriod.length; i++) {\n if ( blockPeriod[i] < recordPeriod[i] || blockPeriod[i]%recordPeriod[i] != 0) {\n throw new IllegalArgumentException(\"Each block period must be greater that the record period and the block period must be a multiple of the record period.\");\n }\n if (i > 0) {\n if ( recordPeriod[i] < recordPeriod[i-1] || recordPeriod[i]%recordPeriod[i-1] != 0) {\n throw new IllegalArgumentException(\"Each record period must be an exact multiple of the previous block record peroid.\");\n }\n if ( recordPeriod[i] > blockPeriod[i-1] ) {\n throw new IllegalArgumentException(\"Each record period must less thanthe previous block peroid.\");\n }\n }\n }\n int[] nrecords = new int[blockPeriod.length];\n for ( int i = 0; i < nrecords.length; i++) {\n nrecords[i] = (int)(blockPeriod[i]/recordPeriod[i]);\n }\n int[] recordWindow = new int[blockPeriod.length-1];\n for ( int i = 0; i < nrecords.length-1; i++) {\n recordWindow[i] = (int)(recordPeriod[i+1]/recordPeriod[i]);\n }\n long[] recordPeriodms = new long[recordPeriod.length];\n for (int i = 0; i < recordPeriod.length; i++) {\n recordPeriodms[i] = recordPeriod[i]*1000L;\n }\n\n\n return new TSDBDef(filename, name, fieldTypes, mergePolicy, nrecords, recordWindow, recordPeriodms, metadata);\n }", "private void BuildFromFile(String Filename)\n\t{\n\t\tDataSetBuilder<t> dsb = new DataSetBuilder<t>(\"iris.data\");\n\t\t_data = dsb.getDataMembers();\n\t\t\n\t\t//Set reference to null to queue for garbage collection and to ensure the source file gets closed\n\t\tdsb = null;\n\t}", "public void createFromBlast(File blastXmlFile) throws BioException,\n\t\t\tIOException, SAXException {\n\t\tInputSource is = new InputSource(new FileReader(blastXmlFile));\n\t\t// set parsing handler\n\t\tBlastToGraphHandler handler = new BlastToGraphHandler(this);\n\t\tSeqSimilarityAdapter adapter = new SeqSimilarityAdapter();\n\t\tadapter.setSearchContentHandler(handler);\n\t\tBlastXMLParserFacade reader = new BlastXMLParserFacade();\n\n\t\t// start parsing \"blastFile\"\n\t\treader.setContentHandler(adapter);\n\t\treader.parse(is);\n\t}", "private static void generateMakefileFromTemplate(String serviceName, String targetFile) {\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURL makeFileTemplateUrl = loader.getResource(Constants.HE_SERVICE_TEMPLATE_FOLDER + Constants.HE_SERVICE_MAKEFILE_TEMPLATE_NAME);\r\n\r\n\t\t\r\n\t\tSTGroup impl = new STGroupFile(makeFileTemplateUrl, \"UTF-8\", '$', '$');\r\n\t\tST st = impl.getInstanceOf(\"make_file\");\r\n\t\tst.add(\"service_name\", serviceName);\t\t\r\n\t\tString result = st.render();\r\n\t\t\r\n\t\tUtils.writeToFile(result, targetFile);\r\n\t}", "protected abstract void generate();", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n ledsCodeDSLEClass = createEClass(LEDS_CODE_DSL);\n createEReference(ledsCodeDSLEClass, LEDS_CODE_DSL__PROJECT);\n\n projectEClass = createEClass(PROJECT);\n createEAttribute(projectEClass, PROJECT__NAME);\n createEReference(projectEClass, PROJECT__INFRASTRUCTURE_BLOCK);\n createEReference(projectEClass, PROJECT__INTERFACE_BLOCK);\n createEReference(projectEClass, PROJECT__APPLICATION_BLOCK);\n createEReference(projectEClass, PROJECT__DOMAIN_BLOCK);\n\n interfaceBlockEClass = createEClass(INTERFACE_BLOCK);\n createEAttribute(interfaceBlockEClass, INTERFACE_BLOCK__NAME);\n createEReference(interfaceBlockEClass, INTERFACE_BLOCK__INTERFACE_APPLICATION);\n\n interfaceApplicationEClass = createEClass(INTERFACE_APPLICATION);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__TYPE);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME_APP);\n\n infrastructureBlockEClass = createEClass(INFRASTRUCTURE_BLOCK);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__BASE_PACKAGE);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__PROJECT_VERSION);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__LANGUAGE);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__FRAMEWORK);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__ORM);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__DATABASE);\n\n databaseEClass = createEClass(DATABASE);\n createEAttribute(databaseEClass, DATABASE__VERSION_VALUE);\n createEAttribute(databaseEClass, DATABASE__NAME_VALUE);\n createEAttribute(databaseEClass, DATABASE__USER_VALUE);\n createEAttribute(databaseEClass, DATABASE__PASS_VALUE);\n createEAttribute(databaseEClass, DATABASE__HOST_VALUE);\n createEAttribute(databaseEClass, DATABASE__ENV_VALUE);\n\n nameVersionEClass = createEClass(NAME_VERSION);\n createEAttribute(nameVersionEClass, NAME_VERSION__NAME_VALUE);\n createEAttribute(nameVersionEClass, NAME_VERSION__VERSION_VALUE);\n\n applicationBlockEClass = createEClass(APPLICATION_BLOCK);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__NAME);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__APPLICATION_DOMAIN);\n\n domainBlockEClass = createEClass(DOMAIN_BLOCK);\n createEAttribute(domainBlockEClass, DOMAIN_BLOCK__NAME);\n createEReference(domainBlockEClass, DOMAIN_BLOCK__MODULE);\n\n moduleBlockEClass = createEClass(MODULE_BLOCK);\n createEAttribute(moduleBlockEClass, MODULE_BLOCK__NAME);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENUM_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENTITY_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__SERVICE_BLOCK);\n\n serviceBlockEClass = createEClass(SERVICE_BLOCK);\n createEAttribute(serviceBlockEClass, SERVICE_BLOCK__NAME);\n createEReference(serviceBlockEClass, SERVICE_BLOCK__SERVICE_FIELDS);\n\n serviceMethodEClass = createEClass(SERVICE_METHOD);\n createEAttribute(serviceMethodEClass, SERVICE_METHOD__NAME);\n createEReference(serviceMethodEClass, SERVICE_METHOD__METHOD_ACESS);\n\n entityBlockEClass = createEClass(ENTITY_BLOCK);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__ACESS_MODIFIER);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__IS_ABSTRACT);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__NAME);\n createEReference(entityBlockEClass, ENTITY_BLOCK__CLASS_EXTENDS);\n createEReference(entityBlockEClass, ENTITY_BLOCK__ATTRIBUTES);\n createEReference(entityBlockEClass, ENTITY_BLOCK__REPOSITORY);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEAttribute(attributeEClass, ATTRIBUTE__ACESS_MODIFIER);\n createEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n createEAttribute(attributeEClass, ATTRIBUTE__PK);\n createEAttribute(attributeEClass, ATTRIBUTE__UNIQUE);\n createEAttribute(attributeEClass, ATTRIBUTE__NULLABLE);\n createEAttribute(attributeEClass, ATTRIBUTE__MIN);\n createEAttribute(attributeEClass, ATTRIBUTE__MAX);\n\n repositoryEClass = createEClass(REPOSITORY);\n createEAttribute(repositoryEClass, REPOSITORY__NAME);\n createEReference(repositoryEClass, REPOSITORY__METHODS);\n\n repositoryFieldsEClass = createEClass(REPOSITORY_FIELDS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__NAME);\n createEReference(repositoryFieldsEClass, REPOSITORY_FIELDS__METHODS_PARAMETERS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__RETURN_TYPE);\n\n enumBlockEClass = createEClass(ENUM_BLOCK);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__NAME);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__VALUES);\n\n methodParameterEClass = createEClass(METHOD_PARAMETER);\n createEReference(methodParameterEClass, METHOD_PARAMETER__TYPE_AND_ATTR);\n\n typeAndAttributeEClass = createEClass(TYPE_AND_ATTRIBUTE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__TYPE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__NAME);\n\n extendBlockEClass = createEClass(EXTEND_BLOCK);\n createEReference(extendBlockEClass, EXTEND_BLOCK__VALUES);\n }", "public FieldDefinition(String file)\n\t{\n\t\tsetFile(file);\n\t}", "boolean setup(BT_Class cls,String file,String outf)\n{\n patch_delta = 0;\n patch_index = 0;\n\n return patch_type.getInstrumenter().setupFiles(cls,file,outf);\n}", "public BrickStructure loadStructureFromBinaryFile(File file) {\n\t\tthrow new NullPointerException();\n\t}", "private void generate() throws FileNotFoundException {\n if (clazz.isInterface())\n generateInterface();\n writer.close();\n }", "TypeSystemDefinition createTypeSystemDefinition();", "public NFA(File f){readMachineDescription(f);}", "BSubstitution createBSubstitution();", "public Module(TruffleFile file) {\n this.file = file;\n }", "SchemaDefinition createSchemaDefinition();", "public BpmnModelReader(String filePath) {\n\t\tloadedFile = new File(filePath);\n\t}", "public static FileData createEntity() {\n FileData fileData = Reflections.createObj(FileData.class, Lists.newArrayList(\n\t\t FileData.F_NAME\n\t\t,FileData.F_PATH\n\t\t,FileData.F_SIZE\n\t\t,FileData.F_TYPE\n\t\t,FileData.F_DESCRIPTION\n ),\n\n\t\t DEFAULT_NAME\n\n\t\t,DEFAULT_PATH\n\n\t\t,DEFAULT_SIZE\n\n\t\t,DEFAULT_TYPE\n\n\n\n\n\n\n\t\t,DEFAULT_DESCRIPTION\n\n\t);\n return fileData;\n }", "VirtualMachineTemplate.DefinitionStages.Blank define(String name);", "public abstract String getDefinition();", "public interface StubGenerator {\n\n\t/**\n\t * @param fileName - file name\n\t * @return {@code true} if the converter can handle the file to convert it into a\n\t * stub.\n\t */\n\tdefault boolean canHandleFileName(String fileName) {\n\t\treturn fileName.endsWith(fileExtension());\n\t}\n\n\t/**\n\t * @param rootName - root name of the contract\n\t * @param content - metadata of the contract\n\t * @return the collection of converted contracts into stubs. One contract can result\n\t * in multiple stubs.\n\t */\n\tMap<Contract, String> convertContents(String rootName, ContractMetadata content);\n\n\t/**\n\t * @param inputFileName - name of the input file\n\t * @return the name of the converted stub file. If you have multiple contracts in a\n\t * single file then a prefix will be added to the generated file. If you provide the\n\t * {@link Contract#name} field then that field will override the generated file name.\n\t *\n\t * Example: name of file with 2 contracts is {@code foo.groovy}, it will be converted\n\t * by the implementation to {@code foo.json}. The recursive file converter will create\n\t * two files {@code 0_foo.json} and {@code 1_foo.json}\n\t */\n\tString generateOutputFileNameForInput(String inputFileName);\n\n\t/**\n\t * Describes the file extension that this stub generator can handle.\n\t * @return string describing the file extension\n\t */\n\tdefault String fileExtension() {\n\t\treturn \".json\";\n\t}\n\n}", "FileReference createFile(String fileName, String toolId);", "public void createJDLdefinition(Path path, Path outputFile) throws IOException {\r\n List<Path> classFiles = new ArrayList<>();\r\n listAllClasses(classFiles, path);\r\n\r\n Map<String, Entity> entities = parseJavaClasses(classFiles);\r\n\r\n printEntities(entities);\r\n printJDLDefinition(entities, outputFile);\r\n }", "BRMSPackageBuilder(PackageBuilderConfiguration config) {\n super(config);\n }", "public abstract void generate();", "@Nonnull\n private static IFileSpec createFileSpec(@Nonnull InputFile inputFile) {\n\t\n\tIFileSpec fileSpec = new FileSpec(PerforceExecutor.encodeWildcards(inputFile.filename()));\n\t fileSpec.setEndRevision(IFileSpec.HAVE_REVISION);\n\t return fileSpec;\n }", "public FileConfiguration loadConfiguration(File file);", "ImportConfig createImportConfig();", "public void makeBasicBlock(String fileName) {\n\t\tArrayList<String> ucodes;\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\n\t\t\tString line;\n\n\t\t\tint leaderSize = Leaders.size();\n\t\t\tfor (int i = 0; i < leaderSize; i++) {\n\t\t\t\tucodes = new ArrayList<>();\n\t\t\t\twhile ((lineCount == totalLineNum) || lineCount < leaderLineNum[i + 1]) {\n\t\t\t\t\tline = br.readLine();\n\t\t\t\t\tif (!Leaders.containsKey(lineCount)) {\n\t\t\t\t\t\tif (line.charAt(0) == ' ') {\n\t\t\t\t\t\t\tline = line.substring(11, line.length());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tucodes.add(line);\n\t\t\t\t\tlineCount++;\n\t\t\t\t}\n\t\t\t\tBasicBlocks.put(i + 1, ucodes);\n\t\t\t}\n\n\t\t\t// Print Basic Blocks\n\t\t\tSystem.out.println(\"\\n---------------- Basic Block ----------------\");\n\t\t\tfor (int i = 0; i < BasicBlocks.size(); i++) {\n\t\t\t\tint lnfirst = leaderLineNum[i];\n\t\t\t\tint lnlast = 0;\n\t\t\t\tif (i != BasicBlocks.size()) {\n\t\t\t\t\tlnlast = leaderLineNum[i + 1] - 1;\n\t\t\t\t\tif (i == BasicBlocks.size() - 1) {\n\t\t\t\t\t\tlnlast = leaderLineNum[i + 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"BB%d :: %3d ~ %3d: %s\\n\", i + 1, lnfirst, lnlast, BasicBlocks.get(i + 1));\n\t\t\t}\n\n\t\t\tlineCount = 1;\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"::: I/O error\");\n\t\t\tSystem.exit(1);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"::: I/O error\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "VirtualMachine.DefinitionStages.Blank define(String name);", "VirtualMachine.DefinitionStages.Blank define(String name);", "Factory getFactory()\n {\n return configfile.factory;\n }", "BOpMethod createBOpMethod();", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "static boolean BBFile(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"BBFile\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = PackageDefinition(b, l + 1);\n if (!r) r = BBFile_1(b, l + 1);\n if (!r) r = BBFile_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbluetoothPortEClass = createEClass(BLUETOOTH_PORT);\n\n\t\tl2CAPInJobEClass = createEClass(L2CAP_IN_JOB);\n\n\t\tl2CAPoutJobEClass = createEClass(L2CA_POUT_JOB);\n\t}", "void generateWireSource(JavaSourceDefinition definition, LogicalReference reference, EffectivePolicy policy) throws GenerationException;", "private void init(String filename){\n // create product cateogries \n // hard coded key-value for this project \n productCategory.addProduct(\"book\", \"books\");\n productCategory.addProduct(\"books\", \"books\");\n productCategory.addProduct(\"chocolate\", \"food\");\n productCategory.addProduct(\"chocolates\", \"food\");\n productCategory.addProduct(\"pills\", \"medical\");\n \n // read input\n parser.readInput(filename);\n \n // addProducts\n try {\n this.addProducts(parser.getRawData());\n } catch (Exception e) {\n System.out.println(\"Check input integrity\");\n }\n \n this.generateReceipt();\n\n }", "public interface BSQL2Java2Factory extends EFactory\n{\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n BSQL2Java2Factory eINSTANCE = bsql2java.bSQL2Java2.impl.BSQL2Java2FactoryImpl.init();\n\n /**\n * Returns a new object of class '<em>BSQL2 Java2</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSQL2 Java2</em>'.\n * @generated\n */\n BSQL2Java2 createBSQL2Java2();\n\n /**\n * Returns a new object of class '<em>BSQL Machine</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSQL Machine</em>'.\n * @generated\n */\n BSQLMachine createBSQLMachine();\n\n /**\n * Returns a new object of class '<em>BOperation</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BOperation</em>'.\n * @generated\n */\n BOperation createBOperation();\n\n /**\n * Returns a new object of class '<em>BTable</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BTable</em>'.\n * @generated\n */\n BTable createBTable();\n\n /**\n * Returns a new object of class '<em>Attribute</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Attribute</em>'.\n * @generated\n */\n Attribute createAttribute();\n\n /**\n * Returns a new object of class '<em>BType</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BType</em>'.\n * @generated\n */\n BType createBType();\n\n /**\n * Returns a new object of class '<em>Bool Operation</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Bool Operation</em>'.\n * @generated\n */\n BoolOperation createBoolOperation();\n\n /**\n * Returns a new object of class '<em>BSub True</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSub True</em>'.\n * @generated\n */\n BSubTrue createBSubTrue();\n\n /**\n * Returns a new object of class '<em>BSub False</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSub False</em>'.\n * @generated\n */\n BSubFalse createBSubFalse();\n\n /**\n * Returns a new object of class '<em>String Operation</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>String Operation</em>'.\n * @generated\n */\n StringOperation createStringOperation();\n\n /**\n * Returns a new object of class '<em>BAny Block</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BAny Block</em>'.\n * @generated\n */\n BAnyBlock createBAnyBlock();\n\n /**\n * Returns a new object of class '<em>Void Operation</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Void Operation</em>'.\n * @generated\n */\n VoidOperation createVoidOperation();\n\n /**\n * Returns a new object of class '<em>BPredicate</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BPredicate</em>'.\n * @generated\n */\n BPredicate createBPredicate();\n\n /**\n * Returns a new object of class '<em>SQL Call</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>SQL Call</em>'.\n * @generated\n */\n SQLCall createSQLCall();\n\n /**\n * Returns a new object of class '<em>Table Instance</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Table Instance</em>'.\n * @generated\n */\n TableInstance createTableInstance();\n\n /**\n * Returns a new object of class '<em>TI Assignment</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>TI Assignment</em>'.\n * @generated\n */\n TIAssignment createTIAssignment();\n\n /**\n * Returns a new object of class '<em>BParameter Typing</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BParameter Typing</em>'.\n * @generated\n */\n BParameterTyping createBParameterTyping();\n\n /**\n * Returns a new object of class '<em>BSubstitution</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSubstitution</em>'.\n * @generated\n */\n BSubstitution createBSubstitution();\n\n /**\n * Returns a new object of class '<em>BUnion</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BUnion</em>'.\n * @generated\n */\n BUnion createBUnion();\n\n /**\n * Returns a new object of class '<em>BElement Structure</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BElement Structure</em>'.\n * @generated\n */\n BElementStructure createBElementStructure();\n\n /**\n * Returns a new object of class '<em>BElement</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BElement</em>'.\n * @generated\n */\n BElement createBElement();\n\n /**\n * Returns a new object of class '<em>BSet</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>BSet</em>'.\n * @generated\n */\n BSet createBSet();\n\n /**\n * Returns the package supported by this factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the package supported by this factory.\n * @generated\n */\n BSQL2Java2Package getBSQL2Java2Package();\n\n}", "public abstract String getImportFromFileTemplate( );", "private void createConfig(File fileName) {\n\t\tthis.getConfig().set(\"Auto-update\", false);\n \n\t\t// setting a String\n\t\tString announcerName = \"&6[&cBroadcast&5Ex&6]&f: \";\n\t\tthis.getConfig().set(\"Announcer Name\", announcerName);\n \n\t\t// setting an int value\n\t\tint Interval = 10;\n\t\tthis.getConfig().set(\"Interval\", Interval);\n \n\t\t// Setting a List of Strings\n\t\t// The List of Strings is first defined in this array\n\t\tList<String> Messages = Arrays.asList(\"Hello World\", \"Powered by BroadcastEx\", \"&dColor codes &fare compatible :)\");\n\t\tthis.getConfig().set(\"Messages\", Messages);\n\t\tthis.saveConfig();\n\t}", "LinkedService.DefinitionStages.Blank define(String name);", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Pack2FactoryImpl() {\n\t\tsuper();\n\t}", "BR createBR();", "public JavaCodeGenerator(String filename)\n throws IOException {\n this(filename, new CodeStyle());\n }", "TypeDef createTypeDef();", "B createB();", "public static TurbineSpecification loadFromResource(final String filename) throws IOException {\n final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n final File file = new File(classLoader.getResource(filename).getFile());\n CSVFormat csvFileFormat = CSVFormat.DEFAULT.withFirstRecordAsHeader();\n InputStreamReader fileReader = new InputStreamReader(\n new FileInputStream(file), Charset.defaultCharset());\n Iterable<CSVRecord> records = new CSVParser(fileReader, csvFileFormat).getRecords();\n\n double bladeLength = 0;\n double powerRate = 0;\n double hubHeight = 0;\n double cutIn = 0;\n double cutOut = 0;\n IntList wind = new IntArrayList();\n DoubleList powerValues = new DoubleArrayList();\n DoubleList powerCoeffValues = new DoubleArrayList();\n boolean firstLine = true;\n for (CSVRecord record : records) {\n if (firstLine) {\n bladeLength = Double.valueOf(record.get(BLADE_LENGTH_HEADER));\n powerRate = Double.valueOf(record.get(POWER_RATE_HEADER));\n hubHeight = Double.valueOf(record.get(HUB_HEIGHT_HEADER));\n cutIn = Double.valueOf(record.get(CUT_IN_HEADER));\n cutOut = Double.valueOf(record.get(CUT_OUT_HEADER));\n firstLine = false;\n }\n wind.add(Integer.valueOf(record.get(WIND_VALUES_HEADER)));\n powerValues.add(Double.valueOf(record.get(POWER_VALUES_HEADER)));\n powerCoeffValues.add(Double.valueOf(record.get(POWER_COEFF_HEADER)));\n }\n\n int last = wind.get(wind.size() - 1);\n List<Double> corrPowerValues = new ArrayList(last + 1);\n List<Double> corrPowerCoeffValues = new ArrayList(last + 1);\n for (int i = 0; i < wind.get(wind.size() - 1) + 1; i++) {\n corrPowerValues.add(0d);\n corrPowerCoeffValues.add(0d);\n }\n\n for (int i = 0; i < wind.size(); i++) {\n corrPowerValues.set(wind.getInt(i), powerValues.get(i));\n corrPowerCoeffValues.set(wind.getInt(i), powerCoeffValues.get(i));\n }\n\n fileReader.close();\n return new AutoValue_TurbineSpecification(bladeLength, powerRate, hubHeight, cutIn,\n cutOut, corrPowerValues, corrPowerCoeffValues);\n }", "interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }", "private void writeFactory(GenModule module) throws Exception {\n\t\tMustacheFactory mf = new DefaultMustacheFactory();\n\t\tMustache template = mf.compile(\"factoryTemplate.hbs\"); \n\t\tElement[] sources = getSourcesOf(module);\n\t\tJavaFileObject fileObject = filer.createSourceFile(module\n\t\t\t\t.getPackageName() + \".\" + module.getClassName()); //we dont report the sources so that we keep the generated file on touching e.g. a @singleton component \n\t\tOutputStream outputStream = fileObject.openOutputStream();\n\t\ttry (Writer writer = new PrintWriter(outputStream)) {\n\t\t\t//template.apply(module, writer);\n\t\t\ttemplate.execute(writer, module);\n\t\t\twriter.flush();\n\t\t}\n\t\t;\n\t}", "ModuleDefine createModuleDefine();", "SchemaBuilder withFactory(String factoryClassName);", "public Builder withFileProcessor(FileProcessor fileProcessor)\n\t\t\t\tthrows IOException, NullPointerException, FileNotFoundException {\n\t\t\tString[] sentenceList = fileProcessor.readLine().split(\"\\\\.\");\n\t\t\tfor (int i = 0; i < sentenceList.length; i++) {\n\t\t\t\tString trimmedWord = sentenceList[i].trim();\n\t\t\t\tString pattern = \"[a-zA-Z\\\\.\\\\s]+\";\n\t\t\t\tif (trimmedWord.matches(pattern)) {\n\t\t\t\t\tMyElement obj = new MyElement(trimmedWord);\n\t\t\t\t\tsentenceArrayLst.add(obj);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"Please Enter the Input file with valid characters\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new Builder();\n\t\t}", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\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\treturn null;\r\n\t\t\t}", "TxtUMLFactory getTxtUMLFactory();" ]
[ "0.593792", "0.58168304", "0.5602875", "0.5597862", "0.5595482", "0.55273217", "0.5511257", "0.54733545", "0.5467095", "0.5458129", "0.54546314", "0.5450976", "0.5425177", "0.5362792", "0.5336597", "0.5334084", "0.5305561", "0.5280015", "0.523487", "0.52077127", "0.520461", "0.52039504", "0.51916313", "0.51815784", "0.5168388", "0.51370245", "0.5128034", "0.5124665", "0.5124665", "0.5119483", "0.5110592", "0.5089788", "0.50877935", "0.506645", "0.5047189", "0.5039935", "0.5034046", "0.5024645", "0.5023619", "0.5016924", "0.50159574", "0.5011916", "0.50096154", "0.50027484", "0.49934173", "0.49844137", "0.4959485", "0.49512163", "0.49501598", "0.49493518", "0.49397773", "0.4938344", "0.49348617", "0.49315354", "0.4929274", "0.4928257", "0.49159124", "0.49095178", "0.49092266", "0.49016836", "0.48934993", "0.4889361", "0.48882762", "0.48878655", "0.4882021", "0.48807308", "0.4876437", "0.48696676", "0.4839385", "0.48367947", "0.4833753", "0.48328963", "0.48243758", "0.48194477", "0.48194477", "0.4810974", "0.48101038", "0.48026532", "0.480078", "0.47984013", "0.47866726", "0.47842413", "0.4780317", "0.47758535", "0.47714043", "0.4766571", "0.47646132", "0.47642803", "0.4762961", "0.4760377", "0.47522432", "0.474973", "0.47470158", "0.47467652", "0.4746687", "0.47458553", "0.4737871", "0.47363532", "0.4735424", "0.47348994" ]
0.674268
0
/ renamed from: a
public int mo6946a(Date date) { try { return C1466n.m5528a(this.f4352b, this.f4351a.mo6917f().getCertificates(), date); } catch (Exception e) { e.printStackTrace(); throw new C1458g(-2130706262, e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public X509Certificate mo6947a() { try { return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(C1466n.m5529a(this.f4352b, this.f4351a.mo6913b()).getEncoded())); } catch (Exception e) { throw new C1458g(-2130706265, e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.58274275", "0.5794977", "0.57889086", "0.57837564", "0.5775938", "0.57696944", "0.57688814", "0.5752557", "0.5690739", "0.5678386", "0.567034", "0.56661606", "0.56595623", "0.56588095", "0.56576085", "0.5654566", "0.56445956", "0.56401736", "0.5638699", "0.56305", "0.56179273", "0.56157446", "0.5607045", "0.5605239", "0.5600648", "0.5595156", "0.55912733", "0.5590759", "0.5573802", "0.5556659", "0.55545336", "0.5550466", "0.5549409", "0.5544484", "0.55377364", "0.55291194", "0.55285007", "0.55267704", "0.5525843", "0.5522067", "0.5520236", "0.55098593", "0.5507351", "0.5488173", "0.54860324", "0.54823226", "0.5481975", "0.5481588", "0.5480086", "0.5478032", "0.54676044", "0.5463578", "0.54506475", "0.54438734", "0.5440832", "0.5440053", "0.5432095", "0.5422814", "0.5421934", "0.54180306", "0.5403851", "0.5400144", "0.5400042", "0.5394655", "0.53891194", "0.5388751", "0.53749055", "0.53691155", "0.53590924", "0.5356525", "0.5355397", "0.535498", "0.5354871", "0.535003", "0.5341249", "0.5326222", "0.53232485", "0.53197914", "0.5316941", "0.5311645", "0.5298656" ]
0.0
-1
/ renamed from: b
public int mo6948b() { return mo6946a((Date) null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: c
public Date mo6949c() { try { Attribute attribute = this.f4352b.getSignedAttributes().get(CMSAttributes.signingTime); if (attribute != null) { return ASN1UTCTime.getInstance(attribute.getAttrValues().getObjectAt(0)).getDate(); } return null; } catch (Exception e) { e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "private void kk12() {\n\n\t}", "abstract String mo1748c();", "public abstract void mo70710a(String str, C24343db c24343db);", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "public final void mo11687c() {\n }", "byte mo30283c();", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public interface C9223b {\n }", "public abstract String mo11611b();", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo72113b();", "void mo1749a(C0288c cVar);", "public interface C0764b {\n}", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C0938b {\n }", "void mo80455b();", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}" ]
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723", "0.60513836", "0.6049069", "0.6030368", "0.60263443", "0.60089093", "0.59970635", "0.59756917", "0.5956231", "0.5949343", "0.5937446", "0.5911776", "0.59034705", "0.5901311", "0.5883238", "0.5871533", "0.5865361", "0.5851141", "0.581793", "0.5815705", "0.58012", "0.578891", "0.57870495", "0.5775621", "0.57608724", "0.5734331", "0.5731584", "0.5728505", "0.57239383", "0.57130504", "0.57094604", "0.570793", "0.5697671", "0.56975955", "0.56911296", "0.5684489", "0.5684489", "0.56768984", "0.56749034", "0.5659463", "0.56589085", "0.56573", "0.56537443", "0.5651912", "0.5648272", "0.5641736", "0.5639226", "0.5638583", "0.56299245", "0.56297386", "0.56186295", "0.5615729", "0.56117755", "0.5596015", "0.55905765", "0.55816257", "0.55813104", "0.55723965", "0.5572061", "0.55696625", "0.5566985", "0.55633485", "0.555888", "0.5555646", "0.55525774", "0.5549722", "0.5548184", "0.55460495", "0.5539394", "0.5535825", "0.55300397", "0.5527975", "0.55183905", "0.5517322", "0.5517183", "0.55152744", "0.5514932", "0.55128884", "0.5509501", "0.55044043", "0.54984957" ]
0.0
-1
TODO Autogenerated method stub
private void addFrindge(int v, int w) { getEdge(v, w).setSelected(true); double cost = newCost(v, w); GreedyVertex vertex = getVertex(w); vertex.setFringe(true); vertex.setParent(v); vertex.setCost(cost); p.add(vertex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void modifyFringe(int v, int w) { getEdge(v, w).setSelected(true); getEdge(getVertex(w).getParent(), w).setSelected(false); double cost = newCost(v, w); GreedyVertex vertex = getVertex(w); vertex.setParent(v); vertex.setCost(cost); p.promote(vertex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
private double costOf(int w) { return getVertex(w).getCost(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private double newCost(int v, int w) { return 0.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private boolean isFringe(int w) { return getVertex(w).isFringe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void setCost(int u, double d) { getVertex(u).setCost(d); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Constructor accepts user data
public UserEntity(String name, String email, String password) { this.name = name; this.email = email; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserData() {\n }", "public InitialData(){}", "public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }", "public Data() {\n \n }", "protected UserWordData() {\n\n\t}", "public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }", "public DMXUserInput() {\n }", "public User() {\r\n this(\"\", \"\");\r\n }", "public Data() {\n }", "public Data() {\n }", "public UserInfo() {\n }", "public Data() {}", "public void init(UserData userData) {\n this.userData = userData;\n }", "public UserParameter() {\n }", "public Model(DataHandler data){\n //assign the data parameter to the instance\n //level variable data. The scope of the parameter\n //is within the method and that is where the JVM \n //looks first for a variable or parameter so we \n //need to specify that the instance level variable \n //is to be used by using the keyword 'this' followed \n //by the '.' operator.\n this.data = data;\n }", "protected User(Parcel in) {\n this.names = in.readString();\n this.lastnames = in.readString();\n this.age = in.readInt();\n }", "@Test\n public void userCustomConstructor_isCorrect() throws Exception {\n\n int id = 123456;\n int pin_hash = 98745;\n int pin = 9876;\n String salt = \"test salt\";\n String username = \"testUsername\";\n int firstTime = 0;\n String budget = \"test\";\n int hasPin = 1;\n\n //Create empty user\n User user = new User(id, username, pin_hash, pin, salt, firstTime, budget, hasPin);\n\n // Verify Values\n assertEquals(id, user.getId());\n assertEquals(pin_hash, user.getPin_hash());\n assertEquals(pin, user.getPin());\n assertEquals(salt, user.getSalt());\n assertEquals(username, user.getUsername());\n assertEquals(firstTime, user.getFirstTime());\n assertEquals(budget, user.getBudget());\n assertEquals(hasPin, user.getHasPin());\n }", "Constructor() {\r\n\t\t \r\n\t }", "public StringData1() {\n }", "public User(String n) { // constructor\r\n name = n;\r\n }", "User()\n\t{\n\n\t}", "public CommonSenseAuthUserData() {\n \n }", "public UserInfo(String name, long mobileNumber, String address) {\n\t\t\t\tsuper(name, mobileNumber);//super kullaniyoruz cunku test sinifindan verilen datalar su an icinde bulundugumuz\n\t\t\t\t//constructra veriliyor. Parent class'taki constructor'a tasimak icin \"super\" kullaniyoruz. \n\t\t\t\tthis.address=address;\n\t\t\t}", "public UserInputField() {\n }", "private User(Parcel in) {\n mData = in.readInt();\n }", "public Driver(JSONObject userData) {\n super(userData, Persona.driver);\n }", "public User(){\n this(null, null);\n }", "public StringData() {\n\n }", "public mainData() {\n }", "public CompanyData() {\r\n }", "public Employee(String inName, double inSalary)\n\t{\n\t\tname = inName;\n\t\tsalary = inSalary;\n\t}", "protected Command(String input, String[] data) {\n this.setInput(input);\n this.setData(data);\n }", "public UserData(String firstName, String lastName, String patronymic, String email, String phone, int userId) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.userId = userId;\n }", "public DesastreData() { //\r\n\t}", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "public UserData(int userDataId) {\n this.userDataId = userDataId;\n }", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public CustomerObj(String user_first_name, String user_last_name, String user_email) {\n \n this.user_first_name = user_first_name;\n this.user_last_name = user_last_name;\n this.user_email = user_email;\n \n }", "public UserData() {\n\t\tvalid = false;\n\t\tcode = \"\";\n\t\t\n\t\tphone = \"\";\n\t\temail = \"\";\n\t\t\n\t\taccounts = new ArrayList<Account>();\n\t\tpayees = new ArrayList<Payee>();\n\t}", "public UserData(int userDataId, String firstName, String lastName, String patronymic, String email, String phone, Tariff tariff, BigDecimal balance, int traffic, String photo, int userId) {\n this.userDataId = userDataId;\n this.firstName = firstName;\n this.lastName = lastName;\n this.patronymic = patronymic;\n this.email = email;\n this.phone = phone;\n this.tariff = tariff;\n this.balance = balance;\n this.traffic = traffic;\n this.photo = photo;\n this.userId = userId;\n }", "private UserParser() {\n }", "public User() {\r\n\r\n\t}", "public Constructor(){\n\t\t\n\t}", "public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}", "public User() {\r\n \r\n }", "public User(Context c) {\n\t\tthis.user = new UserData();\n\t\tObjectInputStream objInput = null;\n\t\tFileInputStream fileInput = null;\n\n\t\ttry {\n\t\t\tfileInput = c.openFileInput(this.filename);\n\t\t\tobjInput = new ObjectInputStream(fileInput);\n\t\t\tthis.user = (UserData)objInput.readObject();\n\t\t\tfileInput.close();\n\t\t\tobjInput.close();\n\t\t} catch (Exception e) {\n\t\t\tthis.user = new UserData();\n\t\t}\n\n\t\t\n\t}", "public UserData(String email, String password) {\n this.email = email;\n this.password = password;\n }", "public RegisterNewData() {\n }", "private Noder(E data) {\n this.data = data;\n }", "public PollData() {\n\n\n super(TYPE_NAME);\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "public CalccustoRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public Person(String name, String address, String postalCode, String city, String phone){\n // initialise instance variables\n this.name = name;\n this.address = address;\n this.postalCode = postalCode;\n this.city = city;\n this.phone = phone;\n }", "public User() {\r\n\t\temployee=new HashMap<Integer, Employee>();\r\n\t\tperformance=new HashMap<Employee,String>();\r\n\t}", "public InvalidUserDataException() {\n \n }", "private AuthenticationData() {\n\n }", "public Person(String inName)\n {\n name = inName;\n }", "public JSONUser(){\n\t}", "public TradeData() {\r\n\r\n\t}", "public SensorData() {\n\n\t}", "public User()\n\t{\n\t}", "public User() {\r\n\t}", "@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }", "public Person(String username, String email) {\n this.username = username;\n this.email = email;\n }", "public User() {\n\n\t}", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "public Users(String username, String password, String email, String phone)\r\n/* 53: */ {\r\n/* 54:67 */ this.username = username;\r\n/* 55:68 */ this.password = password;\r\n/* 56:69 */ this.email = email;\r\n/* 57:70 */ this.phone = phone;\r\n/* 58: */ }", "public CyanSus() {\n\n }", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public UserData(int userId, String username){\n isBusy = false;\n\n\t projects = new ArrayList<>();\n//\t projsInTmp = new ArrayList<>();\n//\t tasksInTmp = new ArrayList<>();\n\n\t\tthis.currentOperatorNetkey = 0;\n\t\tthis.userId = userId;\n\t this.username = username;\n }", "public User(Parcel in){\n String[] data = new String[4];\n\n in.readStringArray(data);\n // the order needs to be the same as in writeToParcel() method\n // Converts from string\n this.name = data[0];\n this.description = data[1];\n this.id = Integer.parseInt(data[2]);\n this.followed = Boolean.parseBoolean(data[3]);\n }", "public UserData(String name, String password, int credits)\n {\n this.name = name;\n this.password = password;\n this.credits = credits;\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "public SomeClassImpl(final String userName) {\n this.userName = userName;\n }", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public ChangeData()\r\n\t\t{\r\n\t\t}", "public Dictionary(String dataname, String username){\n this(dataname, null, username);\n }", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public User() {\n\t}", "public User(){}", "public User(){}", "public User(){}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public EmployeeRecords(String n, int s){ // defined a parameterized constructor\r\n this.name = n; // assigning a local variable value to a global variable\r\n this.salary = s; // assigning a local variable value to a global variable\r\n }", "public FilterData() {\n }", "public User() {\r\n }", "public PassPinDataItem() {\n }" ]
[ "0.7245398", "0.6944786", "0.6889445", "0.6807191", "0.6759241", "0.6749342", "0.67182976", "0.6696166", "0.66871166", "0.66871166", "0.66624856", "0.6644989", "0.66416186", "0.6617173", "0.6612292", "0.6566155", "0.6511448", "0.64860624", "0.64703345", "0.64645547", "0.6426042", "0.6408175", "0.64000225", "0.63480335", "0.6335567", "0.6318181", "0.63017523", "0.6293035", "0.62714463", "0.6264527", "0.6258575", "0.62545556", "0.62542516", "0.6252625", "0.625153", "0.6236507", "0.62128943", "0.6211766", "0.6210443", "0.6207778", "0.619207", "0.6190562", "0.61852646", "0.6179062", "0.617507", "0.61713105", "0.6171008", "0.6164923", "0.61634433", "0.615962", "0.6152581", "0.61373705", "0.6117425", "0.611168", "0.6110111", "0.61087376", "0.610422", "0.6102088", "0.60993356", "0.60921353", "0.6089513", "0.6082944", "0.60822463", "0.60805315", "0.60721993", "0.6069391", "0.6067324", "0.6063205", "0.60609037", "0.60498464", "0.6040069", "0.6039672", "0.6032742", "0.6027643", "0.6022893", "0.6022066", "0.6022066", "0.6022066", "0.6022066", "0.6022066", "0.6022066", "0.60213757", "0.60126734", "0.60076934", "0.60029536", "0.6000387", "0.6000387", "0.6000387", "0.59943515", "0.59943515", "0.5990628", "0.59853023", "0.59853023", "0.59853023", "0.5982354", "0.59821546", "0.5978543", "0.5978331", "0.59774685", "0.59698576", "0.5967559" ]
0.0
-1
This static method will form UserEntity class using user name and password This method will serach for user in datastore
public static UserEntity getUser(String name, String pass) { DatastoreService datastore = DatastoreServiceFactory .getDatastoreService(); Query gaeQuery = new Query("users"); PreparedQuery pq = datastore.prepare(gaeQuery); for (Entity entity : pq.asIterable()) { if (entity.getProperty("name").toString().equals(name) && entity.getProperty("password").toString().equals(pass)) { UserEntity returnedUser = new UserEntity(entity.getProperty( "name").toString(), entity.getProperty("email") .toString(), entity.getProperty("password").toString()); returnedUser.setId(entity.getKey().getId()); return returnedUser; } else{ } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User getUser(String userName, String password);", "UserEntity getUserEntity(String username, String password, boolean isAdmin);", "UserModel retrieveUserModel(String username, String password);", "UserDTO findUserByUseridAndPassword ( String userid , String password);", "public User queryUserByUsernameAndPassword(String username, String password);", "User getUserByLoginAndPassword(String login, String password) throws DaoException;", "public User getUser (String userName);", "public User getUser(String userName);", "User find(String username, String password);", "@Override\r\n\tpublic User getUseByUsernameAndPassword(User user) {\n\t\tString sql = \"select id,username,password,email from user where username=? and password=?\";\r\n\t\t\r\n\t\treturn this.queryOne(sql,user.getUsername(),user.getPassword());\r\n\t}", "User createUser();", "public User getUserByUserName(String userName);", "User loadUserByUserName(String userName);", "public User getUser(String username);", "public UserEntity(String name, String email, String password) {\n\t\tthis.name = name;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t}", "public static boolean storeUser(User dto){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tEntity user = new Entity(\"User\");\n\t\tuser.setProperty(\"firstName\", dto.getFirstName());\n\t\tuser.setProperty(\"lastName\", dto.getLastName());\n\t\t//NOTE! this is the HASHED password, not the raw unhashed pw\n\t\tuser.setProperty(\"password\", dto.getPassword());\n\t\ttry{\n\t\t\tdatastore.put(user);\n\t\t\treturn true;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public User getUserByName(String username);", "public User getUserByName(String username);", "public User get(String username);", "public User loadUserByLogin(String login);", "public User getUser(String name);", "public User getUser(String name);", "User getUserByUsername(String name) throws InvalidUserException;", "@Override\n public User findUserByName(String name) {\n User user = new User();\n user.setName(\"admin\");\n user.setPassword(\"00b3187384f2708025074f28764a4a30\");\n return user;\n }", "public void loginUserDAO(String userString) {\n User newUser = new Gson().fromJson(userString, User.class);\n User user = entityManager.find(User.class, Long.valueOf(newUser.getId()));\n user.setEmail(newUser.getEmail());\n user.setPassword(newUser.getPassword());\n entityManager.persist(user);\n }", "public User getUserByUserName(String username);", "User login(String username, String password);", "public UserQueryEntity getByName(String userName);", "User loadUser( String username ) throws UserNotFoundException;", "@Test\r\n\tpublic void shouldCreateAndRetrieveUser() {\n\t\tnew User(\"Bob\", \"hallo\").save();\r\n\t\tnew User(\"Brayn\", \"velo\").save();\r\n\r\n\t\t// Retrieve the user with some keywords\r\n\t\tUser bob = User.find(\"byPassword\", \"hallo\").first();\r\n\t\tUser brayn = User.find(\"byName\", \"Brayn\").first();\r\n\t\tUser zero = User.find(\"byPassword\", \"Housi\").first();\r\n\r\n\t\tassertEquals(\"Bob\", bob.name);\r\n\t\tassertEquals(\"hallo\", bob.password);\r\n\r\n\t\tassertEquals(\"Brayn\", brayn.name);\r\n\t\tassertEquals(\"velo\", brayn.password);\r\n\r\n\t\tassertNull(zero);\r\n\t}", "public User(long id, String username, String email, String password) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.password = password;\n}", "IfaceEntity.UserEntity findUserEntity(String id,IfaceLocation loc);", "public interface UserService {\n\n void register(UserEntity userEntity);\n UserEntity findByUsername(String username);\n UserEntity findByEmail(String email);\n void editMyAccount(UserEntity newUserEntity, Principal principal);\n void editUser(UserEntity newUserEntity);\n void deleteMyAccount(String password, Principal principal);\n void deleteUser(String username, Principal principal);\n List<UserEntity> getAllUsers();\n String getRoleOfLoggedUser();\n boolean checkIfPasswordMatchWithLoggedUserPassword(String password);\n}", "User getUser();", "User getUser();", "public User getUserByUsername(String username);", "public User getUserDetails(String username);", "public void storeUser(User user) {\n User doublecheck = getUser(user.getEmail());\n if(doublecheck != null){\n if(user.getAboutMe() == null && doublecheck.getAboutMe() != null){\n user.setAboutMe(doublecheck.getAboutMe());\n }\n if(user.getFirstName() == null && doublecheck.getFirstName() != null){\n user.setFirstName(doublecheck.getFirstName());\n }\n if(user.getLastName() == null && doublecheck.getLastName() != null){\n user.setLastName(doublecheck.getLastName());\n }\n /*if(user.getAdvisees() == null && doublecheck.getAdvisees() != null){\n user.setAdvisees(doublecheck.getAdvisees());\n }\n if(user.getAdvisors() == null && doublecheck.getAdvisors() != null){\n user.setAdvisors(doublecheck.getAdvisors());\n }\n */\n }\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n userEntity.setProperty(\"firstName\", user.getFirstName());\n userEntity.setProperty(\"lastName\", user.getLastName());\n //userEntity.setProperty(\"advisees\", user.getAdviseesToString());\n //userEntity.setProperty(\"advisors\", user.getAdvisorsToString());\n datastore.put(userEntity);\n\n }", "public User logInUser(final String login, final String password);", "User getUser(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "User getUserByUsername(String username);", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic UserDO getUserByUsernameAndPassword(String username, String password) {\n\t\tlog.debug(\"getting UserDO instance with username: \" + username+\",password: \"+password);\n\t\ttry {\n\t\t\tString sql = \"from UserDO where username = '\"+username+\"' and password='\"+password+\"'\";\n\t\t\tSession se = this.currentSession();\n\t\t\n\t\t\tQuery q = se.createQuery(sql);\n\t\t\tList<UserDO> result = q.list();\n\t\t\treturn result.size()==0?null:result.get(0);\n\t\t} catch (RuntimeException re) {\n\t\t\tlog.error(\"get failed\", re);\n\t\t\tthrow re;\n\t\t}\n\t}", "public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }", "@Override\n\tpublic User getUserByCredentials(String userName, String password) {\n\t\tList<User> userList = new ArrayList<User>();\n\t\tString query = \"SELECT u FROM User u\";\n\t\tuserList = em.createQuery(query, User.class).getResultList();\n\t\tUser returnUser = null;\n\t\tfor (User user : userList) {\n\t\t\tif (user.getUserName().equals(userName) && user.getPassword().equals(password)) {\n\t\t\t\tSystem.out.println(user);\n\t\t\t\treturnUser = user;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not found\");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnUser;\n\t}", "public abstract User login(User data);", "@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();", "@Test\n public void createAndRetrieveUser() {\n new User(\"bob\", \"secret\", \"Bobík\", \"Ostrava\").save();\n\n // Retrieve the user with bob username\n User bob = User.find(\"byUsername\", \"bob\").first();\n\n // Test \n assertNotNull(bob);\n assertEquals(\"Ostrava\", bob.modul);\n }", "private User authenticate(JSONObject data) {\r\n UserJpaController uJpa = new UserJpaController(Persistence.createEntityManagerFactory(\"MovBasePU\"));\r\n\r\n long fbId = Long.parseLong((String) data.remove(\"id\"));\r\n User user = uJpa.findByFbId(fbId);\r\n if (user != null) {\r\n return user;\r\n } else {\r\n user = new User(fbId, (String) data.remove(\"name\"), (String) data.remove(\"email\"), new Date(), \"u\");\r\n try {\r\n uJpa.create(user);\r\n } catch (Exception ex) {\r\n Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return user;\r\n }\r\n\r\n }", "public interface UserService {\n\n public Object save(UserEntity test);\n\n UserEntity get(Long id);\n\n boolean exists(String username);\n\n UserEntity checkLogin(Map<String, String> dataMap);\n\n UserEntity checkLogin(String username, String password);\n}", "User selectUserByUserNameAndPassword(@Param(\"username\") String username, @Param(\"password\") String password);", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"malfe.lore@gmail.com\";\n this.email = \"malfe.lore@gmail.com\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "public User getUser();", "@Override\n public User getUserInfo(String userName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, userName);\n return getRepository().getEntity(User.class, params);\n }", "public User getUserData();", "User findUserByName(String name);", "@Override\n public User getUserByMailAndPassword(String mail, String password) { String hql = \"SELECT u FROM User u WHERE u.f_mail=:mail and u.f_password=:password\";\n// Query query = getSession().createQuery(hql)\n// .setParameter(\"mail\", mail)\n// .setParameter(\"password\", password);\n// return (User) query.uniqueResult();\n//\n Criteria criteria = getSession().createCriteria(User.class)\n .add(Restrictions.eq(\"mail\", mail))\n .add(Restrictions.eq(\"password\", password));\n if (criteria.list().size() > 0) {\n return (User) criteria.uniqueResult();\n } else {\n return null;\n }\n }", "User getUserInformation(Long user_id);", "public interface User\n{\n String getUsername();\n String getPassword();\n}", "User getUserByLogin(String login);", "public interface User {\n\n //用户注册\n public String register(UsersEntity usersEntity);\n\n //用户登陆\n public String login(UsersEntity usersEntity);\n\n //用户登出\n public String logout(UsersEntity usersEntity);\n\n //检查MAC Email是否被注册\n public String vaildRegist(UsersEntity usersEntity);\n}", "User findByUsername(String username, String password) throws Exception;", "public static ExUser createEntity(EntityManager em) {\n ExUser exUser = new ExUser()\n .userKey(DEFAULT_USER_KEY);\n return exUser;\n }", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"email@gmail.com\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public abstract User getUser();", "User getUserById(Long id);", "User getUserById(Long id);", "public interface UserSerivice<T extends BaseEntity> extends BaseSerivice<UserEntity> {\n\n\n /**\n * 根据名称查具体的人\n *\n * @param name\n * @return\n */\n UserEntity findUserByUserName(String name);\n\n /**\n * 使用 token 查询 实体\n *\n * @param access_token\n * @return\n */\n UserEntity findUserByToken(String access_token);\n\n /**\n * 注册\n *\n * @param name\n * @param password\n * @return\n */\n UserEntity register(String name, String password, String avatar);\n\n\n /**\n * 根据用户名查询 对应的人员\n *\n * @return\n */\n List<UserEntity> findUsersByName(String page, String name);\n}", "public User(String login) {\n this.login = login;\n }", "@Test\n public void createAndRetrieveUser() {\n new User(\"bob@gmail.com\", \"secret\", \"Bob\").save();\n\n // Retrieve the user with bob username\n User bob = User.find(\"byEmail\", \"bob@gmail.com\").first();\n\n // Test \n assertNotNull(bob);\n assertEquals(\"Bob\", bob.username);\n }", "public User validarUsuario(String email, String password) throws BLException;", "public static boolean checkUser(User dto){\n\t\t//Filters by first name\n\t\tFilter firstNameFilter = new FilterPredicate(\n\t\t\t\t\"firstName\", FilterOperator.EQUAL, dto.getFirstName()\n\t\t\t\t);\n\t\t//Filters by last name\n\t\tFilter lastNameFilter = new FilterPredicate(\n\t\t\t\t\"lastName\", FilterOperator.EQUAL, dto.getLastName()\n\t\t\t\t);\n\t\t//Combines the filters into one so that it checks against ALL 3\n\t\tFilter combinedFilter = CompositeFilterOperator.and(firstNameFilter, lastNameFilter);\n\t\t\n\t\t//Prepare the Query\n\t\tQuery q = new Query(\"User\").setFilter(combinedFilter);\n\t\tlog.warning(\"Query = \" + q.toString());\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\t\n\t\t//Create the username/ pw structure like we did when we created it\n\t\tString username = dto.getFirstName() + \" \" + dto.getLastName();\n\t\tusername = username.toLowerCase();\n\t\t\n\t\t//Passwords, we will maintain their caps\n\t\tString superUsernamePassword = username + dto.getPassword();\n\t\t\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\t//Loops through all results. In our case, we are going to just use the first one\n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.warning(\"Entity returned, found user\");\n\t\t\t/*\n\t\t\tNow that we have the user, loop through the result(s) and check if the pw\n\t\t\tmatches via a special method call. Note, generally we would want to write\n\t\t\tsome code when a user is entered to check for duplicates, but for now, \n\t\t\tlet's stick with the simple stuff. Keep in mind that this will only check\n\t\t\tfor the FIRST result, so if you enter your name twice, you won't be able \n\t\t\tto pass validation without deleting one first. \n\t\t\t */\n\t\t\tString storedPassword = (String) result.getProperty(\"password\");\n\t\t\t\n\t\t\t//Now, compare the passed and stored passwords\n\t\t\tif(BCrypt.checkpw(superUsernamePassword, storedPassword)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t}\n\t\t//Nothing was returned, return false\n\t\tlog.warning(\"Entity not returned, found nothing\");\n\t\treturn false;\n\t}", "@Override\r\n\tpublic User findUser(String name) {\n\t\tSession session=DaoUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.\r\n\t\t\r\n\t\t\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic User getUserWithCredentials(String username, String password) {\n\t\tUser loginUser=mobileDao.getLoginUser(username);\n\t\t//System.out.println(\"password is -\"+loginBean.getPassword());\n\t\tif(loginUser!=null)\n\t\t{\t\n\t\t\tif(password.equals(loginUser.getPassword()))\n\t\t\t\treturn loginUser;\n\t\t}\n\t\treturn null;\n\t}", "public User(String name, String email, String password){\n this.name = name;\n this.email = email;\n this.password = password;\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public interface UserService {\n\n User login(User user);\n\n /**\n * 用户列表\n *\n * @param user\n * @param pageHelper\n * @return\n */\n List<User> userGrid(User user, PageHelper pageHelper);\n\n /**\n * 保存或者更新\n *\n * @param user\n */\n void saveOrUpdate(User user) throws Exception;\n\n /**\n * 通过主键list集合删除\n *\n * @param list\n */\n void delete(List<String> list);\n\n /**\n * 加载男女管理员\n *\n * @return\n */\n List<Map<String, Object>> userMaleAndFemale();\n}", "public UserBaseDTO getUserInfoByNameAndPassword(String username, String password) {\n UserBaseDTO userBaseDTO = new UserBaseDTO();\n userBaseDTO.setUsername(\"liushilang\");\n userBaseDTO.setUserId(\"1000\");\n userBaseDTO.setClientId(\"frontend\");\n userBaseDTO.setEnabled(true);\n userBaseDTO.setPassword(\"123456\");\n SimpleGrantedAuthority admin = new SimpleGrantedAuthority(\"admin\");\n SimpleGrantedAuthority cargo = new SimpleGrantedAuthority(\"cargo\");\n SimpleGrantedAuthority driver = new SimpleGrantedAuthority(\"dirver\");\n userBaseDTO.setAuthorities(Lists.newArrayList(admin, cargo, driver));\n userBaseDTO.setRoles(Lists.newArrayList(\"manager\", \"car-manager\", \"oper\"));\n return userBaseDTO;\n }", "public User queryUserByUsername(String username);", "User findUserByLogin(String login);", "public User(String username, String password) {\r\n this.username = username;\r\n this.password = password;\r\n }", "private void createUser(final String email, final String password) {\n\n }", "User getUserById(int id);", "public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }", "public UserDetailsEntity findByPwdAndUserEmail(String pwd,String userEmail);", "User findByCredential(Credential credential);", "public User getUser(String email);", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + id +\n \", name='\" + name + '\\'' +\n \", username='\" + username + '\\'' +\n \", password='\" + \"*******\" + '\\'' +\n '}';\n }", "public User userAuth(Login loginData)throws EntityNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tUser gotUser=userDao.getById(loginData.getEmail());\n\t\t\tif(gotUser.getPassword().equals(loginData.getPassword()))\n\t\t\t{\n\t\t\t\treturn gotUser;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tthrow new EntityNotFoundException(\"Password Incorrect\");\n\t\t\t}\n\t\t}\n\t\tcatch(EntityNotFoundException e)\n\t\t{\n\t\t\tthrow new EntityNotFoundException(\"No user exist with this email id\");\n\t\t}\t\n\t}", "@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }", "public User(String username, String password) {\n this.username = username;\n this.password = password;\n }", "User getUser(String userName) throws UserNotFoundException;", "User checkUser(String username, String password);", "ServiceUserEntity getUserByEmail(String email);", "public IUser CreateUser() {\n\t\tIUser iUser = null;\n\t\tswitch (db) {\n\t\tcase \"Mysql\":\n\t\t\tiUser = new MysqlUserImpl();\n\t\t\tbreak;\n\t\tcase \"Access\":\n\t\t\tiUser = new AccessUserImpl();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn iUser;\n\t}", "public User getUserById(Long id) throws Exception;", "User get(String username) throws UserNotFoundException, SQLException;", "public AgtUser findUserByName(String username);", "public void login(User user);" ]
[ "0.7356862", "0.7286401", "0.71572304", "0.70829564", "0.70624405", "0.6852098", "0.68263143", "0.6775469", "0.67006254", "0.6692042", "0.66748106", "0.66552246", "0.6639247", "0.6615077", "0.65929097", "0.6586632", "0.6559504", "0.6559504", "0.6558052", "0.6557105", "0.6553431", "0.6553431", "0.654827", "0.6523275", "0.65098363", "0.65071875", "0.65050846", "0.64925575", "0.64896476", "0.64743054", "0.64679444", "0.6458766", "0.645573", "0.6454279", "0.6454279", "0.6445605", "0.64368397", "0.6433886", "0.6412249", "0.6409583", "0.6408364", "0.6408364", "0.6408364", "0.6407365", "0.6396081", "0.63955456", "0.63942397", "0.63866514", "0.6377505", "0.6354507", "0.6337922", "0.63373387", "0.6329465", "0.6314991", "0.63146377", "0.6312256", "0.6304209", "0.6291798", "0.6285989", "0.627465", "0.62718487", "0.6260993", "0.6247807", "0.6236139", "0.6234986", "0.6232363", "0.62314314", "0.62314314", "0.6225279", "0.6223757", "0.62120044", "0.6210255", "0.6210104", "0.6208685", "0.620721", "0.6202691", "0.61996734", "0.6189863", "0.61841565", "0.6183755", "0.6181895", "0.6174188", "0.6170749", "0.6169924", "0.6169583", "0.6164726", "0.615816", "0.6155189", "0.6151263", "0.61484504", "0.6146423", "0.61453027", "0.6143165", "0.6142967", "0.6139344", "0.6139123", "0.6131682", "0.6131544", "0.612948", "0.6128612" ]
0.64697725
30
This method will be used to save user object in datastore
public boolean saveUser() { DatastoreService datastore = DatastoreServiceFactory .getDatastoreService(); Transaction txn = datastore.beginTransaction(); Query gaeQuery = new Query("users"); PreparedQuery pq = datastore.prepare(gaeQuery); List<Entity> list = pq.asList(FetchOptions.Builder.withDefaults()); System.out.println("Size = " + list.size()); try { Entity employee = new Entity("users", list.size() + 2); employee.setProperty("name", this.name); employee.setProperty("email", this.email); employee.setProperty("password", this.password); datastore.put(employee); txn.commit(); return true; }catch(Exception e) { return false; } finally{ if (txn.isActive()) { txn.rollback(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void saveUser(User user) {\n }", "@Override\r\n\tpublic void save(User user) {\n\t\t\r\n\t}", "public void saveUser(User user);", "void saveUserData(User user);", "@Override\n\tpublic void save(User entity) {\n\t\t\n\t}", "void save(User user);", "public void storeUser(User user) {\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n datastore.put(userEntity);\n }", "public boolean save(User user);", "@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}", "public User saveUser(User user);", "public void saveUser(User user) {\n\t\tpersist(user);\r\n\t\t\r\n\t}", "public void storeUser(User user) {\n User doublecheck = getUser(user.getEmail());\n if(doublecheck != null){\n if(user.getAboutMe() == null && doublecheck.getAboutMe() != null){\n user.setAboutMe(doublecheck.getAboutMe());\n }\n if(user.getFirstName() == null && doublecheck.getFirstName() != null){\n user.setFirstName(doublecheck.getFirstName());\n }\n if(user.getLastName() == null && doublecheck.getLastName() != null){\n user.setLastName(doublecheck.getLastName());\n }\n /*if(user.getAdvisees() == null && doublecheck.getAdvisees() != null){\n user.setAdvisees(doublecheck.getAdvisees());\n }\n if(user.getAdvisors() == null && doublecheck.getAdvisors() != null){\n user.setAdvisors(doublecheck.getAdvisors());\n }\n */\n }\n Entity userEntity = new Entity(\"User\", user.getEmail());\n userEntity.setProperty(\"email\", user.getEmail());\n userEntity.setProperty(\"aboutMe\", user.getAboutMe());\n userEntity.setProperty(\"firstName\", user.getFirstName());\n userEntity.setProperty(\"lastName\", user.getLastName());\n //userEntity.setProperty(\"advisees\", user.getAdviseesToString());\n //userEntity.setProperty(\"advisors\", user.getAdvisorsToString());\n datastore.put(userEntity);\n\n }", "void save(KingdomUser user);", "User saveUser(User user);", "public int saveUser(User user);", "public void saveUser(IUser user);", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "@Override\n\tpublic void saveUser(User user) {\n\t\tmongoTemplate.save(user);\n\t}", "@Override\n\tpublic void save(User user) \n\t{\n\t\tuserDAO.save(user);\n\t}", "public void save(SystemUser user);", "boolean saveUser(User entity) throws UserDaoException;", "void saveOrUpdate(User user);", "public UserEntity save(UserEntity userEntity);", "@Override\n\tpublic void save(User u) {\n\t\tSystem.out.println(\"a user saved\");\n\t}", "@Override\r\n\tpublic int saveUser(User user) {\n\t\tString sql = \"insert into user values(?,?,?,?)\";\r\n\t\treturn this.update(sql,user.getId(), user.getUsername(),user.getPassword(),user.getEmail());\r\n\t}", "public User save(User user);", "@Override\n\tpublic void save(UserEntity theUser) {\n\t\t\n\t\temploiDao.findById(theUser.getEmploi().getId()).ifPresent(emploi -> theUser.setEmploi(emploi));\n\t\tif(theUser.getEntite() != null){entityDao.findById(theUser.getEntite().getId()).ifPresent(entite -> theUser.setEntite(entite));}\n\t\t\n\t\tuserDao.save(theUser);\n\n\t}", "User save(User user);", "@Override\n\tpublic void createUser(User user) {\n\t\tSystem.out.println(\"INSIDE create user function\");\n\t\tem.persist(user);\n\t\t\t\n\t}", "public void saveUserData(UserData userData){\n userDataRepository.save(userData);\n }", "public Long saveUser(User user, User modifiedBy);", "public User saveUser(User user){\n return userRepository.save(user);\n }", "@Override\n\tpublic int save(User user) {\n\t\treturn dao.save(user);\n\t}", "@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}", "private void storeUser(User user){\n // instantiate SharedPreferences\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n // stores each attribute in a variable, if attribute is null the editor will clear the corresponding value.\n editor.putString(KEY_USER, user.toJSONString());\n // commit changes\n editor.apply();\n }", "@Override\n\tpublic void save(Connection conn, User user) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic User save(User user) {\n\t\treturn user;\n\t}", "@RolesAllowed({ RoleEnum.ROLE_ADMIN, RoleEnum.ROLE_GUEST })\n\tpublic Integer saveUser(User user);", "private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }", "@Override\n\tpublic boolean save(User user) {\n\t\tString userHash = UUID.randomUUID().toString();\n\t\tuser.setUserHash(userHash);\n\t\tboolean status = userRepository.save(user);\n\t\tif (status) {\n\t\t\tSystem.out.println(\"USER ID : \" + user.getId());\n\t\t\tSystem.out.println(\"User has been inserted!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"User has not been inserted!.\");\n\t\t}\n\t\treturn status;\n\t}", "public static boolean storeUser(User dto){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tEntity user = new Entity(\"User\");\n\t\tuser.setProperty(\"firstName\", dto.getFirstName());\n\t\tuser.setProperty(\"lastName\", dto.getLastName());\n\t\t//NOTE! this is the HASHED password, not the raw unhashed pw\n\t\tuser.setProperty(\"password\", dto.getPassword());\n\t\ttry{\n\t\t\tdatastore.put(user);\n\t\t\treturn true;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String saveUser(User entity) {\n\t\treturn null;\r\n\t}", "public void save(User user) {\n\t\tuserDetails.setUserName(user.getUserName());\n\t\tuserDetails.setPassword(user.getPassword());\n\t\tuserDetails.setFname(user.getFname());\n\t\tuserDetails.setLname(user.getLname());\n\t\tuserDetails.setAge(user.getAge());\n\t\tuserDetailsRepositroy.save(userDetails);\n\t}", "@Override\r\n public void usersave(User user) {\n if (user.getu_id() != null) {\r\n userMapper.userupdate(user);\r\n } else {\r\n userMapper.usersave(user);\r\n }\r\n }", "@Override\n\tpublic void saveUser(User user) {\n\t\tuser.setPassword(MD5.getInstance().getMd5(user.getPassword(),\"UTF-8\"));\n\t\tuserDao.insertUser(user);\n\t}", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }", "public void createUser(User user);", "@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }", "public void createUser(User user) {\n\n\t}", "public User save(User usuario);", "@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}", "@Override\n\tpublic boolean saveUser(User user) {\n\t\tString sql=\"insert into users(uname,upassword,type) values(?,?,?)\";\n\t\tList<Object> params=new ArrayList<Object>();//泛型\n\t\tparams.add(user.getUname());\n\t\tparams.add(user.getUpassword());\n\t\tparams.add(user.getType());\n\t\treturn this.MysqlUpdate(sql, params);\n\t}", "@Override\n\tpublic boolean saveUser(User user) {\n\t\treturn userRepository.saveUser(user);\n\t}", "@Override\n public void saveUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"insert into user(username,address,sex,birthday) values(?,?,?,?)\",user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic User save(User user) {\n\t\treturn null;\n\t}", "public int persistUser(User user) {\n\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\t// User user = new User(\"someuser2\",\"password2123\");\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(user);\n\t\tentityManager.getTransaction().commit();\n\t\tSystem.out.println(\"added user\");\n\n\t\treturn 0;\n\t}", "void save(UserDetails userDetails);", "@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}", "@Override\n\tpublic void addItem(User entity) {\n\t\tuserRepository.save(entity);\n\t\t\n\t}", "@Override\n public void createUser(User user) {\n run(()->{this.userDAO.save(user);});\n\n }", "@RequestMapping(value=\"/user\", method = RequestMethod.POST) \n\tpublic void saveUser(@RequestBody Users user) {\n\t\tlogger.debug(\"Add a new user: {}\", user.getUsername());\n\t\tauthService.saveUser(user);\n\t}", "public static void save(Context context,User user){\n try\n {\n\n FileOutputStream fileOutputStream = context.openFileOutput(\"UserData.dat\", Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(user);\n objectOutputStream.close();\n fileOutputStream.close();\n\n }\n\n catch(IOException ex) {\n System.out.println(\"IOException is caught\");\n }\n }", "public void setUser(User user) {\n this.savedBy = user;\n }", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"UserDao实现类\");\n\t}", "@Override\n\tpublic void save(Account userForm) {\n\t\taccount.save(userForm);\n\n\t}", "public static void SaveUser(StandardUserModel user, Context context) {\n\t\tfilename = userprofile;\n\t\tString modelJson = gson.toJson(user);\n\t\t\n\t\twriteuser(modelJson, context);\n\t}", "@HandleBeforeCreate @HandleBeforeSave\n\tpublic void handleUserSave(User user) {\n\t\tuser.setPassword(encoder.encode(user.getPassword()));\n\t}", "public String saveUser(User user) {\n id = user.getId();\n firstName = user.getFirstName();\n lastName = user.getLastName();\n phoneNumber = user.getPhoneNumber();\n email = user.getEmail();\n address = user.getAddress();\n idCity = user.getIdCity();\n currentUser = user;\n return \"operator\";\n }", "public void addUser(User user);", "public void insertUser() {}", "@Override\n\tpublic boolean save(User user) {\n\t\tif (get(user.getId()) == null) {\n\t\t\tuserList.add(user);\n\t\t\treturn true;\n\t\t}\n\t\t// if the record already exist\n\t\treturn false;\n\t}", "public User saveUser(User user) {\n\t\t\n\t\tRSA rsaUser = encript.generateKeys();\n\t\t\n\t\tString nameEncript = encript.criptografa(user.getName(), rsaUser.getPublicKey()).toString();\n\t\t\n\t\tString emailEncript = encript.criptografa(user.getEmail(), rsaUser.getPublicKey()).toString();\n\t\t\n\t\tuser.setEmail(emailEncript);\n\t\tuser.setName(nameEncript);\n\t\t\n\t\tUser userSalvo = repository.save(user);\n\t\t\n\t\trsaUser.setIdUser(userSalvo.getId());\n\t\t\n\t\trsaRepository.save(rsaUser);\n\t\t\n\t\treturn userSalvo;\n\t}", "public void saveUser(User user) {\n\t\tuserRepo.save(user);\n\t}", "public void writeThrough(User user) {\n Entity userEntity = new Entity(\"chat-users\", user.getId().toString());\n userEntity.setProperty(\"uuid\", user.getId().toString());\n userEntity.setProperty(\"username\", user.getName());\n userEntity.setProperty(\"password\", user.getPassword());\n userEntity.setProperty(\"creation_time\", user.getCreationTime().toString());\n userEntity.setProperty(\"blocked\", Boolean.toString(user.isBlocked()));\n datastore.put(userEntity);\n }", "public void addUser(UserModel user);", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "public void save(E entity, User user) {\n Session session = DAOUtils.getSession();\n Transaction trans = session.beginTransaction();\n\n entity.setModification(user);\n session.saveOrUpdate(entity);\n\n trans.commit();\n }", "public User save (User user) {\n\t\tif(user.getId() == null) {\n\t\t\tuser.setId(++userCount);\n\t\t}\n\t\t users.add(user);\n\t\t return user;\n\t}", "void registerUser(User newUser);", "@Override\n public void save(Usuario usuario) {\n }", "public User save(User user) {\n\n mapper.save(user);\n\n return user;\n }", "public void addUser(User user) {\n\t\t\r\n\t}", "public static void createUser(User user) {\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.credential/\";\n try {\n Gson gson = new Gson();\n String stringUserJson = gson.toJson(user);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringUserJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringUserJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }", "Boolean registerNewUser(User user);", "@Override\r\n\tpublic void updateUser(User user) {\n\t\tuserReposotory.save(user);\r\n\t\t\r\n\t}", "public User save()\n {\n //TODO implantar salvar\n //Metodo que vai salvar no webservice a model\n JSONObject json = new JSONObject();\n try {\n json.put(\"username\", this.username);\n json.put(\"password\", this.password);\n }catch(JSONException e){\n json = null;\n }\n\n return null;\n }", "@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}", "@Override\n\tpublic void insertUser(UserPojo user) {\n\t\tuserDao.insertUser(user);\n\t}", "public boolean saveUser(UserModel userModel) {\t\t\r\n\t\tUser user = this.toUser(userModel);\r\n\t\t/*if(userModel.getPassword() != null){\r\n\t\t\tuser.setPassword(bCryptPasswordEncoder.encode(userModel.getPassword()));\r\n\t\t}*/\r\n\t\tconfigDao.saveUser(user);\r\n\t\treturn true;\r\n\t}", "public void setUser(User user) { this.user = user; }", "void addUser(User user);", "void addUser(User user);", "public User saveUser(User user) {\n return userRepository.save(user);\n }", "public boolean saveUser(Owner user) {\r\n boolean f = false;\r\n try {\r\n //user -->database\r\n\r\n String query = \"insert into Owner(name,email,password) values (?,?,?)\";\r\n PreparedStatement pstmt = this.con.prepareStatement(query);\r\n pstmt.setString(1, user.getName());\r\n pstmt.setString(2, user.getEmail());\r\n pstmt.setString(3, user.getPassword());\r\n pstmt.executeUpdate();\r\n f = true;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return f;\r\n\r\n }", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "@Override\n\tpublic void save(List<User> entity) {\n\t\t\n\t}", "public void registerUser(User newUser) {\r\n userRepo.save(newUser);\r\n }", "@Override\n\tpublic UserImpl saveUser(UserImpl userImpl) {\n\t \treturn userRepository.save(userImpl);\n\t}", "public User InsertUser(User user){\n\t\t\t//step to call the jpa class and insert user into the db\n\t\t\treturn user;\n\t\t}" ]
[ "0.8105865", "0.8033112", "0.80051523", "0.7883526", "0.7808979", "0.7701809", "0.7632409", "0.75918794", "0.75705785", "0.7567534", "0.7523482", "0.75132143", "0.751202", "0.74971735", "0.74815345", "0.74675345", "0.7406055", "0.74050665", "0.7387403", "0.7353492", "0.73236597", "0.72863394", "0.7270664", "0.72673565", "0.72541875", "0.72275984", "0.7187151", "0.7091543", "0.707306", "0.70643556", "0.7063343", "0.70539236", "0.7022401", "0.7015543", "0.69884914", "0.6982581", "0.6979624", "0.6956065", "0.6924667", "0.6923755", "0.69083184", "0.6902329", "0.68808603", "0.68652236", "0.6858602", "0.685775", "0.68558586", "0.6850025", "0.68479383", "0.68458915", "0.68452924", "0.68003297", "0.6776148", "0.67656076", "0.6764134", "0.67612815", "0.6752464", "0.67522734", "0.6737628", "0.6736402", "0.67340267", "0.67334753", "0.67154384", "0.6711673", "0.67094505", "0.67006135", "0.66838413", "0.6663116", "0.6655643", "0.66547066", "0.6651466", "0.6647831", "0.6628844", "0.6627203", "0.6618548", "0.6608148", "0.6605056", "0.66012156", "0.6598208", "0.6598143", "0.65948", "0.65937215", "0.65815276", "0.6581521", "0.65757143", "0.657255", "0.65692014", "0.65585124", "0.6546384", "0.65408605", "0.6531672", "0.6528421", "0.6528421", "0.65264213", "0.6524637", "0.6518553", "0.65142894", "0.6508597", "0.6504943", "0.65026784" ]
0.69641227
37
for search on person
public static UserEntity search(String email) { DatastoreService datastore = DatastoreServiceFactory .getDatastoreService(); Query gaeQuery = new Query("users"); PreparedQuery pq = datastore.prepare(gaeQuery); for (Entity entity : pq.asIterable()) { if (entity.getProperty("email").toString().equals(email)) { UserEntity returnedUser = new UserEntity(entity.getProperty( "name").toString(), entity.getProperty("email") .toString()); returnedUser.setId(entity.getKey().getId()); return returnedUser; } else{ } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "private boolean searchPersonNew(Register entity) {\n\t\tboolean res = false;\n\t\tfor(Person ele : viewAll()) {\n\t\t\tif(ele.getName().equals(entity.getName()) && ele.getSurname().equals(entity.getSurname())) {\n\t\t\t\tres = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "abstract public void search();", "@In String search();", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "void search();", "void search();", "public void search() {\r\n \t\r\n }", "public String searchPerson(String name){\n String string = \"\";\n ArrayList<Person> list = new ArrayList<Person>();\n \n for(Person person: getPersons().values()){\n String _name = person.getName();\n if(_name.contains(name)){\n list.add(person);\n }\n }\n list.sort(Comparator.comparing(Person::getName));\n for (int i = 0; i < list.size(); i++){\n string += list.get(i).toString();\n }\n\n return string;\n }", "Person findPerson(String name);", "public List<User> searchUser(String searchValue);", "static public Person searchPerson(String name) {\n return personMap.get(name);\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "public Person searchPerson(String k, char c) {\n\t\t\n\t\tPerson personR ;\n\n\t\tif(c == DataBase.TREE_NAME) {\n\t\t\tpersonR = treeName.searchE(k);\n\t\t}else if(c == DataBase.TREE_LASTNAME) {\n\t\t\tpersonR = treeLastname.searchE(k);\n\t\t}else if(c == DataBase.TREE_FULLNAME) {\n\t\t\tpersonR = treeFullName.searchE(k);\n\t\t}else {\n\t\t\tpersonR = treeCode.searchE(k);\n\t\t}\n\t\t\n\t\treturn personR;\n\t\t\n\t}", "@Override\n\tpublic List<Person> searchPerson(PersonSearchRequestModel personSearchRequestModel) {\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n\t\tCriteriaQuery<Person> criteriaQuery = criteriaBuilder.createQuery(Person.class);\n\t\tRoot<Person> root = criteriaQuery.from(Person.class);\n\t\t\n\t\tString firstName = personSearchRequestModel.getFirstName();\n\t\tString lastName = personSearchRequestModel.getLastName();\n\t\tLocalDate startRangeDateOfBirth = personSearchRequestModel.getStartRangeBirthDate();\n\t\tLocalDate endRangeDateOfBirth = personSearchRequestModel.getEndRangeBirthDate();\n\t\tLong mobile = personSearchRequestModel.getMobile();\n\t\t\n\t\t/*\n\t\t * Adding search criteria's for query using CriteriaBuilder\n\t\t */\n\t\tList<Predicate> searchCriterias = new ArrayList<>();\n\t\t\n\t\tif( (firstName != \"\") && (firstName != null) ) {\n\t\t\tsearchCriterias.add( criteriaBuilder.like( root.get(\"firstName\"), \"%\"+firstName+\"%\") );\n\t\t}\n\t\tif( (lastName != \"\") && (lastName != null) ) {\n\t\t\tsearchCriterias.add( criteriaBuilder.like( root.get(\"lastName\"), \"%\"+lastName+\"%\") );\n\t\t}\n\t\tif( startRangeDateOfBirth!=null && endRangeDateOfBirth!=null && startRangeDateOfBirth.isAfter(endRangeDateOfBirth) ) {\n\t\t\tsearchCriterias.add( criteriaBuilder.between( root.get(\"birthDate\"), startRangeDateOfBirth, endRangeDateOfBirth) );\n\t\t}\n\t\tif( mobile!=null && mobile!=0 ) {\n\t\t\tsearchCriterias.add( criteriaBuilder.equal( root.get(\"mobile\"), mobile) );\n\t\t}\n\t\tcriteriaQuery.select( root ).where( criteriaBuilder.and( searchCriterias.toArray(new Predicate[searchCriterias.size()]) ));\n\t\treturn entityManager.createQuery(criteriaQuery).getResultList();\n\t}", "public User search_userinfo(String user_name);", "public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }", "private void searchPerson(String searchName){\r\n\r\n textAreaFromSearch.setText(\"\");\r\n try{\r\n Scanner scanner = new Scanner(file);\r\n String info;\r\n\r\n while (scanner.hasNext()){\r\n String line = scanner.nextLine();\r\n String[] components = line.split(separator);\r\n if (searchName.length() == 0){\r\n return;\r\n }\r\n if (components[0].contains(searchName)){\r\n info = \" Name: \" + components[0] + \"\\n\";\r\n info += \" Phone No.: \"+components[1]+\"\\n\";\r\n info += \" Email: \"+components[2]+\"\\n\";\r\n info += \" Address: \"+components[3]+\"\\n\";\r\n textAreaFromSearch.append(info+\"\\n\");\r\n }\r\n }\r\n }catch (IOException e){\r\n fileError();\r\n }\r\n }", "Customer search(String login);", "private void searchFunction() {\n\t\t\r\n\t}", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "@Override\n\tpublic List<Person> search(Integer id) {\n\t\treturn null;\n\t}", "public void search() {\n }", "@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public PersonaBean getPerson(String searched) {\r\n\t\ttry {\r\n\t\t\tConnectionUtils connectionUtils = new ConnectionUtils();\r\n\t\t\tConnection connection = connectionUtils.openConnection();\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"select phone_number from person where name = ?\");\r\n\t\t\tps.setString(1, searched);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tPersonaBean person = null;\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tperson = new PersonaBean(searched, rs.getString(\"phone_number\"));\r\n\t\t\t}\r\n\t\t\treturn person;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "MongoCursor<Document> findByPersonName(String personName);", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "List<User> findByfnameContaining(String search);", "public List<User> listSearch(String search);", "public int search_userid(String user_name);", "void searchProbed (Search search);", "@Override\r\n\tpublic List<User> search(String name) {\n\t\treturn null;\r\n\t}", "PersonFinder whereNameContains(String fragment);", "@Override\n\tpublic void search() {\n\t}", "@Override\r\n\tpublic void search() {\n\r\n\t}", "Data<User> getUserSearch(String user);", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic ArrayList<Object> searchUserByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for users\" + search.length());\n\t\t\n\t\tif(search == null){\n\t\t\t\n\t\t\tSystem.out.println(\"nothing can be find\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"its not 0000000000\");\n\t\t\n\t\tArrayList<Object> list = userRepository.findUserByName(search);\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}", "Search getSearch();", "@RequestMapping(value = \"/search/{name}\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Person> findByName(@PathVariable final String name) {\n\t\tlogger.info(\"Find person phones by name\");\n\t\treturn this.phoneBookService.findByName(name);\n\t}", "List<Person> findByIdAndName(int id,String name);", "@Query(\"name = ?\")\n List<PersonDocument> findByName(String name);", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "private List<User> simulateSearchResult(String firstName)\n\t{\n\n\t\tArrayList<User> user=(ArrayList<User>) userService.getAllUsers();\n\t\tArrayList<User> result = new ArrayList<User>();\n\t\tfor (User u : user) {\n\t\t\tif (u.getFirstName().contains(firstName)) {\n\t\t\t\tresult.add(u);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "@Override\n\tpublic List<Contacts> searchByKey(String key) {\n\n\t\tTransaction tx=null;\n\t\t\n\t\t\tSession session=MyHibernateSessionFactory.getsessionFactory().getCurrentSession();\n\t\t\ttx=session.beginTransaction();\n\t\t\t\n\t\t\tCriteria crit = session.createCriteria(entity.Contacts.class).add( Restrictions.like(\"name\", \"%\"+key+\"%\") );\n\t\t\tcrit.setMaxResults(50);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Contacts> person = crit.list();\n\t\t\tfor(int i=0;i<person.size();i++) {\n\t\t\t\tSystem.out.println(person.get(i).toString());\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\t\t\t\n\t\t\treturn person;\t\n\t}", "public boolean findPerson(Person person){\n for(Person p : personList){\n if(p.equals(person)){return true;}\n }\n return false;\n }", "public abstract SmartObject findIndividualName(String individualName);", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "@RestResource(path = \"search1\", rel = \"search1\")\n List<MonographEditors> findByNumOrderAndFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAndPersonIdAllIgnoreCase(\n @Param(\"numOrder\") Integer numOrder,\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations,\n @Param(\"personId\") Long personId);", "List<Person> findByLastName(String lastName);", "private SortedMap searchByPID(Person person, IcsTrace trace) {\n\t\tProfile.begin(\"PersonIdServiceBean.searchByPID\");\n\n\t\tTreeMap ret = new TreeMap();\n\t\tDatabaseServices dbServices = DatabaseServicesFactory.getInstance();\n\n\t\ttry {\n\t\t\tList matches = null;\n\n\t\t\tIterator ids = person.getPersonIdentifiers().iterator();\n\n\t\t\tQueryParamList params = new QueryParamList(QueryParamList.OR_LIST);\n\t\t\twhile (ids.hasNext()) {\n\t\t\t\tQueryParamList inner = new QueryParamList(\n\t\t\t\t\t\tQueryParamList.AND_LIST);\n\t\t\t\tPersonIdentifier pid = (PersonIdentifier) ids.next();\n\t\t\t\tinner.add(AttributeType.PERSON_IDENTIFIER, pid.getId());\n\t\t\t\tinner.add(AttributeType.AA_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningAuthority().getNameSpaceID());\n\t\t\t\tinner.add(AttributeType.AF_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningFacility().getNameSpaceID());\n\t\t\t\tparams.add(inner);\n\t\t\t}\n\t\t\tmatches = dbServices.query(params);\n\n\t\t\tif (trace.isEnabled()) {\n\t\t\t\ttrace.add(\"Persons that match PIDS:\");\n\t\t\t\tIterator i = matches.iterator();\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\ttrace.add((Person) i.next());\n\t\t\t}\n\n\t\t\tIterator i = matches.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPerson match = (Person) i.next();\n\t\t\t\tret.put(new Double(1.0), match);\n\t\t\t}\n\t\t} catch (DatabaseException dbEx) {\n\t\t\tlog.error(dbEx, dbEx);\n\t\t} finally {\n\t\t\tProfile.end(\"PersonIdServiceBean.searchByPID\");\n\t\t}\n\n\t\treturn ret;\n\t}", "List<ResultDTO> searchUser(String query);", "public void test_findUniqueByNamedOfQuery() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME_EXT, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t\t\r\n\t\tperson = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME, getParamMap(2));\r\n\t\tassertForFindUniquePerson(person);\r\n\t}", "public String returnPerson(String person)\n\t{\n\t\tfor(int i = 0; i < peopleList.size(); i++)\n\t\t{\n\t\t\t// getSurname is a method defined in the Person class and return a persons last name\n\t\t\t// Compares the last name you typed in with the last name of each person in the peopleList list\n\t\t\t// if the last names are equal then return the person with the appropriate toString method\n\t\t\tif(person.equalsIgnoreCase(peopleList.get(i).getSurname())) \n\t\t\t{\n\t\t\t\treturn(peopleList.get(i).toString());\n\t\t\t}\n\t\t}\n\t\t// If the person looked for is not in the \"peopleList\" list; return the string \"notFound\" that is defined above\n\t\treturn notFound;\n\t}", "@Override\n\tpublic Set<Person> getfindByNameContaining(String name) {\n\t\treturn null;\n\t}", "List<DataTerm> search(String searchTerm);", "Contact searchContact(String searchName){\n for(int i = 0; i < friendsCount; i++){\n if(myFriends[i].name.equals(searchName)){\n return myFriends[i];\n }\n }\n return null;\n }", "@Test\r\n public void testSearchPeople() throws MovieDbException {\r\n LOG.info(\"searchPeople\");\r\n String personName = \"Bruce Willis\";\r\n boolean includeAdult = false;\r\n List<Person> result = tmdb.searchPeople(personName, includeAdult, 0);\r\n assertTrue(\"Couldn't find the person\", result.size() > 0);\r\n }", "void loadSearch(UserSearch search);", "public abstract S getSearch();", "List<SearchResult> search(SearchQuery searchQuery);", "String findRelation(String person1, String person2);", "public void findPersonById(int i) {\n\t\t\n\t}", "private static Person findPersonByPersonObject(EntityManager em, Person person) {\n\t\tQuery query = em.createQuery(\"select p from Person p where p = :person\");\n\t\tquery.setParameter(\"person\", person);\n\t\treturn (Person) query.getSingleResult();\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "List<Person> persons(final PersonStringAware person,final AddressStringAware address, final Contact contact, final Circle distance, final Paging paging);", "@Override\r\n\tpublic Customer search(String name) {\n\t\treturn null;\r\n\t}", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "public void searchByAccount() {\n\t\t\n\t\tlog.log(Level.INFO, \"Please Enter the account number you want to search: \");\n\t\tint searchAccountNumber = scan.nextInt();\n\t\tbankop.search(searchAccountNumber);\n\n\t}", "public static void searchRelation(Contact[] myContacts, String find)\n {\n int counter = 0;\n System.out.println(\"Find results: \");\n for(int i = 0; i<myContacts.length; i++)\n {\n if(myContacts[i].getRelation().equals(find))\n {\n System.out.println(myContacts[i]);\n counter++;\n }\n }\n if(counter == 0)\n {\n System.out.println(\"There are no listings for \"+find);\n }\n else if(counter == 1)\n {\n System.out.println(\"There was \"+counter+\" listing for \"+find);\n }\n else\n {\n System.out.println(\"There were \"+counter+\" listings for \"+find);\n }\n }", "static int searchFirstname(String firstName) {\n for (Person p : people) {\n if (p.getFirstName().contains(firstName))\n return people.indexOf(p);//returns the index of people in the list.\n\n }\n return -1;\n }", "List<Corretor> search(String query);", "Name findNameByPersonPrimary(int idPerson);", "String searchBoxUserRecord();", "@SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);", "public void SearchTutor() {\n\t\t\n\t}", "List<Card> search(String searchString) throws PersistenceCoreException;", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "@Override\n\tpublic UserVO searchPhone(String phone) throws Exception {\n\t\treturn dao.searchPhone(phone);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Page<RmsPersonDTO> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of RmsPeople for query {}\", query);\n return rmsPersonSearchRepository.search(queryStringQuery(query), pageable)\n .map(rmsPersonMapper::toDto);\n }", "public void searchByEmail() {\n System.out.println(\"enter email to get that person details:\");\n Scanner sc = new Scanner(System.in);\n String email = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (email.equals(person.getEmail())) {\n List streamList = list.stream().filter(n -> n.getEmail().contains(email)).collect(Collectors.toList());\n System.out.println(streamList);\n }\n }\n }", "public Person getByUsername(String username)\n {\n Criteria criteria=sessionFactory.getCurrentSession()\n .createCriteria(Person.class);\n List personList=criteria.list();\n Person person=null;\n for(Person psn:(List<Person>)personList){\n if(psn.getUserName().equals(username)){\n person=psn; break;\n }\n }\n /* .add(Restrictions.eq(\"userName\", username))\n .uniqueResult();*/\n\n // Person person=((personList!=null && !personList.isEmpty())?personList.get(0):null);\n return person;\n }", "Page<ParaUserDTO> search(String query, Pageable pageable);", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "@Override\n\tpublic List<User> searchByUser(String userName) {\n\t\tlog.info(\"Search by username!\");\n\t\treturn userRepository.findByFirstNameRegex(userName+\".*\");\n\t}", "People getUser(int index);", "@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}", "@SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);", "public List<Ve> searchVe(String maSearch);", "@Query(\"spouse.name = ?\")\n List<PersonDocument> findBySpouseName(String name);", "public interface ActorRepository extends Neo4jRepository<Actor, Long> {\n\n\t\n\t@Query(\"MATCH (p:Actor) WHERE lower(p.name) CONTAINS lower($name) or lower(p.fullName) CONTAINS lower($name) RETURN p ORDER BY p.name\")\n\tCollection<Actor> findByNameLike(@Param(\"name\") String name);\n\n\t\n\t\n}", "public List<Person2> findByJobLocationIgnoreCase(String jobLocation);", "List<User> searchUsersByUsername(String username);", "public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }", "@Query(\"name = ? and age = ?\")\n List<PersonDocument> findByNameAndAge(String name, Integer age);", "Data<User> getUserSearch(String user, String fields);", "void searchView(String name);", "public void searchByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.next();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(\"Result: \"+i.getFirstName()));\n }", "public void research() throws Exception\r\n\t{\r\n\t\tresult = ((CLibraryManager)AUser.getInstance()).searchUser(jTextField_UserName.getText(),jTextField_UserID.getText(),jTextField_FirstName.getText(),jTextField_LastName.getText());\r\n\t}" ]
[ "0.7494601", "0.7077805", "0.69440657", "0.69216746", "0.691864", "0.68981093", "0.6867593", "0.6867593", "0.68260396", "0.6821035", "0.6753651", "0.6747754", "0.671205", "0.67013836", "0.66939855", "0.66735744", "0.6634318", "0.6630878", "0.66038316", "0.6585601", "0.6583681", "0.6580925", "0.6567122", "0.6509915", "0.64946854", "0.6493382", "0.6434604", "0.6431107", "0.6430706", "0.6418544", "0.6418276", "0.6408975", "0.6387596", "0.6350617", "0.6325053", "0.63159126", "0.63062036", "0.63044494", "0.6290495", "0.6259347", "0.62579733", "0.6245295", "0.62428176", "0.6236418", "0.6231651", "0.6231608", "0.6225438", "0.6204577", "0.61731136", "0.6170892", "0.61683685", "0.61633", "0.61572784", "0.61570436", "0.61194205", "0.61071336", "0.6104896", "0.61020774", "0.60978615", "0.6090415", "0.60898453", "0.6087519", "0.6068952", "0.6066935", "0.6052761", "0.60503083", "0.6046819", "0.6029048", "0.6028143", "0.6023803", "0.60160774", "0.60116994", "0.6003767", "0.6002576", "0.59880334", "0.5984152", "0.5979331", "0.59704864", "0.5969389", "0.5964607", "0.5957476", "0.59535587", "0.5951891", "0.59459394", "0.5945569", "0.59373486", "0.59370637", "0.59337133", "0.5932297", "0.592607", "0.5919636", "0.5916416", "0.58941597", "0.5893916", "0.5880804", "0.5879262", "0.5876184", "0.58755076", "0.58727545", "0.5871287", "0.58692133" ]
0.0
-1
used for person to accept
public static ArrayList<String> Searching_OnPeople_who_AddMe() { DatastoreService datastore = DatastoreServiceFactory .getDatastoreService(); ArrayList<String> requests= new ArrayList<String>(); Query gaeQuery = new Query("friends"); PreparedQuery pq = datastore.prepare(gaeQuery); for (Entity entity : pq.asIterable()) { if (entity.getProperty("friendEmail").toString().equals(User.getCurrentActiveUser().getEmail().toString())&& !entity.getProperty("status").toString().equals("accept")) { requests.add(entity.getProperty("myEmail").toString()); } else{ } } return requests; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isAccepting();", "void acceptRequest(Friend pendingRequest);", "public boolean isAccept(){\n return isAccept; \n }", "protected ACLMessage handleAcceptProposal(ACLMessage cfp, ACLMessage propose,ACLMessage accept) throws FailureException \r\n\t{\r\n\t\tACLMessage inform = accept.createReply();\r\n\t\tinform.setPerformative(ACLMessage.INFORM);\r\n\t\t//TODO: devrementer le nb de trajets disponibles suite a la vente\r\n\t\treturn inform;\r\n\t}", "Boolean acceptRequest(User user);", "@Override\n\tpublic void approveAcceptedOffer(String matriculation) {\n\t\tofferman.approveAcceptedOffer(matriculation);\n\t\t\n\t}", "private void manageAcceptedPacket(MeetingPacket packet) {\n Console.comment(\"=> Meeting response packet accepted from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnAccepted != null) {\n this.callbackOnAccepted.handle(packet.getSourceUser()) ;\n }\n }", "public void acceptFriendRequest(Friend friend);", "private void acceptCall() {\n\t\ttry {\n\t\t\tupdateText(\"Pratar med \", call.getPeerProfile().getUserName());\n\t\t\tcall.answerCall(30);\n\t\t\tcall.startAudio();\n\t\t\tif (call.isMuted()) {\n\t\t\t\tcall.toggleMute();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (call != null) {\n\t\t\t\tcall.close();\n\t\t\t}\n\n\t\t}\n\t}", "boolean getAccepted();", "public void verifyUser() {\n\t\toutMessage.setAction(1);\n\t\toutMessage.setObject(this.getUser());\n\t\tmodelCtrl.sendServerMessage(outMessage);\n\t\tinMessage = modelCtrl.getServerResponse();\n\t\t//user is verified\n\t\tif (inMessage.getAction() == 1) {\n\t\t\taccept();\n\t\t}\n\t\t//user is not verified, return to start\n\t\telse {\n\t\t\tSystem.out.println(\"User is not verified\");\n\t\t\tdeny();\n\t\t\t\n\t\t}\n\t}", "void acceptTrade(boolean accept);", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "protected ACLMessage handleAcceptProposal(ACLMessage cfp, ACLMessage propose, ACLMessage accept) {\r\n\t\t\tSystem.out.println(myAgent.getLocalName() + \" was accepted by \" + accept.getSender().getName());\r\n\t\t\t\r\n\t\t\t//Allocates space in superPC or queue for client\r\n\t\t\tRequiredSpecs specs = new RequiredSpecs(cfp.getContent());\r\n\t\t\tString resultMsg = allocateClient(specs, cfp.getSender().getName());\r\n\t\t\t\r\n\t\t\t// Creates reply to inform the client\r\n\t\t\tACLMessage result = accept.createReply();\r\n\t\t\tresult.setPerformative(ACLMessage.INFORM);\r\n\t\t\tresult.setContent(resultMsg);\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t}", "void acceptChallenge(int challengeId);", "public final void onBtnAcceptClick(View view) {\n\t\taName = etName.getText().toString();\n\t\taLastname = etLastname.getText().toString();\n\t\taAdress = etAdress.getText().toString();\n\t\t\n\t\t/**\n\t\t * Checks if no image picked.\n\t\t */\n\t\ttry{\n\t\t\taImage = contactImageUri.toString(); \n\t\t} catch (NullPointerException e) {\n\t\t\tcontactImageUri = Uri.parse(\"android.resource://com.example.mycontacts/drawable/person\");\n\t\t\taImage = contactImageUri.toString();\n\t\t}\n\t\t\n\t\tgetGender();\n\t\t//Set gender.\n\n\t\tGregorianCalendar cal = new GregorianCalendar(dpBirthDate.getYear(),\n\t\t\t\tdpBirthDate.getMonth(), dpBirthDate.getDayOfMonth());\n\t\taDate = cal.getTime().getTime();\n\n\t\tif (aName.equalsIgnoreCase(\"\") || aLastname.equalsIgnoreCase(\"\")\n\t\t\t\t|| aAdress.equalsIgnoreCase(\"\")) {\n\t\tif (aName.equalsIgnoreCase(\"\") && aLastname.equalsIgnoreCase(\"\")) {\n\t\t\tToast.makeText(this, \"Не введены личные данные\", Toast.LENGTH_SHORT).show();\n\n\t\t} else {\n\t\t\tshowDialog();\n\t\t}\n\t\t} else {\n\t\t\taddRecord();\n\t\t}\n\t}", "@Override\r\n\tpublic void acceptTrade(boolean willAccept) {\n\t\t\r\n\t}", "private void acceptButtonListener(){\n \t ait = new InitAccountTask(context, this);\n \t\n \tthis.acceptButton.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(agbCheck.isChecked()){\n\t\t\t\t\t\n\t\t\t\t\tString[] arg = new String[3];\n\t\t\t\t\t\n\t\t\t\t\targ[0] = HelperFunctions.getInstance().cleanNumber(telNumber.getText().toString());\n\t\t\t\t\targ[1] = countryCode.getText().toString();\n\t\t\t\t\targ[2] = password.getText().toString();\n\t\t\t\t\t\n\t\t\t\t\tait.execute(arg);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tagbNotCheckedToast();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"am in Validate click\");\n\t\t\t\t\n\t\t\t\tString u=user.getText();\n\t\t\t\n\t\t\t\tString p=pwd.getText();\n\t\t\t\tif(u.equals(\"seed\")&&p.equals(\"infotech\"))\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"You are a Valid user\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"You are a InValid user\");\n\t\t\t\n\t\t\t\t\n\t\t\t}", "public boolean acceptChatRequest(String nickToAccept) {\r\n\t\t\r\n\t\t//ENTER YOUR CODE TO ACCEPT A CHAT REQUEST\r\n\t\tthis.chatReceiver=new User();\r\n\t\tthis.chatReceiver.setNick(nickToAccept);\r\n\t\tString message= \"103&\"+this.chatReceiver.getNick();\r\n\t\tsendDatagramPacket(message);\r\n\t\treturn true;\r\n\t}", "@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}", "private void authorize() {\r\n\r\n\t}", "public void acceptInvitation(Player player) {\n if (invitations.containsKey(player)) {\n Player p = invitations.remove(player);\n List<Player> team = teams.get(p);\n team.add(player);\n teamMessage(p, ChatColor.BLUE + player.getName() + \" has joined the team!\");\n } else {\n player.sendMessage(ChatColor.RED + \"You were not invited to any teams! Forever alone..\");\n }\n }", "@Override\n\tpublic void handleAccept(Player player, Task task, Game game) {\n\t\t\n\t}", "public acceptFreelancer() {\r\n id = 1; // ensure id has a valid value\r\n }", "private void acceptListener() {\n addDialog.getAccept().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n Task newTask = new Task(addDialog.getTaskName().getText(), addDialog.getTaskDesc().getText(),\n Integer.parseInt(addDialog.getTaskDate().getText()));\n toDoList.addTask(newTask);\n } catch (NumberFormatException | InvalidTitleException a) {\n addDialog.dispose();\n }\n addDialog.dispose();\n refresh();\n }\n });\n }", "public String acceptRequest(String requestID) {\n Request accepted = getRequestById(requestID);\n if (accepted == null) {\n return \"Error: Request doesn't exist\";\n }\n accepted.accept();\n if (accepted instanceof AccountRequest) {\n User user = UserController.getInstance().getUserByUsername(((AccountRequest) accepted).getUser().getUsername());\n if (user instanceof Seller) ((Seller) user).validate();\n Database.getInstance().saveUser(user);\n } else if (accepted instanceof SaleRequest) {\n Sale sale=((SaleRequest) accepted).getNewSale();\n sale.acceptStatus();\n for (String id : sale.getAllItemId()) {\n Item item=ItemAndCategoryController.getInstance().getItemById(id);\n if(item==null) continue;\n item.setSale(sale.getId());\n Database.getInstance().saveItem(item);\n }\n Database.getInstance().saveSale(((SaleRequest) accepted).getNewSale());\n\n } else if (accepted instanceof ItemRequest) {\n Item item = ((ItemRequest) accepted).getNewItem();\n item.setAddedTime(LocalDateTime.now());\n Database.getInstance().saveItem(item);\n if(item.getCategoryName()!=null)\n ItemAndCategoryController.getInstance().addItemToCategory(item.getId(), item.getCategoryName());\n } else if (accepted instanceof ItemEdit) {\n requestController.ItemEditing((ItemEdit) accepted);\n } else if (accepted instanceof SaleEdit) {\n requestController.SaleEditing((SaleEdit) accepted);\n } else if (accepted instanceof CommentRequest) {\n //System.out.println(\"salam\");\n Comment comment = ((CommentRequest) accepted).getNewComment();\n //System.out.println(\"salam\");\n comment.accept();\n //System.out.println(\"salam\");\n Item item = ItemAndCategoryController.getInstance().getItemById(comment.getItemId());\n //System.out.println(\"salam\");\n item.addComment(comment);\n //System.out.println(\"salam\");\n Database.getInstance().saveItem(item);\n //System.out.println(\"salam\");\n } else if(accepted instanceof ItemDelete){\n String id=((ItemDelete) accepted).getItemId();\n Item removed=ItemAndCategoryController.getInstance().getItemById(id);\n if(removed!=null) {\n UserController.getInstance().deleteItemFromSeller(id, removed.getSellerName());\n ItemAndCategoryController.getInstance().removeItemFromCategory(removed.getCategoryName(),removed.getId());\n Database.getInstance().deleteItem(removed);\n }\n }\n else if(accepted instanceof AuctionRequest){\n Auction auction = ((AuctionRequest) accepted).getAuction();\n Database.getInstance().saveAuction(auction);\n }\n Database.getInstance().deleteRequest(accepted);\n return \"Successful: Request accepted\";\n }", "public void accept(IDN idn);", "public boolean isAccepting() {\n\t\treturn isAccepting;\n\t}", "public String formAccepted()\r\n { \r\n return formError(\"202 Accepted\",\"Object checked in\");\r\n }", "boolean acceptStudentRecord(StudentRecord record, String clientId) throws Exception;", "@Override\n\tpublic void challenge15() {\n\n\t}", "@Override\n\tpublic void challenge13() {\n\n\t}", "boolean supportsAccepts();", "public void agree(Object content){\n\n\t\tif( isParticipant() && (getState() == RequestProtocolState.WAITING_REQUEST)){\n\t\t\tsendMessage(content, Performative.AGREE, getInitiator());\n\t\t\tsetState(RequestProtocolState.SENDING_RESULT);\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.7\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.8\")); //$NON-NLS-1$\n\t\t}\n\t}", "@Override\n\tpublic void accept_order() {\n\t\t\n\t}", "public void setAccepted() {\r\n\t\tstatus = \"Accepted\";\r\n\t}", "public final void accept(GiftInfo.ShareInfo shareInfo) {\n }", "@Override\n protected void acceptTrade(Territory offerer, double demand, int typeDemand, double offer, int typeOffer){\n // An example for accepting a trade proposal: I only accept offers of peasants when I have less than 3 peasants\n // I am not checking what I am giving in exchange or how much, so you should work on that\n if (typeOffer == 3 && typeDemand == 2){\n acceptTrade = true;// no matter the amounts\n }\n else acceptTrade = false;\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew UserData(Username,true,\"Verification\");\n\t\t\t}", "boolean acceptTeacherRecord(TeacherRecord record, String clientId) throws Exception;", "public void isAllowed(String user) {\n \r\n }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "@Override\n\tpublic void acceptRequest(String userEmail, String senderEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"update friendship set status=? where user_id_1=? and user_id_2=?\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tpstmt.setString(1, Constants.COMPLETED);\n\t\t\tpstmt.setString(2, senderEmail);\n\t\t\tpstmt.setString(3, userEmail);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\t\n\t\t\tsql = \"insert into friendship (user_id_1, user_id_2, status) values (?, ?, ?)\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tpstmt.setString(1, userEmail);\n\t\t\tpstmt.setString(2, senderEmail);\n\t\t\tpstmt.setString(3, Constants.COMPLETED);\n\n\t\t\tpstmt.executeUpdate();\n\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\t}", "@Override\n\tpublic void challenge11() {\n\n\t}", "private void handleMiningAuthorize(\n final StratumConnection conn, final JsonRpcRequest message, final Consumer<String> sender) {\n String confirm;\n try {\n confirm = mapper.writeValueAsString(new JsonRpcSuccessResponse(message.getId(), true));\n } catch (JsonProcessingException e) {\n throw new IllegalStateException(e);\n }\n sender.accept(confirm);\n // ready for work.\n registerConnection(conn, sender);\n }", "@Override\n\tpublic boolean approvePartner(Partner partner) {\n\t\treturn false;\n\t}", "void askLeaderCardActivation();", "@Override\n public void isContractAccepted(Messages.ContractProposalResponse msg) {\n if (msg.isAccepted) {\n createNewContractAgent(msg);\n runningContracts.add(msg.contId);\n }\n }", "private void validateUser(user theUserOfThisAccount2) {\n\t\tboolean ok=false;\n\n\t\t\t\n\t\tif(passwordOfRegisteration.equals(passwordConfirm)&&!passwordOfRegisteration.equals(\"\")&&passwordOfRegisteration!=null){\n\t\t\tok=true;\n\t\t}\n\t\t\n\t\t\n\t\tif(ok){\n\t\t\t\n\t\t\t\ttheUserOfThisAccount2.setPassword(new Md5PasswordEncoder().encodePassword(passwordOfRegisteration,theUserOfThisAccount2.getUserName()));\n\t\t\t\tuserDataFacede.adduser(theUserOfThisAccount2);\n\t\t\t\tPrimeFaces.current().executeScript(\"new PNotify({\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttitle: 'Success',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttext: 'Your data has been changed.',\\r\\n\" + \n\t\t\t\t\t\t\"\t\t\ttype: 'success'\\r\\n\" + \n\t\t\t\t\t\t\"\t\t});\");\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tpleaseCheck();\n\t\t\t\n\t\t}\n\t}", "public abstract boolean isConfirmed();", "public void setFriendAccepted(Boolean friendAccepted) {\n this.friendAccepted = friendAccepted;\n }", "public void verifierSaisie(){\n boolean ok = true;\n\n // On regarde si le client a ecrit quelque chose\n if(saisieMessage.getText().trim().equals(\"\"))\n ok = false;\n\n if(ok)\n btn.setEnabled(true); //activer le bouton\n else\n btn.setEnabled(false); //griser le bouton\n }", "public void action() {\n for (int i = 0; i < myAgent.friends.size(); ++i) {\n SendRequestToFriend(myAgent.friends.get(i));\n }\n\n // Crée un filtre pour lire d'abord les messages des amis et des leaders des amis\n MessageTemplate temp = MessageTemplate.MatchReceiver(myfriends);\n MessageTemplate temp2 = MessageTemplate.MatchReceiver(friendsLeader);\n MessageTemplate tempFinal = MessageTemplate.or(temp, temp2);\n\n // Réception des messages\n ACLMessage messageFriendly = myAgent.receive(tempFinal);\n // si on n'est pas dans un groupe\n if (messageFriendly != null && !inGroup) {\n \t// s'il reçoit une proposition d'un amis/ leader d'un ami, il accepte, peu importe le poste et s econsidère dans le groupe\n if (messageFriendly.getPerformative() == ACLMessage.PROPOSE) {\n AcceptProposal(messageFriendly, Group.Role.valueOf(messageFriendly.getContent()));\n inGroup = true;\n }\n // s'il reçoit un CONFIRM, il enregistre le leader\n else if (messageFriendly.getPerformative() == ACLMessage.CONFIRM) {\n myLeader = messageFriendly.getSender();\n }\n // s'il reçoit un INFORM, il enregistre l'AID du leader de son ami afin de recevoir ses messages et lui demande son poste préféré\n else if (messageFriendly.getPerformative() == ACLMessage.INFORM) {\n AddFriendsLeaderToList(messageFriendly);\n AnswerByAskingPreferedJob(messageFriendly);\n }\n // sinon, il renvoie une erreur\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFriendly );\n }\n }\n // si on est dans un groupe\n else if (messageFriendly != null && inGroup) { \n \t// s'il reçoit une requete et qu'il est déjà dans un groupe, il renvoir l'AID de son leader à son ami\n if (messageFriendly.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFriendly);\n }\n // s'il reçoit un DISCONFIRM, il se remet en quete de job\n else if (messageFriendly.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFriendly);\n }\n else {\n \t// sinon, il refuse tout offre\n RefuseOffer(messageFriendly);\n }\n }\n else {\n \t// on check ensuite les messages des inconnus, une fois ceux des amis triés\n ACLMessage messageFromInconnu = myAgent.receive();\n \n // si on n'est pas dans un groupe\n if (messageFromInconnu != null && !inGroup) {\n \n boolean offerPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent().equals((\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\"));\n boolean offerNotPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent() != (\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\" );\n \n //on accepte l offre s'il s'agit de notre role préféré\n if (offerPreferedJob){\n AcceptProposal(messageFromInconnu, myAgent.preferedRole);\n }\n // on refuse s'il ne s'agit pas de notre offre favorite en redemandant notre job préféré\n else if (offerNotPreferedJob){\n RefuseOffer(messageFromInconnu);\n }\n // si on reçoit une confimation, on se considère dans un groupe et on enregistre notre leader\n else if (messageFromInconnu.getPerformative() == ACLMessage.CONFIRM){\n inGroup = true;\n myLeader = messageFromInconnu.getSender();\n }\n // sinon, il s'agit d'une erreure\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFromInconnu );\n }\n }\n // si on est dans un groupe\n else if (messageFromInconnu != null && inGroup) {\n \t// si on reçoit une requete, on renvoie à notre leader\n if (messageFromInconnu.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFromInconnu);\n }\n // si on reçoit un DISCONFIRM, on repart en quete de job\n else if (messageFromInconnu.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFromInconnu);\n }\n // sinon on refuse\n else {\n RefuseOffer(messageFromInconnu);\n }\n }\n // si le message est vide, on bloque le flux\n else {\n block();\n }\n }\n }", "public void acceptInvite(UserBean possibleOpponent, int possiblePiece)\n\t{\n\t\tthis.opponent = possibleOpponent;\n\t\tthis.piece = possiblePiece;\n\t\tSocket controlSocket;\n\t\ttry {\n\t\t\tcontrolSocket = new Socket(opponent.getIpAddress(), Model.controlDataSocketNumber);\n\t\t\tObjectOutputStream toPeer = new ObjectOutputStream(controlSocket.getOutputStream());\n\t\t\tClientMessage c = new ClientMessage();\n\t\t\tc.setCommand(\"ACCEPT\");\n\t\t\tc.setUser(new UserBean(this.hostName, this.userName, this.ipAddress));\n\n\t\t\tSystem.out.println(\"Accepting invite\");\n\t\t\t\n\t\t\ttoPeer.writeObject(c);\n\n\t\t\tcontrolSocket.close();\n\t\t\tthis.haveGame = true;\n\t\t\tSystem.out.println(\"Starting game\");\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public filter(String acc){\r\n\t\taccepted = acc;\r\n\t}", "@Override\n\tpublic void challenge14() {\n\n\t}", "public void onEulaAction(boolean isAccepted);", "@Override\n\tpublic void notifyAcceptedOffer(Role role, String managerName,\n\t\t\tString managerEmail) {\n\t\tSystem.out.println(\"Send an email to \" + managerEmail + \" because \" + role.getTitle() + \" Accepted\");\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == attendBut) {\n\t\t\tAppt appt = new Appt();\n\t\t\tappt.setID(con.getusableid());\n\t\t\tappt.setTimeSpan(inviteAppt.TimeSpan());\n\t\t\tappt.setstarttime(inviteAppt.getstarttime());\n\t\t\tappt.setendtime(inviteAppt.getendtime());\n\t\t\tappt.setTitle(inviteAppt.getTitle());\n\t\t\tappt.setInfo(inviteAppt.getInfo());\n\t\t\tappt.setJoint(true);\n\t\t\tappt.setJoinID(inviteAppt.getID());\n\t\t\tappt.setusername(con.getusername());\n\t\t\tappt.setLocation(inviteAppt.getLocation());\n\t\t\tcon.ManageAppt(appt, con.NEW);\n\t\t\tinviteAppt.addAttendant(con.getDefaultUser().ID());\n\t\t\tinviteAppt.removeWaitingList(con.getDefaultUser().ID());\n\t\t\tcon.ManageAppt(inviteAppt, con.MODIFY);\n\t\t}\n\t\tif (e.getSource() == rejectBut) {\n//\t\t\tinviteAppt.addReject(con.getDefaultUser().ID());\n//\t\t\tinviteAppt.removeWaitingList(con.getDefaultUser().ID());\n \t\tfor (Object key : con.mApptStorage.mAppts.keySet()){\n \t\t\tif(con.mApptStorage.mAppts.get(key).getID()==inviteAppt.getID()){\n \t\t\t\tcon.mApptStorage.mAppts.remove(key);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif(con.mApptStorage.mAppts.get(key).getJoinID()==inviteAppt.getID())\n \t\t\t{con.mApptStorage.mAppts.remove(key);}\n \t\t}\n \tcon.mApptStorage.saveApptToTxt();\t\n\t\t}\n\t\tdispose();\n\t}", "public void needconfirmstion(Pending_appoint_Owner pending_appoint_owner) {\n //TODO\n newOwners.put(pending_appoint_owner.grantee.getId(), pending_appoint_owner);\n user.add_msg(\"a new Owner is being appointed for store:\" + getStore().getName()\n + \"- required your confirmation - \" + pending_appoint_owner.grantee.getId());\n }", "boolean isAccepted(Speciality speciality, User user) throws LogicException;", "@Test\r\n\tpublic void testConfirmFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.receiveFriendRequest(\"JavaLord\", \"JavaLordDisplayName\");\r\n\t\tassertTrue(p1.hasFriendRequest(\"JavaLord\"));\r\n\t\tp1.confirmFriendRequest(\"JavaLord\");\r\n\t\tassertFalse(p1.hasFriendRequest(\"JavaLord\"));\r\n\t}", "public void challengeAccept(int challengeNmr) {\n try {\n write(\"challenge accept \" + challengeNmr);\n } catch (IOException e) {\n System.out.println(\"No connecting with server:challengeAccept\");\n }\n }", "void acceptAngel(Angel angel);", "public void handleSend(ActionEvent actionEvent) {\r\n String to=textFieldTo.getText();\r\n try{\r\n Long idto = Long.parseLong(to);\r\n\r\n FriendshipRequest request = new FriendshipRequest();\r\n Tuple<Long,Long> f = new Tuple<>(user.getId(), idto);\r\n request.setId(f);\r\n\r\n service.addRequest(request);\r\n showMessage(Alert.AlertType.CONFIRMATION,\"Request sent!\",\"Request is now pending!\");\r\n\r\n textFieldTo.clear();\r\n\r\n\r\n }catch(NumberFormatException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }catch (ServiceException exception){\r\n showMessage(Alert.AlertType.ERROR,\"Error\",exception.toString());\r\n }\r\n }", "public void requestAccepted(String username)\n\t{\n\t\t// Player otherPlayer = TcpProtocolHandler.getPlayer(username);\n\t\tPlayer otherPlayer = ActiveConnections.getPlayer(username);\n\t\tif(otherPlayer != null)\n\t\t{\n\t\t\tif(m_requests.containsKey(username))\n\t\t\t\tswitch(m_requests.get(username))\n\t\t\t\t{\n\t\t\t\t\tcase BATTLE:\n\t\t\t\t\t\t/* First, ensure both players are on the same map */\n\t\t\t\t\t\tif(otherPlayer.getMap() != getMap())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t/* Based on the map's pvp type, check this battle is possible If pvp is enforced, it will be started when the offer is made */\n\t\t\t\t\t\tif(getMap().getPvPType() != null)\n\t\t\t\t\t\t\tswitch(getMap().getPvPType())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase DISABLED:\n\t\t\t\t\t\t\t\t\t/* Some maps have pvp disabled */\n\t\t\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNotOther.addInt(2);\n\t\t\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNot.addInt(2);\n\t\t\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENABLED:\n\t\t\t\t\t\t\t\t\t/* This is a valid battle, start it */\n\t\t\t\t\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\totherPlayer.ensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENFORCED:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tif(canTrade() && otherPlayer.canTrade())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Set the player as talking so they can't move */\n\t\t\t\t\t\t\tm_isTalking = true;\n\t\t\t\t\t\t\t/* Create the trade */\n\t\t\t\t\t\t\tm_trade = new Trade(this, otherPlayer);\n\t\t\t\t\t\t\totherPlayer.setTrade(m_trade);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNotOther.addInt(4);\n\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNot.addInt(4);\n\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\tsendNot.addInt(0);\n\t\t\tgetSession().Send(sendNot);\n\t\t}\n\t}", "void acceptOrd(final int vId) {\r\n Orders emp = OrdersFactory.getvalidateOrders();\r\n if (emp != null) {\r\n showPlacedOrders(vId);\r\n System.out.println(\"Enter the Order ID to Accept :\");\r\n int ordid = option.nextInt();\r\n int val = OrdersFactory.acceptOrders(ordid);\r\n System.out.println(\"Succes value is :\" + val);\r\n if (val == 1) {\r\n System.out.println(\"Accepted the Order\");\r\n return;\r\n }\r\n } else {\r\n System.out.println(\"---------No Placed Orders---------\");\r\n return;\r\n }\r\n }", "public void choicePersonage() {\n\t\tSystem.out.println(\"souhaitez-vous créer un guerrier ou un magicien ?\");\n\t\tchoice = sc.nextLine().toLowerCase();\t\t\t\n\t\tSystem.out.println(\"Vous avez saisi : \" + choice);\n\t\tif(!(choice.equals(MAGICIEN) || choice.equals(GUERRIER))) {\n\t\t\tchoicePersonage();\n\t\t}\n\t\tsaisieInfoPersonage(choice);\n\t}", "void askLeaderCardThrowing();", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(EmailSender.fr.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES,\"Please Enter A Valid Email Address To Send From!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.t.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Please Enter A Valid Email Address To Send To!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(EmailSender.subj.getText().contentEquals(\"\"))\r\n\t\t{\r\n\t\t\tint b = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send this without a subject?\");\r\n\t\t\t\r\n\t\t\tif(b==0)\r\n\t\t\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tint a = JOptionPane.showConfirmDialog(EmailSender.ES, \"Are you sure you want to send?\");\r\n\t\tif(a==0)// If yes button is pressed a is 0\r\n\t\tJOptionPane.showMessageDialog(EmailSender.ES, \"Email Sent\");\r\n\t\t\r\n\t\t\r\n\t}", "public void onFriendAccepted(String meepTag, String errorMessage);", "void acceptQueAnswersClicked();", "boolean isConfirmed();", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "boolean canAcceptTrade();", "@Override\n public void accept(Boolean aBoolean) throws Exception {\n UserFilter userFilter = new UserFilter();\n userFilter.setDistance(RestaurantFilterActivity.DEFAULT_DISTANCE);\n userFilter.setOpen(false);\n userFilter.setDelivery(false);\n userFilter.setDailyMenu(false);\n getDataManager().saveUserFilter(userFilter).subscribe(new Consumer<Long>() {\n @Override\n public void accept(Long aLong) throws Exception {\n getDataManager().setActiveUserFilterId(aLong);\n // konacno otvaranje\n getMvpView().openUserRestaurantsActivity();\n }\n });\n\n }", "private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "@Override\n\tpublic void challenge12() {\n\n\t}", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tMessageTemplate cfpTemplate = MessageTemplate.MatchPerformative(ACLMessage.CFP);\n\t\t\t\tMessageTemplate informTemplate = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\n\t\t\t\tMessageTemplate messageTemplate = MessageTemplate.or(cfpTemplate, informTemplate);\n\t\t\t\tACLMessage receivedMessage = myAgent.receive(messageTemplate);\n\t\t\t\t\n\t\t\t\tif (receivedMessage != null) {\n\t\t\t\t\thasReceivedMessage = true;\n\t\t\t\t\t\n\t\t\t\t\tif (receivedMessage.getPerformative() == ACLMessage.CFP) {\n\t\t\t\t\t\tdouble price = Double.parseDouble(receivedMessage.getContent());\n\t\t\t\t\t\tSystem.out.println(\"Buyer [\" + getAID().getLocalName() + \"] received \"\n\t\t\t\t\t\t\t\t+ \"CFP with price \" + Double.toString(price));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Value in range; send proposal\n\t\t\t\t\t\tif (price <= priceToBuy) {\n\t\t\t\t\t\t\tACLMessage proposal = new ACLMessage(ACLMessage.PROPOSE);\n\t\t\t\t\t\t\tproposal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\tproposal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(proposal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = sendProposal;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Price too high; refuse and wait for new CFP\n\t\t\t\t\t\t\tACLMessage refusal = new ACLMessage(ACLMessage.REFUSE);\n\t\t\t\t\t\t\trefusal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\trefusal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(refusal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = highPrice;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (receivedMessage.getPerformative() == ACLMessage.INFORM) {\n\t\t\t\t\t\ttransitionStatus = noBuyers;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "private TransferPointRequest checkTransferRequestEligibility(TransferPointRequest transferPointRequest) {\n Customer fromAccount = transferPointRequest.getFromCustomer();\n\n //get destination account\n Customer toAccount = transferPointRequest.getToCustomer();\n\n //check if account is linked\n transferPointRequest = isAccountLinked(transferPointRequest);\n\n //set request customer no as from account customer no\n transferPointRequest.setRequestorCustomerNo(fromAccount.getCusCustomerNo());\n\n //if accounts are not linked , requestor is eligible for transfer\n if(!transferPointRequest.isAccountLinked()){\n\n //set transfer eligibility to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n } else {\n\n //if linked , get the transfer point settings\n TransferPointSetting transferPointSetting = transferPointRequest.getTransferPointSetting();\n\n //check redemption settings\n switch(transferPointSetting.getTpsLinkedEligibilty()){\n\n case TransferPointSettingLinkedEligibity.NO_AUTHORIZATION:\n\n //if authorization is not needed set eligibity to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.PRIMARY_ONLY:\n\n //check the requestor is primary\n if(!transferPointRequest.isCustomerPrimary()){\n\n //if not primary , then set eligibility to INELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.INELIGIBLE);\n\n } else {\n\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.SECONDARY_WITH_AUTHORIZATION:\n\n //if customer is secondary , set eligibility to APRROVAL_NEEDED and set approver\n //and requestor customer no's\n if(!transferPointRequest.isCustomerPrimary()){\n\n //set eligibility status as approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n } else {\n\n //set eligibility to eligible\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.ANY_ACCOUNT_WITH_AUTHORIZATION:\n\n //set eligibility to approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n if(transferPointRequest.isCustomerPrimary()){\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getChildCustomerNo());\n\n } else {\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n }\n\n return transferPointRequest;\n\n }\n }\n\n return transferPointRequest;\n\n }", "@Override\n public void acceptIntraUser(String identityPublicKey, String intraUserToAddName, String intraUserToAddPublicKey, byte[] profileImage) throws CantAcceptRequestException {\n try {\n /**\n *Call Actor Intra User to accept request connection\n */\n this.intraWalletUserManager.acceptIntraWalletUser(identityPublicKey, intraUserToAddPublicKey);\n\n /**\n *Call Network Service Intra User to accept request connection\n */\n this.intraUserNertwokServiceManager.acceptIntraUser(identityPublicKey, intraUserToAddPublicKey);\n\n } catch (CantAcceptIntraWalletUserException e) {\n throw new CantAcceptRequestException(\"CAN'T ACCEPT INTRA USER CONNECTION - KEY \" + intraUserToAddPublicKey, e, \"\", \"\");\n } catch (Exception e) {\n throw new CantAcceptRequestException(\"CAN'T ACCEPT INTRA USER CONNECTION - KEY \" + intraUserToAddPublicKey, FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\tif (verifier()){\r\n\t\t\tvue.ajouterJoueur();\r\n\t\t\tJOptionPane.showMessageDialog(vue,\"Joueur ajouté !\");\r\n\t\t}\r\n\r\n\t}", "public void accept()\n { ua.accept();\n changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n printOut(\"press 'enter' to hangup\"); \n }", "@Override public void clientAcceptIncomingGame(Rental rental)\r\n throws RemoteException, SQLException {\r\n gameListClientModel.clientAcceptIncomingGame(rental);\r\n }", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "private boolean askForSuperviser(Person p) throws Exception {\n\n\t\treturn p.isResearcher() && (p.getInstitutionalRoleId() > 1);\n\t}", "public String getAccept() {\n return accept;\n }", "public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\tpublic void action() {\n MessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.ACCEPT_PROPOSAL);\r\n MessageTemplate mt2 = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\r\n ACLMessage msg = myAgent.receive(mt);\r\n //If it is a ACCEPT_PROPOSAL, the seller sell the book to the buyer (execpt if the book if not here anymore)\r\n if (msg != null) {\r\n // ACCEPT_PROPOSAL Message received. Process it\r\n title = msg.getContent();\r\n ACLMessage reply = msg.createReply();\r\n\r\n Integer price = (Integer) catalogue.remove(title);\r\n if (price != null) {\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(String.valueOf(price));\r\n System.out.println(title+\" sold to agent \"+msg.getSender().getName());\r\n }\r\n else {\r\n // The requested book has been sold to another buyer in the meanwhile .\r\n reply.setPerformative(ACLMessage.FAILURE);\r\n reply.setContent(\"not-available\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n //If it is a new PROPOSE, the buyer is trying to negociate.\r\n else {\r\n ACLMessage msg2 = myAgent.receive(mt2);\r\n if(msg2 != null){\r\n ACLMessage reply = msg2.createReply();\r\n //If the price of the buyer is OK for the seller according to his tolerance, the transaction is made\r\n if(((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) <= tolerance){\r\n System.out.println(myAgent.getLocalName() + \" say : OK, let's make a deal\");\r\n updateCatalogue(title, Integer.parseInt(msg2.getContent()));\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(msg2.getContent());\r\n }\r\n //Else, the seller accept to negociate, he up his tolerance and ask the buyer to up his real price\r\n else{\r\n //Send a REQUEST Message to negociate with the buyer\r\n reply.setPerformative(ACLMessage.REQUEST);\r\n //Up the tolerance by *change*\r\n tolerance += change;\r\n reply.setContent(String.valueOf(change));\r\n System.out.println(myAgent.getLocalName() + \" say : Let's up your real price while I up my tolerance (\" + ((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) + \" < \" + tolerance + \")\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n else{\r\n block();\r\n }\r\n }\r\n\t\t}", "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\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}", "@Override\n public void askIntraUserForAcceptance(String intraUserToAddName, String intraUserToAddPhrase, String intraUserToAddPublicKey, byte[] OthersProfileImage,byte[] MyProfileImage, String identityPublicKey, String identityAlias) throws CantStartRequestException {\n\n try {\n\n /**\n *Call Network Service Intra User to add request connection\n */\n\n if ( this.intraWalletUserManager.getIntraUsersConnectionStatus(intraUserToAddPublicKey)!= ConnectionState.CONNECTED){\n System.out.println(\"The User you are trying to connect with is not connected\" +\n \"so we send the message to the intraUserNetworkService\");\n this.intraUserNertwokServiceManager.askIntraUserForAcceptance(identityPublicKey, identityAlias, Actors.INTRA_USER, intraUserToAddName,intraUserToAddPhrase, intraUserToAddPublicKey, Actors.INTRA_USER, MyProfileImage);\n }else{\n this.intraUserNertwokServiceManager.acceptIntraUser(identityPublicKey, intraUserToAddPublicKey);\n System.out.println(\"The user is connected\");\n }\n\n /**\n *Call Actor Intra User to add request connection\n */\n this.intraWalletUserManager.askIntraWalletUserForAcceptance(identityPublicKey, intraUserToAddName, intraUserToAddPhrase, intraUserToAddPublicKey, OthersProfileImage);\n\n\n } catch (CantCreateIntraWalletUserException e) {\n throw new CantStartRequestException(\"\", e, \"\", \"\");\n } catch (RequestAlreadySendException e) {\n throw new CantStartRequestException(\"\", e, \"\", \"Intra user request already send\");\n } catch (Exception e) {\n throw new CantStartRequestException(\"CAN'T ASK INTRA USER CONNECTION\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "static void portal_denied() {\n System.out.println(\"Ok...let's turn left and go to the living room\");\n enter = next.nextLine();\n System.out.println(\"Wait!\");\n enter = next.nextLine();\n System.out.println(\"What is that noice?\");\n enter = next.nextLine();\n System.out.println(\"Creak...Creak...Creak...\");\n System.out.println(username + \" sees a thousand of creatures surrounding the living room.\");\n System.out.println(\"I don't think it is a very good idea to take them on at once. They might look small,\");\n System.out.println(\"but are extremely ferocious...I suggest you turn back\");\n enter = next.nextLine();\n System.out.println( username + \" returns to the portals\");\n enter = next.nextLine();\n portal_introduction(); //this will take the player back to the portals that the player first had a choice to decide\n //whether or not he/she wanted to open the massive gate\n }", "public boolean accepted() {\r\n\r\n return m_bAccepted;\r\n\r\n }", "public boolean getAccepted()\n {\n return accepted;\n }", "@Test\n public void acceptedAnswerGivesAnswererReputationPoints() throws Exception {\n\n alice.acceptAnswer(bobAnswer);\n\n assertEquals(\"Answer's reputation doesn't goes up by 15\",15,bob.getReputation());\n }", "@Override\r\n public boolean accept() {\n return canEat();\r\n }", "public void handleAccept(ActionEvent event) {\r\n try{\r\n if(fieldsAreFilled()){\r\n try{\r\n townHallImpl.townHallAlreadyExists(txtFName.getText().trim());\r\n } catch (ReadException ex) {\r\n LOGGER.info(\"The townhall doesn´t exist.\");\r\n if(checkEmail(txtFEmail.getText().trim())){\r\n if(checkTlf(txtFPhone.getText().trim())){\r\n if(edit){\r\n th.setLocality(txtFName.getText().trim());\r\n th.setEmail(txtFEmail.getText().trim());\r\n th.setTelephoneNumber(txtFPhone.getText().trim());\r\n townHallImpl.editTownHall(th);\r\n stage.close();\r\n }else{\r\n th = new TownHallBean(txtFName.getText().trim(), txtFEmail.getText().trim(), txtFPhone.getText().trim());\r\n townHallImpl.createTownHall(th);\r\n stage.close();\r\n }\r\n }else{\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION, \"The telephone must have the format: 123456789\", ButtonType.OK);\r\n alert.showAndWait();\r\n }\r\n }else{\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION, \"The email must have the format: email@email.example\", ButtonType.OK);\r\n alert.showAndWait();\r\n }\r\n }\r\n }else{\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION, \"All the fields must have information\", ButtonType.OK);\r\n alert.showAndWait();\r\n }\r\n }catch (CreateException ex) {\r\n LOGGER.log(Level.SEVERE, \"Error creating a townhall\");\r\n }catch (UpdateException ex) {\r\n LOGGER.log(Level.SEVERE, \"Error updating a townhall\");\r\n }\r\n }", "private void jbuttonAddGuestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbuttonAddGuestActionPerformed\n String fnGuest = JTextFirstNameGuest.getText().toLowerCase();\n String lnGuest = JTextLastNameGuest.getText().toLowerCase();\n String emGuest = JTextEmailGuest.getText().toLowerCase(); //??\n boolean succes = false;\n int phoneNr = 0;\n \n try{\n phoneNr = Integer.parseInt(JTextPhoneGuest.getText());\n }\n catch(java.lang.NullPointerException ex){\n jLabelAddGuestStatus.setText(\"Missing phone number\");\n }\n if(fnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Firstname\");\n }\n if(lnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Lastname\");\n }\n if(emGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Email\");\n }\n \n if(!fnGuest.isEmpty() && !lnGuest.isEmpty() && phoneNr != 0 ){\n try{ \n succes = conIf.addGuestEmail(fnGuest, lnGuest, phoneNr, emGuest); //emguest? \n }catch(Exception ex){\n succes = false;\n }\n }\n if(succes == true){\n JTextFirstNameGuest.setText(\"\");\n JTextLastNameGuest.setText(\"\");\n JTextPhoneGuest.setText(\"\");\n JTextEmailGuest.setText(\"\");\n \n int reply = JOptionPane.showConfirmDialog(\n fr1,\n \"Would you like to add another guest?\",\n \"Guest added successfully\",\n JOptionPane.YES_NO_OPTION);\n \n if(reply == JOptionPane.NO_OPTION){\n fr1.setVisible(true);\n this.setVisible(false);\n }\n \n \n \n }else{\n jLabelAddGuestStatus.setText(\"guest not added\");\n }\n }", "@Override\n public void onPromptAndCollectUserInformationResponse(PromptAndCollectUserInformationResponse arg0) {\n\n }" ]
[ "0.685006", "0.6671823", "0.64947164", "0.6427112", "0.6395623", "0.6271134", "0.6244141", "0.6202769", "0.6135432", "0.61338556", "0.61086667", "0.6099969", "0.60947454", "0.60941976", "0.6086282", "0.60535324", "0.6044171", "0.6015337", "0.6010158", "0.5993809", "0.5965111", "0.5960358", "0.59535104", "0.58679706", "0.58587134", "0.5812417", "0.5802927", "0.5786372", "0.5782793", "0.578249", "0.5766062", "0.5731669", "0.57304573", "0.5728486", "0.5708372", "0.57042074", "0.56949437", "0.5693035", "0.56771064", "0.5665867", "0.5651307", "0.5650185", "0.5647765", "0.5645895", "0.5639515", "0.5637667", "0.5636748", "0.5634509", "0.5607408", "0.5598614", "0.5592299", "0.5585542", "0.5575295", "0.5574923", "0.55731744", "0.5571799", "0.5570924", "0.55698556", "0.5564248", "0.55553585", "0.55483955", "0.5547828", "0.5542891", "0.5536864", "0.55347663", "0.55332524", "0.5530162", "0.55176115", "0.55151683", "0.5513909", "0.5509071", "0.5507728", "0.5507443", "0.5506201", "0.55045927", "0.5497268", "0.54962957", "0.5495309", "0.54897887", "0.5480268", "0.54794216", "0.5475271", "0.5467669", "0.5467158", "0.54588336", "0.54583716", "0.54530585", "0.5452354", "0.5450238", "0.5445386", "0.54355097", "0.54282105", "0.5418599", "0.5418496", "0.54061866", "0.540524", "0.5404074", "0.5401716", "0.5401373", "0.5399647", "0.5389502" ]
0.0
-1
Inflating the menu bar on the current screen.
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_screen_list_student, menu);\n\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.nav_layout, menu);\n return true;\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_bar, menu);\n return true;\n\n }", "protected void fillMenuBar(IMenuManager menuBar){\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tmenuBar.add(createFileMenu(window));\n\t\tmenuBar.add(createEditMenu());\n\t\tmenuBar.add(ToolsBoxFonctions.createToolBoxMenu(window));\n\t\tmenuBar.add(createHelpMenu(window));\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.vendor_newlead_bar, menu);\n return true;\n }", "private void loadHomeclass(){\n // selecting appropriate nav menu item\n selectNavMenu();\n\n // set toolbar title\n setToolbarTitle();\n\n // if user select the current navigation menu again, don't do anything\n // just close the navigation drawer\n if (getClass().getSimpleName()==CURRENT_TAG) {\n\n drawerLayout.closeDrawers();\n\n return;\n }\n\n\n //Closing drawer on item click\n drawerLayout.closeDrawers();\n\n // refresh toolbar menu\n invalidateOptionsMenu();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu2, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t//a partir de aqui comenzar a llamar a los layouts \t\t\n\t\tcurrent_location();\n\t\t\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_menu, container, false);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.babysitter_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_status_screen, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home_screen, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }", "private void createCurrentMenu(RelativeLayout layout, String xmlFileName){\n \t\tMenuActions menu = null;\n \t\ttry {\n \t\t\tmenu = ParseUtils.parseMenuData(this, xmlFileName);\n \t\t\tList<MenuActionDataItem> listActions = menu.getList();\n \t\t\t\n \t\t\tif(listActions == null || listActions.isEmpty())\n \t\t\t\treturn;\n \t\t\t\n \t\t\tfor(int i=0; i < listActions.size(); i++){\n \t\t\t\tfinal MenuActionDataItem action = listActions.get(i);\n \t\t\t\t\t\n \t\t\t\tif( this.isEntryPoint == false || (\n \t\t\t\t\t\t(this.isEntryPoint == true & ( !action.getSystemAction().equals(\"home\") && \n \t\t\t\t\t\t!action.getSystemAction().equals(\"back\") ) ) ) ){\n \t\t\t\t\t\n \t\t\t\t\tfinal ImageButton btnAction = new ImageButton(this);\t\t\n \n \t\t\t\t\t//String resource = action.getImageName().split(\"\\\\.\")[0];\n \t\t\t\t\t//btnAction.setImageResource(getResources().getIdentifier(resource, \"drawable\", getPackageName()));\n \t\t\t\t\tDrawable imageButton = null;\n \t\t\t\t\ttry {\n \t\t\t\t\t\timageButton = ImagesUtils.getDrawable(activity, action.getImageName());\n \t\t\t\t\t\tbtnAction.setImageDrawable(imageButton);\n \t\t\t\t\t} catch (InvalidFileException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t//Ancho y alto del boton\n\t\t\t\t\tRelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(/*action.getWidthButton()*/LayoutParams.WRAP_CONTENT, /*action.getHeightButton()*/LayoutParams.WRAP_CONTENT);\n \t\t\t\t\tOnClickListener cl;\n \t\t\t\t\tif(action.getSystemAction().equals(\"sideMenu\")){\n \t\t\t\t\t\tlp.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);\n \t\t\t\t\t\t\n \t\t\t\t\t\t//Margen izquierdo\n \t\t\t\t\t\tlp.setMargins(action.getLeftMargin(), 10, 0, 10);\n \t\t\t\t\t\t\n \t\t\t this.sideMenuLayout = (LinearLayout) findViewById(R.id.sideMenuLayout);\n \t\t\t this.appLayout = (RelativeLayout) findViewById(R.id.backgroundLayout);\n \t\t\t\t\t\t\n \t\t\t\t\t\tcl= new ClickListener();\n \t\t\t\t\t}else{\t\n \t\t\t\t\t\tlp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);\n \t\t\t\t\t\t\n \t\t\t\t\t\t//Margen derecho\n \t\t\t\t\t\tint realMargin;\n \t\t\t\t\t\tif (imageButton!=null){\n \t\t\t\t\t\t\tint width = imageButton.getIntrinsicWidth();\n \t\t\t\t\t\t\trealMargin= width * i + action.getLeftMargin()*(i+1);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\trealMargin= action.getWidthButton()*i + action.getLeftMargin()*(i+1);\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n\t\t\t\t\t\tlp.setMargins(0, 10, realMargin, 10);\n \t\t\t\t\t\n \t\t\t\t\t\tcl= new View.OnClickListener() {\n \t\t\t\t\t public void onClick(View view) {\n \t\t\t\t\t \toptionSelected(action);\n \t\t\t\t\t }\n \t\t\t\t };\n \t\t\t\t\t}\n \n \t\t\t\t\tbtnAction.setLayoutParams(lp);\n \t\t\t\t\t\n \t\t\t\t\t//Añade la nueva opcion al menu\n \t\t\t\t\tlayout.addView(btnAction);\n \t\t\t\t\tbtnAction.setOnClickListener(cl);\n \t\t\t\t\t\n \t\t\t\t\ti++;\n \t\t\t\t}//End if\n \t\t\t}//End While\n \t\t} catch (InvalidFileException e) {\n \t\t\tLog.e(\"createCurrentMenu\", e.getMessage());\n \t\t}\t\t\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_top_screen, menu);\n return true;\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\ngetMenuInflater().inflate(R.menu.main, menu);\nreturn true;\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main_screen, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.popmovies_menu, menu);\n\n }", "private void MenuHOOKS() {\n drawerLayout = findViewById(R.id.drawer_layout);\n navigationView = findViewById(R.id.navigation_view);\n burger_icon = findViewById(R.id.burger_icon);\n contentView = findViewById(R.id.content);\n\n //Navigation Drawer\n navigationView.bringToFront();\n navigationView.setNavigationItemSelectedListener(this);\n navigationView.setCheckedItem(R.id.nav_home);\n\n burger_icon.setOnClickListener(this);\n\n //Animation Function\n animateNavigationDrawer();\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "private void loadAppBar()\n\t{\n\t\tLayoutInflater inflator=(LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflator.inflate(R.layout.search_page_header, null);\n\t\t\t\n\t\tActionBar mActionBar = getActionBar();\n\t\tmActionBar.setDisplayShowHomeEnabled(false);\n\t\tmActionBar.setDisplayShowTitleEnabled(false);\n\t\tmActionBar.setDisplayUseLogoEnabled(false);\n\t\tmActionBar.setDisplayShowCustomEnabled(true);\n\t\tmActionBar.setCustomView(v);\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n\t\t\ttry{\n\t\t\t\tToolbar parent = (Toolbar) v.getParent(); \n\t\t\t\tparent.setContentInsetsAbsolute(0, 0);\n\t\t\t} catch(ClassCastException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\t\n\t\tImageView menuBtn \t= (ImageView) v.findViewById(R.id.iv_menu_btn);\n\t\tImageView ivLogo\t\t= (ImageView) v.findViewById(R.id.iv_logo);\n\t\tImageButton ibHome = (ImageButton) v.findViewById(R.id.ib_home);\n\t\t\n\t\tibHome.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tivLogo.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t\n\t\tmenuBtn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t});\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n return true;\n }", "public void switchToMenuScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"menu\");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.tool_bar, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n return true;\n\n}", "public void menu(){\n super.goToMenuScreen();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.robot_welcom_activity_nav, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.homescreen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_homescreen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.home_screen, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home_screen, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_manager_screen, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_splash__screen, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home_screen_view, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_app_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.start_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_screen_drawer, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.screen1, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n getMenuInflater().inflate(R.menu.app_bar_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }", "public void mo21810a(Menu menu, MenuInflater menuInflater) {\n }", "@Override\r\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.fragment_profile, menu);\r\n\t\tcurrentMenu = menu;\r\n\t\tcurrentMenu.getItem(0).setVisible(true);\r\n\t\tcurrentMenu.getItem(1).setVisible(false);\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.childloco_menu, menu);\n //getMenuInflater().inflate(R.menu.childloco_menu, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\r\n\t\tMenuInflater inflate = getMenuInflater();\r\n\t\tinflate.inflate(R.menu.mymenu4, menu);\r\n\t\treturn true;\r\n\t}", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.menu_detail_, menu);\n }", "public Menu createViewMenu();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.base, menu);\n this.mCustomMenu = menu;\n if (mTypeLayout) {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_grid_on_white);\n } else {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_list_white);\n }\n return true;\n }", "@Override\r\n protected void onScreenActivate() {\n if (Forge.isLandscapeMode() && displaySidebarForLandscapeMode()) {\r\n menu.hide();\r\n menu.show(getLeft(), 0, getWidth(), getHeight());\r\n }\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.landing_main, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n // Get the menu inflater.\n MenuInflater inflater = getMenuInflater();\n\n // Inflate own menu resource.\n inflater.inflate(R.menu.about_menu, menu);\n\n // Get the navigation bar toggle MenuItem.\n hideShowBtn = menu.findItem(R.id.toggleNavBar);\n\n return true;\n }" ]
[ "0.64157987", "0.63605523", "0.6323775", "0.625456", "0.6210662", "0.620332", "0.6194989", "0.619205", "0.61890256", "0.6185488", "0.61850035", "0.61621827", "0.61508995", "0.61461", "0.61129713", "0.61120194", "0.6109314", "0.610911", "0.6107132", "0.61026275", "0.6097598", "0.6071768", "0.607154", "0.606429", "0.6060183", "0.6055541", "0.60545105", "0.60533327", "0.60525894", "0.60482574", "0.6046579", "0.6039198", "0.6034578", "0.60338455", "0.6023654", "0.6022925", "0.60216445", "0.60216445", "0.60185486", "0.60171014", "0.6014893", "0.60140216", "0.6012395", "0.6004544", "0.60024315", "0.6000389", "0.5999285", "0.59949315", "0.59877133", "0.5987709", "0.59828144", "0.59823847", "0.5981713", "0.5980623", "0.5976665", "0.5974697", "0.59740156", "0.59718823", "0.5970822", "0.5970822", "0.59702116", "0.5963989", "0.595525", "0.59546167", "0.5954238", "0.5954238", "0.5954238", "0.5948651", "0.59484917", "0.59484917", "0.59473157", "0.59431505", "0.59430665", "0.59429824", "0.59429485", "0.5940482", "0.5939701", "0.5939701", "0.5939701", "0.5939701", "0.59374535", "0.5931969", "0.5927857", "0.5923897", "0.59219855", "0.5920284", "0.59139204", "0.59104013", "0.5909873", "0.5909635", "0.59070665", "0.5906476", "0.5906444", "0.5900423", "0.58956546", "0.58954847", "0.58910877", "0.5891082", "0.5884539", "0.5881271", "0.5880674" ]
0.0
-1
Creating appropriate intents for the menu items.
@Override public boolean onOptionsItemSelected(MenuItem item) { // Handling item selection switch (item.getItemId()) { case R.id.action_home: Intent intent = new Intent(this, MainActivity.class); startActivity(intent); return true; case R.id.action_birds: intent = new Intent(this, Birds.class); startActivity(intent); return true; case R.id.action_storm: intent = new Intent(this, Storm.class); startActivity(intent); return true; case R.id.action_nocturnal: intent = new Intent(this, Nocturnal.class); startActivity(intent); return true; case R.id.action_library: intent = new Intent(this, Mylibrary.class); startActivity(intent); return true; case R.id.action_now_playing: intent = new Intent(this, Nowplaying.class); startActivity(intent); return true; case R.id.action_download: intent = new Intent(this, Download.class); startActivity(intent); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tIntent intentUpdater = new Intent(this, UpdaterService.class); //activity is a subclass of \"context\" hence the 'this' keyword. //its an explicit intent. \n\t\t\tIntent intentRefresh = new Intent(this, RefreshService.class); //activity is a subclass of \"context\" hence the 'this' keyword. //its an explicit intent.\n\t\t\tIntent intentPrefs = new Intent(this, PrefsActivity.class); //activity is a subclass of \"context\" hence the 'this' keyword. //its an explicit intent.\n\t\t\tIntent intentTimeLine = new Intent(this, TimeLineActivity.class); //activity is a subclass of \"context\" hence the 'this' keyword. //its an explicit intent.\n\t\t\t\n\t\t\tswitch(item.getItemId())\n\t\t\t{\n\t\tcase R.id.item_start_service: \n\t\t\tLog.d(\"StatusActivity\", \"Entered case: item_start_service\");\n\t\t\tstartService(intentUpdater);\n\t\t\t\n\t\t\treturn true;\n\t\tcase R.id.item_stop_service:\n\t\t\tLog.d(\"StatusActivity\", \"Entered case: item_stop_service\");\n\t\t\tstopService(intentUpdater);\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.item_prefs:\n\t\t\tLog.d(\"StatusActivity\", \"Entered case: item_prefs\");\n\t\t\tstartActivity(new Intent (this, PrefsActivity.class)); //could do it the normal way, but this shows another way to use the intents \n\t\t\t//startActivity(intentPrefs);\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.item_refresh_service:\n\t\t\tLog.d(\"StatusActivity\", \"Entered case: item_refresh_service\");\n\t\t\tstartService(intentRefresh);\n\t\t\treturn true; \n\t\t\t\n\t\tcase R.id.item_status_update:\n\t\t\tLog.d(\"StatusActivity\",\"Enetered case: item_timeline_activity\");\n\t\t\tstartActivity(intentTimeLine);\n\t\treturn true;\n\t\tdefault: \n\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}", "public boolean onMenuItemClick(MenuItem item) {\n\n Intent i = new Intent(HotelMerchantActivity.this, WebActivity.class);\n if (item.getTitle().toString().equalsIgnoreCase(\"FAQs\")) {\n\n i.putExtra(\"option\", \"FAQ\");\n startActivity(i);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"My Account\")) {\n\n Intent intent = new Intent(getApplicationContext(), MyAcount.class);\n startActivity(intent);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Offers\")) {\n\n Intent intent = new Intent(getApplicationContext(), OffersActivity.class);\n intent.putExtra(\"url\", getResources().getString(R.string.offers));\n startActivity(intent);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Privacy Policy\")) {\n\n i.putExtra(\"option\", \"PRIVACY\");\n startActivity(i);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Terms & Conditions\")) {\n i.putExtra(\"option\", \"TNC\");\n startActivity(i);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"About Us\")) {\n\n i.putExtra(\"option\", \"ABOUT\");\n startActivity(i);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Contact Us\")) {\n\n i.putExtra(\"option\", \"CONTACT\");\n startActivity(i);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Recharge & Pay\")) {\n Intent intent = new Intent(getApplicationContext(), Electricity_Payment.class);\n startActivity(intent);\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Quick Transfer\")) {\n// Intent intent = new Intent(getApplicationContext(), QuickTransferActivity.class);\n// startActivity(intent);\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Request Money\")) {\n Intent intent = new Intent(getApplicationContext(), RequestMoneyActivity.class);\n startActivity(intent);\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Money Transfer\")) {\n Intent intent = new Intent(getApplicationContext(), MoneyTransferActivity.class);\n intent.putExtra(\"index\", \"0\");\n startActivity(intent);\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Manage Beneficiary\")) {\n Intent intent = new Intent(getApplicationContext(), MoneyTransferActivity.class);\n intent.putExtra(\"index\", \"3\");\n startActivity(intent);\n\n } else if (item.getTitle().toString().equalsIgnoreCase(\"My Account\")) {\n Intent intent = new Intent(getApplicationContext(), MyAcount.class);\n startActivity(intent);\n } else if (item.getTitle().toString().equalsIgnoreCase(\"Load Wallet\")) {\n Intent intent = new Intent(getApplicationContext(), LoadMoneyActivity.class);\n startActivity(intent);\n }\n\n\n return true;\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) \n\t{\n\t\tswitch(position)\n\t\t{\n\t\tcase 0:ActivityStarter(\"rahulapps.apihelp.Bluetooth.BluetoothMenu\");break;\n\t\tcase 1:ActivityStarter(\"rahulapps.apihelp.Wifi.WifiMenu\");break;\n\t\tcase 2:ActivityStarter(\"rahulapps.apihelp.Sensor.SensorMenu\");break;\n\t\tcase 3:ActivityStarter(\"rahulapps.apihelp.SplashActivity.SplashMenu\");break;\n\t\tcase 4:ActivityStarter(\"rahulapps.apihelp.Menus.MenuActivityMenu\");break;\n\t\tcase 5:ActivityStarter(\"rahulapps.apihelp.Speech.SpeechRecognitionMenu\");break;\n\t\tcase 6:ActivityStarter(\"rahulapps.apihelp.Graphs.GraphMenu\");break;\n\t\tcase 7:ActivityStarter(\"rahulapps.apihelp.Notifications.NotificationMenu\");break;\n\t\tcase 8:ActivityStarter(\"rahulapps.apihelp.FileIO.FileIOMenu\");break;\n\t\tcase 9:ActivityStarter(\"rahulapps.apihelp.Email.EmailMenu\");break;\n\t\tcase 10:ActivityStarter(\"rahulapps.apihelp.Camera.CameraMenu\");break;\n\t\t}\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String Selecteditem = itemname[+position];\n if(Selecteditem.equals(\"Usage Monitor\")){\n Intent appInfo = new Intent(AP_Menu.this, ActivityMain.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Data Sniffer\")){\n Intent appInfo = new Intent(AP_Menu.this, ApplicationListDataSniff.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Log Manager\")){\n Intent appInfo = new Intent(AP_Menu.this, CallLogger.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Task Manager\")){\n Intent appInfo = new Intent(AP_Menu.this, AndroidTaskManager.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Version Updates\")){\n Intent appInfo = new Intent(AP_Menu.this, ApkListActivity.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Frames Calculation\")){\n Intent appInfo = new Intent(AP_Menu.this, MaxFPSActivity.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Battery Radar\")){\n Intent appInfo = new Intent(AP_Menu.this, BatteryTop.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"App Advisor\")){\n Intent appInfo = new Intent(AP_Menu.this, PowerManagerActivity.class);\n startActivity(appInfo);\n }\n\n }", "@Override\n public void onItemClick(View view, Item obj, int position) {\n switch(obj.getName().toString()){\n\n case \"Get Started\":\n Intent intent1 = new Intent(getActivity().getBaseContext(), TutorialGettingStarted.class);\n getActivity().startActivity(intent1);\n break;\n case \"C Hello World\":\n Intent intent2 = new Intent(getActivity().getBaseContext(), TutorialHelloWorld.class);\n getActivity().startActivity(intent2);\n break;\n case \"The a+b Problem\":\n Intent intent3 = new Intent(getActivity().getBaseContext(), TutorialAPlusBProblem.class);\n getActivity().startActivity(intent3);\n break;\n case \"Integers Sorting\":\n Intent intent4 = new Intent(getActivity().getBaseContext(), TutorialIntegersSorting.class);\n getActivity().startActivity(intent4);\n break;\n case \"Pointers in C\":\n Intent intent5 = new Intent(getActivity().getBaseContext(), TutorialPointers.class);\n getActivity().startActivity(intent5);\n break;\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent i;\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.menu_add_feed:\n\t\t\ti = new Intent(this, CreateContent.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n//\t\tcase R.id.menu_dummy:\n//\t\t\ti = new Intent(this, Dummy.class);\n//\t\t\tstartActivity(i);\n//\t\t\tbreak;\n\t\tcase R.id.menu_circles:\n\t\t\ti = new Intent(this, UserCircles.class);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_users:\n\t\t\ti = new Intent(this, UserList.class);\n\t\t\ti.putExtra(\"url\", \"http://rasp.jatinhariani.com/final/random_users.php\");\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\tcase R.id.menu_logout:\n\t\t\ti = new Intent(this, Login.class);\n\t\t\tstartActivity(i);\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}", "public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}", "@Override\n\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\tint id = item.getItemId();\n\t\t\t\t\tIntent i;\n\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\tcase R.id.menu_add_new_list:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(getBaseContext(), MyMap.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_dashboard:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(MyMap.this, dashboard_main.class);\n\t\t\t\t\t\t\ti.putExtra(\"edit\", \"12344\");\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_login:\n\t\t\t\t\t\tif (bedMenuItem.getTitle().equals(\"Logout\")) {\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = getSharedPreferences(\"user\", MODE_PRIVATE).edit();\n\t\t\t\t\t\t\teditor.clear();\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\tbedMenuItem.setTitle(\"Login/Register\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent i_user = new Intent(getBaseContext(), user_login.class);\n\t\t\t\t\t\t\tstartActivity(i_user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { // Add Items to menu\n if (v.getId() == R.id.listView) {\n String[] menuItems = getResources().getStringArray(R.array.menu);\n for (int i = 0; i < menuItems.length; i++) {\n menu.add(Menu.NONE, i, i, menuItems[i]);\n }\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_recipe_detail, menu);\n\n MenuItem item = menu.findItem(R.id.menu_share);\n ShareActionProvider miShare = (ShareActionProvider) MenuItemCompat.getActionProvider(item);\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (entryPoint != null) {\n switch (entryPoint.getStringExtra(SOURCE)) {\n case MainActivity.ACTIVITY_NAME:\n getMenuInflater().inflate(R.menu.save_edit_profile, menu);\n break;\n case LoginActivity.ACTIVITY_NAME:\n getMenuInflater().inflate(R.menu.register, menu);\n break;\n }\n\n }\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tIntent intent;\r\n\t switch (item.getItemId()) {\r\n\t case R.id.listaCursosItem:\r\n\t \tintent = new Intent(this, ListarCursos.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.verNotasItem:\r\n\t \tintent=new Intent(this,VerNotas.class);\r\n\t \tstartActivity(intent);\r\n\t return true;\r\n\t case R.id.administrarCuentaItem:\r\n\t \tintent=new Intent(this,AdministrarCuenta.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t case R.id.cerrarSesionItem:\r\n\t \tintent=new Intent(this,Login.class);\r\n\t \tstartActivity(intent);\r\n\t \treturn true;\r\n\t default:\r\n\t return super.onOptionsItemSelected(item);\r\n\t }\r\n\t}", "protected void createMenus(Activity activity, boolean isEntryPoint){\n \t\t\n \t\t//myTts = new TextToSpeechBeta(this, ttsInitListener);\n \t\t\n \t\tthis.isEntryPoint = isEntryPoint;\n \t\tthis.activity = activity;\n \t\t\n \t\tApplicationData applicationData = SplashActivity.getApplicationData();\n \t\tActiveMenus activeMenus = applicationData.getMenu();\n \t\t\n \t\t//TOP MENU\n \t\tif(activeMenus.getTopMenu() != null){\n \t\t\tRelativeLayout topLayout = (RelativeLayout) findViewById(R.id.topLayout);\n \t\t\tcreateCurrentMenu(topLayout, activeMenus.getTopMenu());\n \t\t}\n \t\t\n \t\t//BOTTOM MENU\n \t\tRelativeLayout bottomLayout = (RelativeLayout) findViewById(R.id.bottomLayout);\t\n \t\tif(activeMenus.getBottomMenu() != null){\n \t\t\tcreateCurrentMenu(bottomLayout, activeMenus.getBottomMenu());\n \t\t}else{\n \t\t\tbottomLayout.setVisibility(0);\n \t\t}\n \t\t\n \t\t//CONTEXT MENU\n \t\tif(activeMenus.getContextMenu() != null){\n \t\t\tthis.contextMenuXmlFileName = activeMenus.getContextMenu();\n \t\t}\n \t\t\n \t\t//SIDE MENU\n \t\tif(activeMenus.getSideMenu() != null){\n \t\t\tinitializeSideMenuList(activeMenus.getSideMenu());\n \t\t}\n \t}", "protected void registerExtendMenuItem(){\n for(int i = 0; i < itemStrings.length; i++){\n inputMenu.registerExtendMenuItem(itemStrings[i], itemdrawables[i], itemIds[i], extendMenuItemClickListener);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n Intent intent;\n switch(id) {\n case R.id.recipes:\n intent = new Intent(ViewIngredientsActivity.this, MainActivity.class);\n startActivity(intent);\n break;\n case R.id.modify_ingredients:\n intent = new Intent(ViewIngredientsActivity.this, ModifyIngredientsActivity.class);\n startActivity(intent);\n break;\n case R.id.favorited_recipes:\n intent = new Intent(ViewIngredientsActivity.this, FavoriteRecipeListActivity.class);\n startActivity(intent);\n break;\n default:\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ex_002_manu_main, menu);\n\n MenuItem shareItem = menu.findItem(R.id.share);\n /** Getting the actionprovider associated with the menu ex_005_item whose id is share */\n mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n Log.d(\"data\", data + \" Options menu\");\n\n Intent intent = getDefaultShareIntent();\n /** Setting a share intent */\n mShareActionProvider.setShareIntent(intent);\n\n return super.onCreateOptionsMenu(menu);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent intent;\n switch (item.getItemId()) {\n case R.id.item_home:\n return true;\n case R.id.item_fridge:\n intent = new Intent(HomeActivity.this, FridgeActivity.class);\n startActivity(intent);\n return true;\n case R.id.item_book:\n intent = new Intent(HomeActivity.this, RecipeActivity.class);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public void onClick(View v) {\n\n switch (item.getId()) {\n\n case 1:\n\n /*mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent1 = new Intent(context, NameActivity.class);\n myIntent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent1);*/\n\n break;\n\n case 2:\n\n /* mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent2 = new Intent(context, StartMenuV1.class);\n myIntent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent2);*/\n\n break;\n case 3:\n\n /* mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent3 = new Intent(context, StartMenuV2.class);\n myIntent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent3);*/\n\n break;\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent intent;\n switch (item.getItemId()) {\n case R.id.date:\n intent = new Intent(this,DateActivity.class);\n startActivityForResult(intent, INTENT_DATE_REQUEST);\n return true;\n case R.id.keyboard:\n intent = new Intent(this,KeyboardActivity.class);\n intent.putExtra(\"text\", textView.getText().toString());\n startActivity(intent);\n return true;\n case R.id.list:\n intent = new Intent(this,ListActivity.class);\n intent.putExtra(\"position\",listItemSelected);\n startActivityForResult(intent, INTENT_LIST_ITEM_REQUEST);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n //HOME = menu.findItem(android.R.id.home);\n //HOME.setIcon(new BitmapDrawable(toolBox.myPhoto));\n card = menu.getItem(0);\n star = menu.getItem(1);\n sett = menu.getItem(2);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n if (titles[position].equalsIgnoreCase(\"温度管理\")) {\n // if (position == 0) {\n // 温度\n startActivity(new Intent(Menu.this, Wendu.class));\n } else if (titles[position].equalsIgnoreCase(\"湿度管理\")) {\n // 湿度\n startActivity(new Intent(Menu.this, Shidu.class));\n } else if (titles[position].equalsIgnoreCase(\"装卸货\")) {\n // 管理员 任务列表||扫描界面\n Intent intent = new Intent(Menu.this, StoreTask.class);\n intent.putExtra(\"userName\", username);\n intent.putExtra(\"password\", password);\n startActivity(intent);\n\n// } else if (titles[position].equalsIgnoreCase(\"药品管理\")) {\n// // 药品管理\n// ComponentName cn = new ComponentName(\n// \"com.example.tiaoxingscan\",\n// \"com.enjoyor.drugmanager.activity.XzChoice\");\n// Intent intent = new Intent();\n// intent.putExtra(\"userName\", username);\n// intent.putExtra(\"password\", password);\n// intent.putExtra(\"webhead\", Constants.getWebHead(Menu.this));\n// intent.setComponent(cn);\n// startActivity(intent);\n } else if (titles[position].equalsIgnoreCase(\"消息中心\")) {\n // 消息中心\n Intent intent = new Intent(Menu.this, MergeActivity.class);\n intent.putExtra(\"userName\", username);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"webhead\", Constants.getWebHead(Menu.this));\n startActivity(intent);\n } else if (titles[position].equalsIgnoreCase(\"巡更\")) {\n // 巡更\n Intent intent = new Intent(Menu.this, XunGengActivity.class);\n intent.putExtra(\"userName\", username);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"webhead\", Constants.getWebHead(Menu.this));\n startActivity(intent);\n ;\n } else if (titles[position].equalsIgnoreCase(\"查仓\")) {\n // 查仓\n Intent intent = new Intent(Menu.this, ChacangActivity.class);\n intent.putExtra(\"userName\", username);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"webhead\", Constants.getWebHead(Menu.this));\n startActivity(intent);\n ;\n } else if (titles[position].equalsIgnoreCase(\"查仓记录\")) {\n // 查仓记录\n Intent intent = new Intent(Menu.this,\n ChaCangRecordActivity.class);\n intent.putExtra(\"userName\", username);\n intent.putExtra(\"password\", password);\n intent.putExtra(\"webhead\", Constants.getWebHead(Menu.this));\n startActivity(intent);\n\n } else if (titles[position].equalsIgnoreCase(\"RFID写入\")) {\n startActivity(new Intent(Menu.this,\n Activity_writerfid.class));\n } else if (titles[position].equalsIgnoreCase(\"手工通风\")) {\n startActivity(new Intent(Menu.this, TongFengActivity.class));\n }else if (titles[position].equalsIgnoreCase(\"抽样称重\")){\n startActivity(new Intent(Menu.this, CYWeight.class));\n }\n }", "private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_where_eat, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n // get the id of menu item selected\n switch (item.getItemId()){\n case R.id.action_home :\n // initialize and Intent for the MainActivity and start it\n intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_add_contact :\n // initialize and Intent for the MainActivity and start it\n intent = new Intent(this, AddContact.class);\n startActivity(intent);\n return true;\n case R.id.action_view_family :\n intent = new Intent(this, ViewGroup.class);\n intent.putExtra(\"_group\", \"Family\");\n startActivity(intent);\n return true;\n case R.id.action_view_friends :\n intent = new Intent(this, ViewGroup.class);\n intent.putExtra(\"_group\", \"Friends\");\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@objid (\"491bee9e-12dd-11e2-8549-001ec947c8cc\")\n private static void createMenuEntriesForAction(IModule module, MMenu moduleMenu, MPart view) {\n Map<String, MMenu> slotMap = new HashMap<>();\n \n // ask module for its IModuleAction that should be inserted into the\n // contextual menu and for each of them\n for (IModuleAction action : module.getActions(ActionLocation.contextualpopup)) {\n // Create the MHandler and MHandledItem for this action.\n \n // MCommand\n MCommand command = ModuleCommandsRegistry.getCommand(module, action);\n \n // MHandler\n final MHandler handler = createAndActivateHandler(command, module, action, view);\n \n // MHandledItem\n MHandledMenuItem item = createAndInsertItem(moduleMenu, action, slotMap);\n // Bind to command\n item.setCommand(command);\n \n Expression visWhen = new IsVisibleExpression(handler.getObject(), item);\n MCoreExpression isVisibleWhenExpression = MUiFactory.INSTANCE.createCoreExpression();\n isVisibleWhenExpression.setCoreExpressionId(\"programmatic.value\");\n isVisibleWhenExpression.setCoreExpression(visWhen);\n \n item.setVisibleWhen(isVisibleWhenExpression);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n menu.getItem(0).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem menuItem) {\n mAdapter.clearContacts();\n mAdapter.addContact(new Contact(\"Yusuf\", R.drawable.yusuf));\n mAdapter.addContact(new Contact(\"Sarah\", R.drawable.sarah));\n mAdapter.addContact(new Contact(\"Leon\", R.drawable.leon));\n mAdapter.addContact(new Contact(\"Taleb\", R.drawable.taleb));\n mAdapter.addContact(new Contact(\"Chris\", R.drawable.chris));\n mAdapter.addContact(new Contact(\"Lisa\", R.drawable.lisa));\n MediaPlayer player = MediaPlayer.create(getApplicationContext(),R.raw.ding_dong);\n player.start();\n return true;\n }\n });\n menu.getItem(1).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem menuItem) {\n Intent i = new Intent(getApplicationContext(), WebViewActivity.class);\n i.putExtra(\"url\",\"file:///android_asset/index.html\");\n getApplicationContext().startActivity(i);\n return true;\n }\n });\n\n return true;\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem i) {\n int id = i.getItemId();\n\n switch (i.getItemId()) {\n\n// case R.id.action_settings:\n// Intent intent = new Intent(this, HttpMainActivity.class);\n// startActivity(intent);\n// break;\n\n case R.id.menu_maintain_synchronicity:\n Intent intent4 = new Intent(HelpActivity.this, SynchListActivity.class);\n startActivityForResult(intent4, 4);\n break;\n\n case R.id.menu_maintain_events:\n maintainEvents();\n break;\n\n case R.id.menu_match_events:\n Intent intent6 = new Intent(HelpActivity.this, MatchKeywordsActivity.class);\n startActivityForResult(intent6, 6);\n break;\n\n case R.id.menu_import:\n Intent intent7 = new Intent(HelpActivity.this, DownloadJSON.class);\n Log.i(\"dolphinp\",\"intent7\");\n startActivity(intent7);\n break;\n// )\n// if (isOnline) {\n// requestData(\"http://10.0.0.2/feeds/synchItems.json\");\n// } else {\n// Toast.makeText(this,\"no network\",Toast.LENGTH_LONG).show();\n// }\n// break;\n\n default:\n break;\n }\n\n return super.onOptionsItemSelected(i);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.log:\r\n \tIntent i = new Intent(this, LogItemsActivity.class);\r\n \t\tstartActivity(i);\r\n return true;\r\n case R.id.edit:\r\n \tIntent i1 = new Intent(this, EditItemsActivity.class);\r\n \tstartActivity(i1);\r\n return true;\r\n case R.id.stats:\r\n \tIntent i2 = new Intent(this, BarActivity.class);\r\n \t\tstartActivity(i2);\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n int id = item.getItemId();\n Intent myIntent;\n\n //adding the clickable menu by switch\n switch(id){\n //home button\n case R.id.actionHome:\n myIntent = new Intent(this, MainActivity.class);\n startActivity(myIntent);\n return true;\n //add button\n case R.id.actionAdd:\n myIntent = new Intent(this, addPage.class);\n startActivity(myIntent);\n return true;\n\n //filter button \n case R.id.actionFilter:\n Toast.makeText(this, \"Filter\", Toast.LENGTH_SHORT).show();\n return true;\n\n //past planner button\n case R.id.actionPastPlan:\n\n myIntent = new Intent(this, pastPlanners.class);\n startActivity(myIntent);\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n\n case R.id.accueil_menu:\n Intent intenthome = new Intent(this, MainActivity.class);\n startActivity(intenthome);\n return true;\n\n case R.id.list_artwork_menu:\n Intent intentartwork = new Intent(this, List_artwork.class);\n startActivity(intentartwork);\n return true;\n\n case R.id.exposition_menu:\n Intent intentexhibition = new Intent(this, List_exhibition.class);\n startActivity(intentexhibition);\n return true;\n\n case R.id.parametres_menu:\n Intent intentsettings = new Intent(this, Settings.class);\n startActivity(intentsettings);\n return true;\n\n case R.id.addArtist_menu:\n Intent intentaddArtistmenu = new Intent(this, Create_artist.class);\n startActivity(intentaddArtistmenu);\n return true;\n }\n\n return (super.onOptionsItemSelected(item));\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n return true;\r\n }\r\n\r\n if (id == R.id.action_about) {\r\n ScreenAbout screenAbout = new ScreenAbout();\r\n Intent intent = new Intent(this, ScreenAbout.class);\r\n //intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n //intent.putExtra(ScreenAbout.class.getName(), ScreenAbout.class.getName());\r\n startActivity(intent);\r\n return true;\r\n }\r\n\r\n if (id == R.id.action_radar) {\r\n ScreenRadar screenRadar = new ScreenRadar();\r\n Intent intent = new Intent(this, ScreenRadar.class);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n intent.putExtra(ScreenRadar.class.getName(), ScreenRadar.class.getName());\r\n startActivity(intent);\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "private void initializeMenuForListView() {\n\t\tMenuItem sItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_S_MENU));\n\t\tsItem.setOnAction(event ->\n\t\t\taddSAction()\n\t\t);\n\t\t\n\t\tMenuItem scItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_SC_MENU));\n\t\tscItem.setOnAction(event ->\n\t\t\t\taddScAction()\n\t\t);\n\t\t\n\t\tContextMenu menu = new ContextMenu(sItem, scItem);\n\t\tfirstListView.setContextMenu(menu);\n\t\tsecondListView.setContextMenu(menu);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // get the id of menu item selected\n switch (item.getItemId()) {\n case R.id.action_home :\n // initialize an Intent for the MainActivity and start it\n intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n return true;\n case R.id.action_create_list :\n // initialize an Intent for the CreateList Activity and start it\n intent = new Intent(this, CreateList.class);\n startActivity(intent);\n return true;\n case R.id.action_add_item :\n // initialize an Intent for the AddItem Activity and start it\n intent = new Intent(this, AddItem.class);\n // put the database id in the Intent\n intent.putExtra(\"_id\", listId);\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_activity_main_search:\n Intent searchActivityIntent = new Intent(MainActivity.this, SearchActivity.class);\n this.startActivity(searchActivityIntent);\n return true;\n case R.id.menu_activity_main_notifications:\n Intent notificationsActivityIntent = new Intent(MainActivity.this, NotificationsActivity.class);\n this.startActivity(notificationsActivityIntent);\n return true;\n case R.id.menu_activity_main_help:\n Intent helpActivityIntent = new Intent(MainActivity.this, HelpActivity.class);\n this.startActivity(helpActivityIntent);\n return true;\n case R.id.menu_activity_main_about:\n Intent aboutActivityIntent = new Intent(MainActivity.this, AboutActivity.class);\n this.startActivity(aboutActivityIntent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Intent i;\n switch (id) {\n case R.id.action_search:\n break;\n case R.id.overflow1:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://advanced.shifoo.in/site/appterms-and-conditions\"));\n startActivity(i);\n break;\n case R.id.overflow2:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://www.shifoo.in/site/privacy-policy\"));\n startActivity(i);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_view_ingredients, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_who) {\n\n Uri uri = Uri.parse(\"http://instagram.com/_u/mohammadreza2012\");\n Intent likeIng = new Intent(Intent.ACTION_VIEW, uri);\n\n likeIng.setPackage(\"com.instagram.android\");\n\n try {\n startActivity(likeIng);\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"http://instagram.com/mohammadreza2012\")));\n }\n return true;\n }\n if (id == R.id.action_about) {\n startActivity(new Intent(MainActivity.this, ActivityAbout.class));\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case R.id.action_tweet:\n Intent intentTweet = new Intent(\"com.phonbopit.learnandroid.yamba.action.tweet\");\n startActivity(intentTweet);\n return true;\n case R.id.action_purge:\n\n return true;\n case R.id.action_settings:\n Intent intentSettings = new Intent(this, SettingActivity.class);\n startActivity(intentSettings);\n return true;\n case R.id.action_refresh:\n\n return true;\n default:\n return false;\n }\n\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "private void finishCreatingMenu(Menu menu){\n\t\t\tMenuItem menuItem = menu.findItem(R.id.action_share);\n\t\t\tmenuItem.setIntent(createShareForecastIntent());\n\t\t}", "private void finishCreatingMenu(Menu menu) {\n MenuItem menuItem = menu.findItem(R.id.action_share);\n menuItem.setIntent(createShareForecastIntent());\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n this.menu = menu;\n\n getMenuInflater().inflate(R.menu.activity_main, menu);\n\n //initialize add feed menu items\n addfeed = menu.findItem(R.id.addfeed);\n\n //xda menu item\n xda = menu.findItem(R.id.xda2);\n\n //built in feeds\n default_feeds = menu.findItem(R.id.default_feeds);\n\n return super.onCreateOptionsMenu(menu);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id){\n case R.id.History_of_appointments:\n Intent intent_history = new Intent(this,history_of_appointments.class);\n intent_history.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_history);\n return true;\n case R.id.Create_appointment_slot:\n Intent intent_create_appointment = new Intent(this,create_appointment_slot.class);\n intent_create_appointment.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_create_appointment);\n return true;\n case R.id.Messenger:\n Intent intent_messenger = new Intent(this,Messenger.class);\n intent_messenger.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_messenger);\n return true;\n case R.id.Search:\n Intent intent_search = new Intent(this,search.class);\n this.startActivity(intent_search);\n return true;\n case R.id.Logout:\n Intent intent_Logout = new Intent(this,LoginActivity.class);\n SharedPreferences settings = getSharedPreferences(\"UTA_APPT_SCHEDULER\", 0);\n\n settings.edit()\n .putString(\"UserName\", \"NA\")\n .putString(\"Password\", \"NA\")\n .putString(\"user_name\", \"NA\")\n .putString(\"user_dept\", \"NA\")\n .putString(\"user_type\", \"NA\")\n .putString(\"user_email\", \"NA\")\n .putString(\"user_deptname\", \"NA\")\n .apply();\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n this.startActivity(intent_Logout);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tswitch(id){\n\t\t\tcase R.id.calendar:\n\t\t\t\tIntent intent = new Intent(MainActivity.this,CalendarActivity.class);\n\t\t\t\t//intent.putExtra(\"account\", account); \n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\tcase R.id.weather:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n MenuItem item = menu.findItem(R.id.menu_item_share);\r\n ShareActionProvider myShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);\r\n myShareActionProvider.setShareHistoryFileName(\"test\");\r\n \r\n Intent myIntent = new Intent();\r\n myIntent.setAction(Intent.ACTION_SEND);\r\n myIntent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.sms_body));\r\n myIntent.setType(\"text/plain\");\r\n\r\n myShareActionProvider.setShareIntent(myIntent);\r\n\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n provider = (ShareActionProvider) MenuItemCompat.getActionProvider((MenuItem) menu.findItem(R.id.share));\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n switch (id){\n case R.id.home:\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n return true;\n\n case R.id.kalenderansicht_abrufen:\n i = new Intent(this, Kalender.class);\n startActivity(i);\n return true;\n\n case R.id.notizfunktion_aufrufen:\n i = new Intent(this, Notizen.class);\n startActivity(i);\n return true;\n\n case R.id.wetterinformationen_abrufen:\n i = new Intent(this, Wetter.class);\n startActivity(i);\n return true;\n\n case R.id.rechnerfunktion_aufrufen:\n i = new Intent(this, Rechner.class);\n startActivity(i);\n return true;\n\n case R.id.stopwatch:\n i = new Intent(this, StopWatch.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n final Intent intentHome = new Intent(this, HomeActivity.class);\n final Intent intentInfo = new Intent(this, PuntoActivity.class);\n\n int id = item.getItemId();\n\n switch (id){\n case R.id.ajustes:{\n //TODO lanzar ajustes\n break;\n }\n case R.id.acercaDe:{\n //TODO lanzar acerca de\n break;\n }\n case R.id.home:{\n startActivity(intentHome);\n break;\n }\n case R.id.action_info:{\n intentInfo.putExtra(\"puntoId\", \"punto00\");\n startActivity(intentInfo);\n break;\n }\n case R.id.info:{\n intentInfo.putExtra(\"puntoId\", \"punto00\");\n startActivity(intentInfo);\n break;\n }\n default:{\n\n break;\n }\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.main, menu);\n\t Contact = menu;\n\t ListOfArtist = menu;\n\t ListOfAlbum = menu;\n\t return true;\n\t }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_receipt_recognize_next:\n Intent intent = new Intent(RecognizeReceiptActivity.this, AddTransactionActivity.class);\n intent.putExtra(\"receipt_list\", mAdapter.getActualData().toString());\n startActivity(intent);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n //add MenuItem(s) to ActionBar using Java code\n MenuItem menuItem_Purchase = menu.add(0, 1, Menu.NONE, \"Next\");\n MenuItemCompat.setShowAsAction(menuItem_Purchase,\n MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n\n //Log.d(\"recon\", savedSite.toString());\n return true;\n }", "@Override\n public void onItemClick(int position, View v) {\n\n if (position == 0) {\n Intent intent = new Intent(getActivity(), Adorama.class);\n startActivity(intent);\n\n }\n\n if (position == 1) {\n Intent intent = new Intent(getActivity(), Apple.class);\n startActivity(intent);\n\n }\n\n if (position == 2) {\n Intent intent = new Intent(getActivity(), Craig.class);\n startActivity(intent);\n\n }\n\n if (position == 3) {\n Intent intent = new Intent(getActivity(), Frys.class);\n startActivity(intent);\n\n }\n\n if (position == 4) {\n Intent intent = new Intent(getActivity(), Rakuten.class);\n startActivity(intent);\n\n }\n\n if (position == 5) {\n Intent intent = new Intent(getActivity(), Sears.class);\n startActivity(intent);\n\n }\n\n if (position == 6) {\n Intent intent = new Intent(getActivity(), Tiger.class);\n startActivity(intent);\n\n }\n\n if (position == 7) {\n Intent intent = new Intent(getActivity(), Woot.class);\n startActivity(intent);\n\n }\n\n\n if (position == 8) {\n Intent intent = new Intent(getActivity(), Sony.class);\n startActivity(intent);\n\n }\n\n\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // menu.add(0, MENU_START, 0, R.string.menu_start);\n // menu.add(0, MENU_RESUME, 0, R.string.menu_options);\n\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.alinone_arrange_order, menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tmenu.add(0, MENU_ID_CARD_LIST, 1, getResources().getString(R.string.title_activity_card_list_activitytitle));\n\t\tmenu.add(0, MENU_ID_SETTING, 2, getResources().getString(R.string.title_activity_setting_activitytitle));\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_one_page, menu);\n\n\n //Setting up the Share Action Provider\n provider = (ShareActionProvider) menu.findItem(R.id.menu_share).getActionProvider();\n provider.setShareIntent(getDefaultShareIntent());\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_userProfile) {\n Intent intent = new Intent(this, UserProfile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_mealPlan) {\n Intent intent = new Intent(this, UpcomingPlans.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_recipe) {\n Intent intent = new Intent(this, Recipes.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_pantry) {\n Intent intent = new Intent(this, Pantry.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_fitnessTracker) {\n Intent intent = new Intent(this, FitnessTracker.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_settings) {\n /*Intent intent = new Intent(this, Settings.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);*/\n toggleNotifications();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "private void addItemScreen() {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tstartActivity(intent);\n }", "public static void registerMenuItems(SIPCommMenu parentMenu)\n {\n if(protocolProviderListener == null)\n {\n protocolProviderListener = new ProtocolProviderListener(parentMenu);\n GuiActivator.bundleContext\n .addServiceListener(protocolProviderListener);\n }\n\n for (ProtocolProviderFactory providerFactory : GuiActivator\n .getProtocolProviderFactories().values())\n {\n for (AccountID accountID : providerFactory.getRegisteredAccounts())\n {\n ServiceReference<ProtocolProviderService> serRef\n = providerFactory.getProviderForAccount(accountID);\n ProtocolProviderService protocolProvider\n = GuiActivator.bundleContext.getService(serRef);\n\n addAccountInternal(protocolProvider, parentMenu);\n }\n }\n\n // if we are in disabled menu mode and we have only one item\n // change its name (like global auto answer)\n if( ConfigurationUtils.isAutoAnswerDisableSubmenu()\n && getAutoAnswerItemCount(parentMenu) == 1)\n {\n updateItem(getAutoAnswerItem(parentMenu, 0), true);\n }\n }", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t Intent prefIntent = new Intent(intent);\n\t\t\t prefIntent.setComponent(new ComponentName(\n\t\t\t rList.get(arg2).activityInfo.packageName, rList.get(arg2).activityInfo.name));\n\t\t\t Test.this.startActivity(prefIntent);\n\t\t\t\t}", "public boolean onOptionsItemSelected(MenuItem item) {\n\r\n switch(item.getItemId()){\r\n\r\n case R.id.menu_BelAlarmnummer:\r\n //bel 112\r\n boolean isOk = true;\r\n Intent intent = new Intent();\r\n\r\n if(!deviceIsAPhone()){\r\n displayAlert();\r\n isOk = false;\r\n }\r\n if (isOk){\r\n intent.setAction(Intent.ACTION_DIAL);\r\n intent.setData(Uri.parse(getResources().getString(R.string.telefoonnummer)));\r\n startActivity(intent);\r\n }\r\n\r\n break;\r\n\r\n case R.id.menu_naarMenu:\r\n //naar Activity startMenu\r\n Class ourClass1;\r\n try {\r\n ourClass1 = Class.forName(\"com.aid.first.mb.firstaid.Menu1\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass1);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n break;\r\n case R.id.menu_sluitAf:\r\n Class ourClass3;\r\n try {\r\n ourClass3 = Class.forName(\"com.aid.first.mb.firstaid.Personlijke_veiligheid\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass3);\r\n intentDrie.putExtra(\"sluiten\",1);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n finish();\r\n break;\r\n\r\n case R.id.menu_WaarBenIk:\r\n //naar activity Locatie\r\n Class ourClass4;\r\n try {\r\n ourClass4 = Class.forName(\"com.aid.first.mb.firstaid.Lokatie\");\r\n Intent intentVier = new Intent(MoederClass.this, ourClass4);\r\n startActivity(intentVier);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tswitch(arg2){\n\t\t\t\tcase 0:\n\t\t\t\t\tintent=new Intent(MainActivity.this,AddEvent.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tintent=new Intent(MainActivity.this,AddIncome.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tintent=new Intent(MainActivity.this,QueryByDateActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tintent=new Intent(MainActivity.this,BudgetActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t intent=new Intent(MainActivity.this,AnalysisActivity.class);\n\t\t\t\t\t startActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tintent=new Intent(MainActivity.this,SettingActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to a click on the \"Insert dummy data\" menu option\n case R.id.action_insert_dummy_data:\n insertGender();\n return true;\n // Respond to a click on the \"Delete all entries\" menu option\n case R.id.action_delete_all_entries:\n deleteAllPets();\n return true;\n case R.id.action_add_entries:\n Intent intent = new Intent(ArtistsActivity.this, ArtistsEditorActivity.class);\n startActivity(intent);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onMenuItemClick(MenuItem item) {\r\n switch (item.getItemId()) {\r\n//---------------BMI option------------------\r\n case R.id.my_bmi:\r\n Intent bmiIntent = new Intent(MainHome.this, MainBMI.class);\r\n bmiIntent.putExtra(\"id\", _id);\r\n bmiIntent.putExtra(\"userName\", userName);\r\n bmiIntent.putExtra(\"pref\", preference);\r\n startActivity(bmiIntent);\r\n return true;\r\n//-----------------------top distance list--------------\r\n case R.id.action_list_dist:\r\n Intent list = new Intent(MainHome.this, MainTopDist.class);\r\n list.putExtra(\"id\", _id);\r\n list.putExtra(\"userName\", userName);\r\n list.putExtra(\"pref\", preference);\r\n startActivity(list);\r\n return true;\r\n//-----------------top time list------------------\r\n case R.id.action_list_time:\r\n Intent listTime = new Intent(MainHome.this, MainTopTime.class);\r\n listTime.putExtra(\"id\", _id);\r\n listTime.putExtra(\"userName\", userName);\r\n listTime.putExtra(\"pref\", preference);\r\n startActivity(listTime);\r\n return true;\r\n//----------------------logout----------------------------------\r\n case R.id.action_logout:\r\n Intent logIntent = new Intent(MainHome.this, MainActivity.class);\r\n startActivity(logIntent);\r\n finish();\r\n return true;\r\n//------------toggle normal map-----------------\r\n case R.id.map_normal:\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n return true;\r\n//----------------toggle hybrid map------------------------\r\n case R.id.map_hybrid:\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n return true;\r\n//----------------------list all journeys-----------------------------------\r\n case R.id.action_list_all:\r\n Intent listIntent = new Intent(MainHome.this, MainListAll.class);\r\n listIntent.putExtra(\"id\", _id);\r\n listIntent.putExtra(\"userName\", userName);\r\n listIntent.putExtra(\"pref\", preference);\r\n startActivity(listIntent);\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }", "private void InitializeUI(){\n\t\t//Set up the menu items, which are differentiated by their IDs\n\t\tArrayList<MenuItem> values = new ArrayList<MenuItem>();\n\t\tMenuItem value = new MenuItem();\n\t\tvalue.setiD(0); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(1); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(2); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(3); values.add(value);\n\t\t\n\t\tvalue = new MenuItem();\n\t\tvalue.setiD(4); values.add(value);\n\n MenuAdapter adapter = new MenuAdapter(this, R.layout.expandable_list_item3, values);\n \n // Assign adapter to List\n setListAdapter(adapter);\n \n //Set copyright information\n Calendar c = Calendar.getInstance();\n\t\tString year = String.valueOf(c.get(Calendar.YEAR));\n\t\t\n\t\t//Set up the copyright message which links to the author's linkedin page\n TextView lblCopyright = (TextView)findViewById(R.id.lblCopyright);\n lblCopyright.setText(getString(R.string.copyright) + year + \" \");\n \n TextView lblName = (TextView)findViewById(R.id.lblName);\n lblName.setText(Html.fromHtml(\"<a href=\\\"http://uk.linkedin.com/in/lekanbaruwa/\\\">\" + getString(R.string.name) + \"</a>\"));\n lblName.setMovementMethod(LinkMovementMethod.getInstance());\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tswitch (arg2) {\n\t\t\t\tcase 0:\n\t\t\t\t\tintent.setClass(mContext, Government_Introduction.class);\n\t\t\t\t\tintent.putExtra(Constants.KEY_SUBJECT_NAME,\n\t\t\t\t\t\t\tgetString(R.string.tab1));\n\t\t\t\t\tintent.putExtra(Constants.KEY_ITEM_NAME, (itemTitle[0]));\n\t\t\t\t\tintent.putExtra(Constants.SUBJECT_TITLE, (itemTitle[0]));\n\t\t\t\t\tintent.putExtra(Constants.CONTENT_FILE, \"award1.txt\");\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tintent.setClass(mContext, Government_Introduction.class);\n\t\t\t\t\tintent.putExtra(Constants.KEY_SUBJECT_NAME,\n\t\t\t\t\t\t\tgetString(R.string.tab1));\n\t\t\t\t\tintent.putExtra(Constants.KEY_ITEM_NAME, (itemTitle[1]));\n\t\t\t\t\tintent.putExtra(Constants.SUBJECT_TITLE, (itemTitle[1]));\n\t\t\t\t\tintent.putExtra(Constants.CONTENT_FILE, \"award2.txt\");\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n for (String t : type) {\n startActivity(ExerciseSettingsActivity.exerciseSettingsIntent(this, t));\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(\"\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"How-To\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"About\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Rate it\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Contact\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Preview SMS\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\t\r\n\t\treturn true;\r\n\t\r\n\t\t\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings)\n {\n return true;\n }\n if (id == R.id.action_home)\n {\n LocalBroadcastManager.getInstance(this)\n .registerReceiver(mReceiver,\n new IntentFilter(ACTION_CUSTOM_BROADCAST));\n\n Intent intent = new Intent(this , MealItemActivity.class);\n\n Random randomGenerator = new Random();\n int index = randomGenerator.nextInt(mealsArrayList.size());\n MealItem mealItem = mealsArrayList.get(index);\n\n intent.putExtra(\"title\", mealItem.title);\n intent.putExtra(\"description\", mealItem.description);\n intent.putExtra(\"imageId\", mealItem.imageId);\n\n startActivity(intent);\n\n Intent customBroadcastIntent = new Intent(ACTION_CUSTOM_BROADCAST);\n\n LocalBroadcastManager.getInstance(this).sendBroadcast(customBroadcastIntent);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.action_item2:\n Intent intent = new Intent(getBaseContext(), CallActivity.class);\n this.startActivity(intent);\n break;\n case R.id.action_item3:\n Intent intent2 = new Intent(this, DialActivity.class);\n this.startActivity(intent2);\n break;\n case R.id.action_item4:\n Intent intent3 = new Intent(this, MailActivity.class);\n this.startActivity(intent3);\n break;\n case R.id.action_item5:\n Intent intent4 = new Intent(this, MapActivity.class);\n this.startActivity(intent4);\n break;\n case R.id.action_item6:\n Intent intent5 = new Intent(this, WebActivity.class);\n this.startActivity(intent5);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n return true;\n\n //noinspection SimplifiableIfStatement\n // if (id == R.id.action_item2) {\n\n // Toast.makeText(getApplicationContext(), \"Setting selected\", Toast.LENGTH_SHORT).show();\n // Intent intent = new Intent(this, CallActivity.class);\n //this.startActivity(intent);\n\n // }\n\n //return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint itemId = item.getItemId();\n\n\t\t//noinspection SimplifiableIfStatement\n\t\tif (itemId == R.id.action_settings) {\n\t\t\tIntent intent = new Intent(this, SettingsActivity.class);\n\t\t\tstartActivity(intent);\n\t\t} else if (itemId == R.id.action_refresh) {\n\t\t\tList<Spanned> newSentence = generateSentence();\n\t\t\tupdateSentenceListView(newSentence);\n\t\t\tupdateSentenceTabTitle(newSentence);\n\t\t} else if (itemId == GenreType.POETRY.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.POETRY);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == GenreType.NURSERY_RIME.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.NURSERY_RIME);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == GenreType.ESSAY.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.ESSAY);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == GenreType.ETC.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.ETC);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == GenreType.NOVEL.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.NOVEL);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == GenreType.FAIRY_TALE.hashCode()) {\n\t\t\tAppContext.getInstance().setGenreType(GenreType.FAIRY_TALE);\n\t\t\tupdateActionBarTitle();\n\t\t} else if (itemId == R.id.action_save) {\n\t\t\tif (getFavoriteItemCount() > 0) {\n\t\t\t\tshowSaveDialog();\n\t\t\t} else {\n\t\t\t\tshowItemNotFoundWarningDialog();\n\t\t\t}\n\t\t} else if (itemId == R.id.action_delete) {\n\t\t\tif (getFavoriteItemCount() > 0) {\n\t\t\t\tshowDeleteConfirmAlertDialog();\n\t\t\t} else {\n\t\t\t\tshowNoSelectSentenceDialog();\n\t\t\t}\n\t\t} else if (itemId == R.id.action_rate) {\n\t\t\tif (getFavoriteItemCount() > 0) {\n\t\t\t\tshowRateDialog();\n\t\t\t} else {\n\t\t\t\tshowNoSelectSentenceDialog();\n\t\t\t}\n\t\t}\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n myMenu = menu;\n\n Bundle extras = getIntent().getExtras();\n\n if(extras != null)\n {\n getMenuInflater().inflate(R.menu.display_note_menu, menu);\n }\n else\n {\n getMenuInflater().inflate(R.menu.edit_note_menu, menu);\n }\n\n return true;\n }", "public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // case analysis on selected item, when a operation finishes, it notifies the program if something was chosen.\n case R.id.menu_addNewProduct:// user wants to add a new product that they purchased\n Intent i = new Intent(AddProductActivity.this,AddProductActivity.class);\n i.putExtra(\"list\", (Serializable) product_list);//With the product lists information passed on,\n i.putExtra(\"added_list\", (Serializable) added_list);//and the list on the user's currently owned products,\n startActivity(i);//we reload current page.\n return true;\n case R.id.menu_editProduct:\n Intent i2 = new Intent(AddProductActivity.this,EditActivity.class);\n i2.putExtra(\"list\", (Serializable) product_list);//With the product lists information passed on,\n i2.putExtra(\"added_list\", (Serializable) added_list);//and the list on the user's currently owned products,\n startActivity(i2);//we enter the page to edit the products in our fridge\n return true;\n case R.id.menu_calender:\n Intent i3 = new Intent(AddProductActivity.this,CalendarActivity.class);\n i3.putExtra(\"list\", (Serializable) product_list);//With the product lists information passed on,\n i3.putExtra(\"added_list\", (Serializable) added_list);//and the list on the user's currently owned products,\n startActivity(i3);//we enter the page with the calendar view\n return true;\n default:\n return super.onOptionsItemSelected(item);//notifies program that a menu selection was not made\n }\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_pet_item, menu);\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case R.id.showArticle_options:\r\n\r\n Log.d(TAG, \"Started ArticleShowOptions\");\r\n Intent intent=new Intent(this, MarketplaceFilterActivity.class);\r\n startActivity(intent);\r\n\r\n //Hier intent für die activity des Zahnrades einfügen und in manifest parent activity festlegen für den \"simplen\" Rückweg\r\n\r\n return true;\r\n }\r\n\r\n// Intent implicitIntent = new Intent(this, ProfileSearch.class);\r\n// startActivity(implicitIntent);\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }else if (id == R.id.basic){\n Intent intent = new Intent(Extra.this, MainActivity.class);\n intent.putExtra(\"expr\", exprStr);\n startActivity(intent);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n Intent nextScreen;\n Intent callIntent;\n Intent mailIntent;\n\n switch (item.getItemId()) {\n case R.id.action_call:\n try {\n\n callIntent = new Intent(Intent.ACTION_DIAL);\n callIntent.setData(Uri.parse(\"tel:\"+getString(R.string.tel_number)));\n startActivity(callIntent);\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Calling a Phone Number\", \"Call failed\", activityException);\n }\n\n\n return true;\n\n case R.id.action_mail:\n\n try {\n\n mailIntent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND\n mailIntent.setType(\"text/plain\");\n mailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.mail_subject));\n mailIntent.setData(Uri.parse(\"mailto:\"+getString(R.string.mail_adress))); // or just \"mailto:\" for blank\n mailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.\n startActivity(mailIntent);\n\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Mailing an adress\", \"Mail failed\", activityException);\n }\n\n return true;\n\n case R.id.action_linkedin:\n\n try {\n\n Uri uriUrl = Uri.parse(getString(R.string.url_linkedin));\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n\n } catch (ActivityNotFoundException activityException) {\n Log.e(\"Mailing an adress\", \"Mail failed\", activityException);\n }\n\n return true;\n\n case R.id.action_language:\n\n nextScreen = new Intent(getApplicationContext(), Language.class);\n\n startActivity(nextScreen);\n\n return true;\n\n case R.id.action_settings:\n\n nextScreen = new Intent(getApplicationContext(), Settings.class);\n\n startActivity(nextScreen);\n\n return true;\n\n case R.id.action_exit:\n this.finishAffinity();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Intent restIntent = getIntent();\n RestaurantInfo rInfo = (RestaurantInfo)restIntent.getSerializableExtra(\"rest\");\n chosenItems=(ArrayList<MenuItem>)restIntent.getSerializableExtra(\"MealList\");\n if(chosenItems == null){\n chosenItems = new ArrayList<MenuItem>();\n }\n //need to use RestaurantInfo to create a data struct to give to contentView\n mp = apiInterface.getMenu(rInfo);\n\n //set up content view\n this.allData = mp.getMenu();\n setContentView(R.layout.activity_menu_of_restaurant);\n expt = (ExpandableListView) findViewById(R.id.expandableListView);\n expt.setAdapter(new FirstLevelAdapter(this, this.allData));\n //return to the Restaurant list\n Button back = (Button) findViewById(R.id.buttonBack);\n back.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n Intent myIntent = new Intent(view.getContext(), RestaurantChoices.class);\n startActivityForResult(myIntent, 0);\n }\n\n });\n //pass meals to visualization\n Button pushToViz = (Button) findViewById(R.id.buttonToViz);\n pushToViz.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n Intent myIntent = new Intent(view.getContext(), MainActivity.class);\n myIntent.putExtra(\"MealList\", chosenItems);\n startActivityForResult(myIntent, 0);\n }\n\n });\n }", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n Fruit currentFruit = fruits.get(getAdapterPosition());\n\n menu.setHeaderTitle(currentFruit.getName());\n menu.setHeaderIcon(currentFruit.getIconImg());\n\n /* Finalmente inflamos el menu con las modificaciones */\n MenuInflater inflater = activity.getMenuInflater();\n inflater.inflate(R.menu.item_context_menu, menu);\n /*activity.getMenuInflater().inflate(R.menu.item_context_menu, menu);*/\n\n /*Por último, añadimos uno por uno, el listener onMenuItemClick para\n controlar las acciones en el contextMenu, anteriormente lo manejábamos\n con el método onContextItemSelected en el activity*/\n for (int i = 0; i < menu.size(); i++)\n menu.getItem(i).setOnMenuItemClickListener(this);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "public void OnIngredients (View View)\n {\n \tIntent intent = new Intent(this, EditIngredients.class);\n \t\tstartActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(MainActivity.this, MenuActivity.class);\n String name = (String) parent.getItemAtPosition(position);\n intent.putExtra(\"name\", name);\n startActivity(intent);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main_menu, menu);\n\t\tmenu.findItem(R.id.rate_main).setIcon(R.drawable.ic_menu_rate);\n\t\tmenu.findItem(R.id.rate_main).setOnMenuItemClickListener(new OnMenuItemClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\tstartActivity(new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t.parse(\"market://details?id=com.andapps.horoscopes\")));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\treturn true;\n\n\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n\n getActivity().getMenuInflater().inflate(R.menu.actions , menu);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "private void initializeContextMenus() {\n\t\tinitializeMenuForListView();\n\t\tinitializeMenuForPairsListView();\n\t}", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_player, menu);\n\n // Retrieve the share menu item\n MenuItem menuItem = menu.findItem(R.id.action_share);\n\n // Get the provider and hold onto it to set/change the share intent.\n mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);\n\n // If onLoadFinished happens before this, we can go ahead and set the share intent now.\n if (mTracks != null && mNowPlaying != null) {\n mShareActionProvider.setShareIntent(createShareNowPlayingIntent());\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }" ]
[ "0.63088775", "0.6245511", "0.6240717", "0.61371344", "0.6108926", "0.6091394", "0.60592914", "0.60496974", "0.603436", "0.602019", "0.601169", "0.6004723", "0.5977021", "0.59768116", "0.59629107", "0.5957906", "0.5955775", "0.5954244", "0.59349966", "0.5933489", "0.59317774", "0.59234", "0.5911877", "0.5908413", "0.59045273", "0.58956975", "0.5885181", "0.5871494", "0.5871201", "0.58683664", "0.5860459", "0.58582854", "0.58530533", "0.5846606", "0.5822065", "0.5806054", "0.58023274", "0.57935447", "0.57911295", "0.578056", "0.5775099", "0.5760544", "0.5751379", "0.5744717", "0.5742789", "0.5735282", "0.5724079", "0.5723575", "0.57182425", "0.571366", "0.5713389", "0.5711387", "0.5711179", "0.5699501", "0.56973153", "0.5692539", "0.5689404", "0.568898", "0.56875646", "0.56839424", "0.5682729", "0.56825656", "0.5675059", "0.5673819", "0.5673099", "0.5666891", "0.56642884", "0.5662092", "0.5660693", "0.5654955", "0.56499505", "0.5647578", "0.5645384", "0.56447953", "0.5643912", "0.5642981", "0.5640865", "0.5640735", "0.5637771", "0.5636914", "0.5633692", "0.5627073", "0.56260186", "0.56240743", "0.56223035", "0.56223035", "0.5620598", "0.56153816", "0.5614764", "0.56138843", "0.5611429", "0.5607894", "0.56077325", "0.56043607", "0.56043583", "0.5603785", "0.56001127", "0.5595162", "0.5595063", "0.5587752" ]
0.5796619
37
This constructor should be called only once by the J2EE container. No further objects of this types should be created,
public GeoServerHttpSessionListenerProxy() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public Constructor(){\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "public CSSTidier() {\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "public EsoFactoryImpl()\r\n {\r\n super();\r\n }", "public EO_ClientsImpl() {\n }", "public ObjectFactory() {\r\n\t}", "private SingleObject()\r\n {\r\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public ObjectFactory() {\n\t}", "public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }", "private Instantiation(){}", "@Override\n protected void init() {\n }", "private ObjectRepository() {\n\t}", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "private SingleObject(){}", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private GeneralServicesImpl() {\r\n\t}", "private Catalog() {\r\n }", "@Override\n public void init() {\n }", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "public MystFactoryImpl()\r\n {\r\n super();\r\n }", "private ObjectFactory() { }", "public Ctacliente() {\n\t}", "private LOCFacade() {\r\n\r\n\t}", "public BodyWrapper() {\n /* Empty Constructor required by JMX */\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "private BeanUtils() {\n\t\t\n\t}", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "protected ChildType() {/* intentionally empty block */}", "public void init() {\r\n\t\t// to override\r\n\t}", "public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7176208", "0.69152015", "0.6870836", "0.67689574", "0.6736848", "0.6686701", "0.6678649", "0.666041", "0.6645628", "0.66382647", "0.66259646", "0.6625267", "0.65924376", "0.6582232", "0.6582232", "0.6582232", "0.6578733", "0.6573209", "0.654844", "0.65387565", "0.6521911", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.65024334", "0.6501145", "0.6500384", "0.64979506", "0.64687616", "0.6467078", "0.6458619", "0.6453299", "0.6450998", "0.64449024", "0.644242", "0.64339167", "0.6433446", "0.6425766", "0.6423195", "0.64209765", "0.6417714", "0.64103603", "0.64101166", "0.6407419", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778", "0.6403778" ]
0.0
-1
Created by harshal_patil on 5/19/2016.
public interface Item { public boolean isSection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void skystonePos4() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo12628c() {\n }", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void skystonePos6() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void interr() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "private void m50367F() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo12930a() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo91715d() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo9848a() {\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void skystonePos5() {\n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void init() {\n\n }", "public void mo21779D() {\n }", "public void mo55254a() {\n }", "public void mo21783H() {\n }", "protected abstract Set method_1559();", "Petunia() {\r\n\t\t}", "public void mo21785J() {\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void mo1531a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo21794S() {\n }" ]
[ "0.5878406", "0.586761", "0.563917", "0.558529", "0.55671954", "0.5552283", "0.5552283", "0.55128086", "0.54898024", "0.5483851", "0.54713595", "0.5467244", "0.5459825", "0.5443298", "0.54109335", "0.54016125", "0.53761816", "0.5365631", "0.53544044", "0.5352414", "0.5349129", "0.5337656", "0.5336977", "0.5328363", "0.53267854", "0.5325225", "0.5325225", "0.5325225", "0.5325225", "0.5325225", "0.5325225", "0.5325225", "0.5321435", "0.5321103", "0.5313714", "0.5310507", "0.52899903", "0.5289866", "0.52878386", "0.5286254", "0.52803856", "0.52796906", "0.52562076", "0.52534324", "0.52477896", "0.5245255", "0.5242916", "0.52279216", "0.5223391", "0.5220056", "0.5219352", "0.5217204", "0.52148634", "0.52115756", "0.52115756", "0.52115756", "0.52115756", "0.52115756", "0.5207867", "0.5204983", "0.52031964", "0.5197269", "0.5177849", "0.5175162", "0.5168166", "0.51633507", "0.5159532", "0.5154664", "0.5154664", "0.51525205", "0.5148912", "0.51431733", "0.51388645", "0.5135394", "0.51294315", "0.5126209", "0.5116741", "0.51162535", "0.51160675", "0.5114701", "0.51076454", "0.5104281", "0.5104281", "0.5104281", "0.5096876", "0.5096876", "0.5096876", "0.5096876", "0.5096876", "0.5096876", "0.5096453", "0.5096453", "0.5096453", "0.5095145", "0.50950956", "0.50933695", "0.5092974", "0.5092747", "0.50921035", "0.50906056", "0.5087875" ]
0.0
-1
Makes a new value available
public void produce(@Nullable V value) { synchronized (LOCK) { // Look for a non-cancelled future while (myWaitingFutures.size() >= 1) { SettableFuture<V> future = myWaitingFutures.remove(); if (future.set(value)) { return; } } // If none found, enqueue the value for later myValues.add(new Entry(value)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValue(double newvalue){\n value = newvalue;\n }", "public void setValue(int new_value){\n this.value=new_value;\n }", "public abstract void assign(Object value) throws IllegalStateException, InterruptedException;", "public void addValue() {\n addValue(1);\n }", "public void aendereWert (int value) {\n\t\tvalue = 0 ;\n\t}", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "void set(long newValue);", "public synchronized void v() {\n if (value == maxvalue)\n // NOP\n return;\n ++value;\n notify(); \n //!! L’ordine di risveglio e’ arbitrario\n }", "void setValue(int value);", "public void apply() { writable.setValue(value); }", "public void setValue(Object value) { this.value = value; }", "public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }", "public void valueChanged(IntegerStorageChange change);", "public void refuel() {\n fuelAmount = type.fuelCapacity;\n }", "void setCurrentAmount(double newAmount) {\n this.currentAmount = newAmount;\n }", "public void setValue (int newValue) {\n myValue = newValue;\n }", "public void setOneNewWanted () {\r\n numWanted ++;\r\n }", "public void setValue(A value) {this.value = value; }", "public abstract void setValue(int value);", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "void setNextValue() {\n this.value = this.value * 2;\n }", "public void setValue(int value);", "public int setValue (int val);", "public Object getNewValue()\n {\n return newValue;\n }", "void setValue(double value);", "void updateValue( float time ) {\n\tboolean newVal = in1 | in2;\n\tif (newVal != value) {\n\t value = newVal;\n\t Simulator.schedule(\n\t new Simulator.Event( time + (delay * 0.95f)\n\t\t+ PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\toutputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n\t}\n }", "void editAssetValue(int newVal);", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "void setCurrentHP(final int newHP);", "public void valueChanged(IntegerStorageChange istoragech);", "void updateValue( float time ) {\n\tboolean newVal = in1 & in2;\n\tif (newVal != value) {\n\t value = newVal;\n\t Simulator.schedule(\n\t new Simulator.Event(\n\t\ttime + (delay * 0.95f)\n\t\t+ PRNG.randomFloat( delay * 0.1f ) ) {\n\t\t void trigger() {\n\t\t\toutputChangeEvent( this.time );\n\t\t }\n\t\t}\n\t );\n\t}\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public V setValue(V value);", "public void valueChanged(IntegerStorage istorage);", "public void setAvailable(boolean x){\n availabile = x;\n }", "public void setValue(final Object value) { _value = value; }", "void setValue(V value);", "@Override\n public void setChanged() {\n set(getItem());\n }", "public void setValue(Object val);", "public static void currentValue()\n\t{\n\t\tcurrentVal.setText(String.valueOf(calculateHand(playersCards)));\n\t}", "private void setValue(double value) {\n this.value = value;\n }", "public void setNew();", "public void refillLife(){\r\n\t\tthis.life = totalLife;\r\n\t}", "@Override\n public void onValueAccessed(int value) {\n }", "public static void SetNewNumber () {\n number = (int)(Math.random() * 9.1);\r\n\r\n // PROMPT THE USER\r\n System.out.println(\"A new number has been chosen.\");\r\n System.out.println();\r\n\r\n // SAVED ME WHEN DEBUGGING\r\n // System.out.println(number);\r\n }", "public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}", "boolean incLowValue() { return true; }", "protected abstract void setValue(V value);", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "void setValueLocked(boolean valueLocked);", "public void changeValue(ValueHolder newValue) {\r\n value = ((AttrObject) newValue).getValue();\r\n\tuserInfo = ((AttrObject) newValue).getUserInfo();\r\n\tnotifyFromAttr(); \r\n }", "public void setValue(Object value);", "private void updateValue() {\n int minValue = 100; //Minimum value to be calculated, initialized to a large number\n value = 0; //Value reinitialized to 0\n for (Integer i : values) {\n if (i > value && i <= 21) {\n value = i; //Sets value to maximum value less than or equal to 21\n }\n if (i < minValue) {\n minValue = i; //Sets minimum value to lowest value in the list\n }\n }\n if (value == 0) {\n value = minValue; //Sets value to minValue if no values 21 or less\n }\n valueLabel.setText(\"Value: \" + value); //Sets text of value label\n if (value > 21) {\n bust(); //Busts if value greater than 21\n }\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "private void fireValueChange(boolean b) {\n \t\n\t\t\n\t}", "public void setNewestValueCommad(TangoCommand getNewestValue) {\n newestValueCommand = getNewestValue;\n }", "@Override\n public E set(E value) throws IllegalStateException{\n if(lastItem == null) throw new IllegalStateException();\n it.remove();\n offer(value);\n\n it = iterator();\n for (int i = 0; i < nextCount; i++) {\n it.next();\n }\n\n E item = lastItem;\n lastItem = null;\n return item;\n }", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public void setValue(int newValue) {\t\r\n\t\tthis.value = newValue;\r\n\t}", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public void setValue(int value) {\r\n this.value = value;\r\n }", "void setValue(Object value);", "private void assignment() {\n\n\t\t\t}", "void changeCadence(int newValue);", "public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }", "public void setAvalible(boolean val) {\n this.available = val;\n }", "void setToValue(int val);", "public void internalStore() {\r\n\t\tdata = busInt.get();\r\n\t}", "public void Convert() {\n value = value;\n }", "public void setIntValue(int newValue){\n value = newValue; //set value to newValue\n }", "@Override\r\n\tpublic void setComputerValue() {\n\t\trps.setCom((int) (Math.random() * 3 + 1));\r\n\t}", "public void setNewMember(double value) {\n }", "String setValue();", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public void setValue(long value) {\n\t this.value = value;\n\t }", "public void setValue(S s) { value = s; }", "private void commitEdit (int validValue)\r\n\t{\r\n\t\tm_value = validValue;\r\n\t}", "Object setValue(Object value) throws NullPointerException;", "public void setValue(Number value) {\n this.value = value;\n }", "org.hl7.fhir.Quantity addNewValueQuantity();", "void setValue(R value);", "public void setFromValue (double fromValue){\n firstValue = fromValue;\n }", "void setValue(T value);", "void setValue(T value);", "public abstract Object adjust(Object value, T type);", "protected void changeValue() {\n \tif(value == null)\n \t\tvalue = true;\n \telse if(!value) { \n \t\tif (mode == Mode.THREE_STATE)\n \t\t\tvalue = null;\n \t\telse\n \t\t\tvalue = true;\n \t}else\n \t\tvalue = false;\n \t\n \tsetStyle();\n \t\n \tValueChangeEvent.fire(this, value);\n }", "@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }", "public void setLow(double value){low = value;}", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "public void setNewPVal(double pVal) { this.pValAfter = pVal; }", "@Override\n public void setValue (int newValue){\n super.setValue(newValue);\n updateChildesValues(newValue);\n\n }", "public void observe(int val) {\n observe(val, 1);\n }", "private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }", "T getOldValue();", "public void setValue(Value value) {\n this.value = value;\n }", "T getNewValue();", "public void update() {\n setAge(getAge() - 1);\n }", "public abstract void setValue(T value);", "public void setValue(int value)\n {\n this.value = value;\n }", "public void setValue(double value) {\n this.value = value; \n }" ]
[ "0.6468942", "0.63377094", "0.62990505", "0.6238476", "0.6230246", "0.62161595", "0.6187132", "0.616304", "0.61432254", "0.61350155", "0.6109125", "0.6104168", "0.6025314", "0.6020978", "0.6013492", "0.59795505", "0.59787947", "0.5960982", "0.59506553", "0.59452677", "0.5922765", "0.5918149", "0.59103817", "0.5876676", "0.5876023", "0.58754694", "0.58484554", "0.58452487", "0.5836562", "0.5813671", "0.58118623", "0.57944703", "0.57934606", "0.57857203", "0.5783399", "0.57668424", "0.5751482", "0.57388616", "0.5730509", "0.57274836", "0.5711924", "0.5702242", "0.56951946", "0.5691253", "0.56910247", "0.56861377", "0.568334", "0.56815416", "0.5678487", "0.56702995", "0.566951", "0.56693566", "0.5660824", "0.5653488", "0.5648982", "0.56482863", "0.5634146", "0.5632206", "0.5631857", "0.56314194", "0.5627833", "0.56270427", "0.5626424", "0.5625755", "0.56236947", "0.5620477", "0.5616372", "0.5615504", "0.5606501", "0.5603626", "0.5603456", "0.5600099", "0.55805427", "0.557812", "0.55761445", "0.55659354", "0.55648535", "0.5559271", "0.5557874", "0.5551767", "0.5545783", "0.55340517", "0.55324394", "0.55324394", "0.553193", "0.5525744", "0.55254585", "0.5521862", "0.5514857", "0.5514358", "0.55129004", "0.55121493", "0.55070484", "0.54879135", "0.5487018", "0.54863614", "0.54823095", "0.5480779", "0.5469106", "0.5468493", "0.5465488" ]
0.0
-1
Makes a new exception available
public void produceException(@NotNull Throwable t) { synchronized (LOCK) { // Look for a non-cancelled future while (myWaitingFutures.size() >= 1) { SettableFuture<V> future = myWaitingFutures.remove(); if (future.setException(t)) { return; } } // If none found, enqueue the value for later myValues.add(new Entry(t)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void throwNewExceptionWithFinally(){\n try {\n throw new Error();\n } finally {\n throw new RuntimeException();\n }\n }", "public void addException(Exception exception);", "void mo57276a(Exception exc);", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException createSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException();", "public Exception() {\n\t\t\tsuper();\n\t\t}", "public TeWeinigGeldException(Exception e) {this.e = e;}", "private static void throwException() throws Exception {\n\t\tthrow new Exception();\r\n\t}", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "private void sendOldError(Exception e) {\n }", "private static void throwAnotherExceptionWithInitCause() {\n try {\n throw new IOException();\n } catch (IOException e) {\n OurBusinessLogicException argumentException = new OurBusinessLogicException();\n argumentException.initCause(e);\n throw argumentException;\n }\n }", "Throwable cause();", "public Exception() {\n\tsuper();\n }", "public UnmatchedException(){\r\n\r\n\t}", "public ResourceException(Exception exception) {\r\n super(exception);\r\n }", "public void setException(Exception e)\n {\n this.exception = e;\n }", "@Deprecated\n abstract CacheException makeException(ArchivalUnit au,\n LockssUrlConnection connection,\n CacheEvent evt)\n throws Exception;", "public NSException() {\n\t\tsuper();\n\t\tthis.exception = new Exception();\n\t}", "protected abstract void exceptionsCatching( ExceptionType exceptionType );", "public HealthInformationExchangeException(Exception cause)\n\t{\n\t\tsuper(cause);\n\t}", "public FaultException raise(Throwable e);", "public SMSLibException(Throwable originalE)\n/* 17: */ {\n/* 18:45 */ this.originalE = originalE;\n/* 19: */ }", "public RedoException(){\r\n\t\tsuper();\r\n\t}", "public ExceptionBase( ExceptionType exceptionType ) {\n\t\tsuper();\n\t\texceptionsCatching( exceptionType );\n\t}", "public KillException() {}", "public OLMSException() {\r\n super();\r\n }", "public ItemNotFoundException() {\n super();\n }", "public ObjectNotFoundException() {\r\n super(\"ObjectNotFound Exception\");\r\n }", "IntermediateThrowEvent createIntermediateThrowEvent();", "public void falschesSpiel(SpielException e);", "public void addExceptionStyle();", "public void throwException()\n\t{\n\t\tthrow new RuntimeException(\"Dummy RUNTIME Exception\");\n\t}", "public SpawnException getCaught();", "public static TypeReference newExceptionReference(int exceptionIndex) {\n/* 282 */ return new TypeReference(0x17000000 | exceptionIndex << 8);\n/* */ }", "void failed (Exception e);", "protected void raiseRequestError(Exception e) {\n\t\tmThrowedExceptions.add(e);\n\t}", "public sparqles.avro.discovery.DGETInfo.Builder setException(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.Exception = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public StockException() {\r\n\t\tsuper();\r\n\t}", "public Exception getException ()\n {\n return exception;\n }", "public ScheduleException() {\r\n }", "static void e() throws LowLevelException {\n throw new LowLevelException();\n }", "ThrowingEvent createThrowingEvent();", "GitletException() {\n super();\n }", "public TechnicalException() {\r\n }", "private void throwsError() throws OBException {\n }", "public void testAddException() {\r\n list.add(\"A\");\r\n Exception e = null;\r\n try {\r\n list.add(2, \"B\");\r\n } \r\n catch (Exception exception) {\r\n e = exception;\r\n }\r\n assertTrue(e instanceof IndexOutOfBoundsException);\r\n e = null;\r\n try {\r\n list.add(-1, \"B\");\r\n } \r\n catch (Exception exception) {\r\n e = exception;\r\n }\r\n assertTrue( e instanceof IndexOutOfBoundsException);\r\n }", "public void throwCustomException() throws Exception {\n\n\t\tthrow new Exception(\"Custom Error\");\n\t}", "public DeferConsultationException() {\n }", "public DataAccessorServiceException() {\n }", "public abstract void onException(Exception e);", "public void addException(Exception e ) {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Adding new Exception -> \"+ e);\n exception = e;\n }", "String getException();", "String getException();", "protected void connectionException(Exception exception) {}", "public ViaturaExistenteException(){\n super();\n }", "public ReaderException( String code ){ super(code); }", "public ResourceException(String reason, Exception exception) {\r\n super(reason, exception);\r\n }", "public void rethrowException(String exceptionName) throws Exception {\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "public ItemNotFoundException(String e){\r\n super(e+\" was not found!\");\r\n }", "public NotBoundException(){\n\t\t super();\n\t }", "protected abstract void onException(final Exception exception);", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "public SonsureException(IEnum e) {\n this(e.getCode(), e.getDesc());\n }", "@Test\n\tpublic void exception() {\n\t\t// ReactiveValue wraps all exceptions in CompletionException.\n\t\tCompletionException ce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new ArithmeticException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t\tassertThat(p.keys(), contains(\"key\"));\n\t\t// If we try to throw another exception second time around, we will still get the first one.\n\t\tce = assertThrows(CompletionException.class, () -> p.pin(\"key\", () -> {\n\t\t\tthrow new IllegalStateException();\n\t\t}));\n\t\tassertThat(ce.getCause(), instanceOf(ArithmeticException.class));\n\t}", "public WrappedException(Exception e) {\n super(e);\n }", "public LinkException() {\n }", "public void toss(Exception e);", "public void testGetException() {\r\n Exception exception = null;\r\n try {\r\n list.get(-1);\r\n } \r\n catch (Exception e) {\r\n exception = e;\r\n }\r\n assertTrue(exception instanceof IndexOutOfBoundsException);\r\n exception = null;\r\n list.add(\"A\");\r\n try {\r\n list.get(1);\r\n } \r\n catch (IndexOutOfBoundsException e) {\r\n exception = e;\r\n }\r\n assertTrue(exception instanceof IndexOutOfBoundsException);\r\n }", "public EtudiantDejaInscritExceptionHolder(Etudes.EtudiantDejaInscritException initial)\r\n {\r\n value = initial;\r\n }", "public SmppException(Exception e) {\n\t\tsuper(e);\n\t}", "public EmailException()\n {\n super();\n }", "void onException(Exception e);", "public abstract RuntimeException getException(String message);", "public ItemInvalidoException() {\r\n }", "public void testApplicationsManagerExceptionAccuracy2() throws Exception {\n Exception e = new Exception(\"error1\");\n ApplicationsManagerException ce = new ApplicationsManagerException(\"error2\", e);\n assertEquals(\"message is incorrect.\", \"error2\", ce.getMessage());\n assertEquals(\"cause is incorrect.\", e, ce.getCause());\n }", "public GameBuyException() {\n }", "TransactionContext setException(Exception exception);", "public Exception(String s) {\n\tsuper(s);\n }", "public CacheException() {\r\n\t\tsuper();\r\n\t}", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public PriceModelException() {\n\n }", "public EntityAlreadyExistsException() {\n\t\tsuper(\"exception.entity.already.exists\");\n\t}", "public PatchException() {\n super();\n }", "public ReferenciaNoDisponibleException() {\n }", "public EmployeeNotFoundException() {\n super();\n }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "ExceptionEvaluationCondition getException();", "public TwoDAReadException(String message, Throwable cause){ super(message, cause); }", "public RaiseException newIOErrorFromException(IOException ioe) {\n if(ioe.getMessage() != null) {\n if (ioe.getMessage().equals(\"Broken pipe\")) {\n throw newErrnoEPIPEError();\n } else if (ioe.getMessage().equals(\"Connection reset by peer\")) {\n throw newErrnoECONNRESETError();\n }\n return newRaiseException(getIOError(), ioe.getMessage());\n } else {\n return newRaiseException(getIOError(), \"IO Error\");\n }\n }", "public HttpException() {\n }", "public void testCtor_ProjectConfigurationException() {\n System.setProperty(\"exception\", \"ProjectConfigurationException\");\n try {\n new AddActionStateAction(state, activityGraph, manager);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n } finally {\n System.clearProperty(\"exception\");\n }\n }", "public interface RoutineException {}", "public ResourceTagNotAssignedException(Throwable cause) {\n\t\tsuper(cause);\n\t}", "public void rethrowException2(String exceptionName) throws FirstException, SecondException {//rethrow FirstException, SecondException\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\t//This analysis is disabled if the catch parameter is assigned to another value in the catch block.\n\t\t\t\t\t//e = new FirstException();//If you add this line, Compile Error: Unhandled exception type Exception\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "public VariableNotSetException() {\n }", "public DuplicateSensorException(){\n }", "public OfferingException() {\n }", "void throwEvents();" ]
[ "0.6504444", "0.6346679", "0.6311093", "0.6252535", "0.62460965", "0.62379915", "0.62139285", "0.61989814", "0.6183409", "0.6170829", "0.6110056", "0.60848784", "0.607145", "0.6061904", "0.6025821", "0.59857404", "0.5971979", "0.5923154", "0.5920583", "0.5886881", "0.5883142", "0.5883128", "0.5879203", "0.5871143", "0.5862791", "0.5862028", "0.58532435", "0.5836406", "0.5829349", "0.5824993", "0.5822853", "0.58224463", "0.5811264", "0.580747", "0.57724726", "0.5766471", "0.5738194", "0.57373047", "0.5731575", "0.5731464", "0.5730509", "0.57279164", "0.5724879", "0.5718887", "0.5718019", "0.57134545", "0.5709686", "0.57085776", "0.57051885", "0.5699431", "0.56938165", "0.56938165", "0.569137", "0.5688722", "0.5685503", "0.5685438", "0.5683043", "0.5671605", "0.5665255", "0.56555086", "0.56522626", "0.5650444", "0.5650108", "0.56312484", "0.5627361", "0.56232536", "0.562231", "0.5616234", "0.5613902", "0.5613782", "0.5610728", "0.56087947", "0.56062436", "0.5589996", "0.55847526", "0.557765", "0.5575728", "0.5572251", "0.55700564", "0.55700564", "0.55700564", "0.55700564", "0.55700564", "0.5561385", "0.5559129", "0.55561423", "0.55539525", "0.55487293", "0.5546585", "0.55431646", "0.55409175", "0.5538375", "0.5538067", "0.5533786", "0.5532716", "0.5529817", "0.552297", "0.5522929", "0.552263", "0.5519899", "0.5508816" ]
0.0
-1
Clear all pending values
public void clear() { synchronized (LOCK) { myValues.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\n values.clear();\n }", "private void clearTemporaryData() {\n\n numbers.stream().forEach(n -> {\n n.setPossibleValues(null);\n n.setUsedValues(null);\n });\n }", "@Override\n public void resetAllValues() {\n }", "private void clean() {\n aggregatedValues.clear();\n this.numMessageSent = 0;\n this.numMessageReceived = 0;\n }", "protected void resetValues() {\n synchronized (values) {\n values.removeAll(new ArrayList(values));\n }\n }", "public void clearAll();", "public void clearAll();", "private void clearData() {}", "public void clear() {\n\t\tif(this.values!=null){\n\t\t\tthis.values.clear();\n\t\t}\n\t}", "void reset()\n {\n reset(values);\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "private void reset() {\n\t\tdata.clear();\n\t}", "public void clear()\r\n {\r\n for (int i = 0; i < values.length; i++)\r\n keys[i] = null;\r\n size = 0;\r\n }", "void clearAll();", "void clearAll();", "private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}", "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "public final void clear() {\n for (int i = 0; i < _length; i++) {\n _data[i * SIZE + VALUE_OFFSET] = null;\n _algorithmData[i] = null;\n }\n _length = 0;\n }", "public void clear () {\n\t\treset();\n\t}", "public void clear() {\n\t\telements = 0;\n\t\tfor (int ix = 0; ix < keys.length; ix++) {\n\t\t\tkeys[ix] = null;\n\t\t\tvalues[ix] = null;\n\t\t}\n\t\tfreecells = values.length;\n\t\tmodCount++;\n\t}", "public void clear()\r\n {\r\n otherValueMap.clear();\r\n }", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public void clear() {\n this.data().clear();\n }", "public void clear()\r\n {\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public void clear()\n \t{\n \t\tint byteLength = getLengthInBytes();\n \t\tfor (int ix=0; ix < byteLength; ix++)\n value[ix] = 0;\n \t}", "public void reset() {\n _valueLoaded = false;\n _value = null;\n }", "public void clearAllData() {\n atoms.clear();\n connections.clear();\n lines.clear();\n radical = null;\n }", "public void clearData()\r\n {\r\n \r\n }", "private void clear() {\n }", "public void clear() {\n\t\tstate = null;\n\t}", "public final void resetAll() {\r\n this._queue = null;\r\n this._delayed = null;\r\n }", "@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}", "protected void clearData() {\n getValues().clear();\n getChildIds().clear();\n getBTreeMetaData().setDirty(this);\n }", "public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvarianceS.set(0);\n\t}", "public void clear(){\n\t\tclear(0);\n\t}", "private void clearAll( )\n {\n for( Vertex v : vertexMap.values( ) )\n v.reset( );\n }", "public synchronized void clear()\n {\n clear(false);\n }", "public void resetAll() {\n reset(getAll());\n }", "public void clear()\r\n {\r\n result = null;\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n resultDoubles = null;\r\n }", "protected void clearAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.clearBitAt(i);\n } \t\n }", "public void clear()\n\t{\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = 0;\n\t\t}\n\t}", "public void clear(){\r\n\t\tsummary \t= null;\r\n\t\tstart\t\t= 0;\r\n\t\tend\t\t\t= 0;\r\n\t\tlocation\t= null;\r\n\t\talarm\t\t= 0;\r\n\t\tnote\t\t= null;\r\n\t\tallDay\t\t= false;\r\n\t\tattendees\t= null;\r\n\t\tfree_busy\t= FB_FREE;\r\n\t\tevent_class\t= CLASS_PRIVATE;\r\n\t\trepeat_type\t= \"\";\r\n\t}", "public void clear() {\n\t\tn1 = n0 = 0L;\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "void clear() {\n this.mapped_vms.clear();\n this.mapped_anti_coloc_job_ids.clear();\n this.used_cpu = BigInteger.ZERO;\n this.used_mem = BigInteger.ZERO;\n }", "public void clear() {\n _sample.clear();\n _count = 0;\n _max = null;\n _min = null;\n _sum = BigDecimal.ZERO;\n _m = -1;\n _s = 0;\n }", "public void clear() {\n\t\t\r\n\t}", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "void clearData();", "protected abstract void clearAll();", "@Override\n public synchronized void clear() {\n }", "protected void clear() {\r\n setValue(getDefault());\r\n }", "public void clearData(){\n\r\n\t}", "@Override\n\t\t\tpublic void clear() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void clear() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void clear() {\n\t\t\r\n\t}", "public synchronized void resetMemoryValues() {\n memoryValues = null;\n }", "public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}", "@Override\n\tpublic void clear() {\n\n\t\tDisplay.findDisplay(uiThread).syncExec(new Runnable() {\n\n\t\t\tpublic void run() {\n\t\t\t\tclearInputs();\n\t\t\t\tsetDefaultValues();\n\t\t\t}\n\t\t});\n\n\t}", "public void clear() {\n this.atoms.clear();\n this.bonds.clear();\n this.finished = false;\n }", "@Override\n public void clear() {\n \n }", "public void opbClearState() {\r\n final String methodName = \"opbClearState()\";\r\n\r\n logger.entering(CLASS_NAME, methodName);\r\n\r\n // set all fields to their initial values\r\n a = null;\r\n aDataSourceValue = null;\r\n\r\n aVarchar = null;\r\n aVarcharDataSourceValue = null;\r\n\r\n aNumber = null;\r\n aNumberDataSourceValue = null;\r\n\r\n aInteger = 8L;\r\n aIntegerDataSourceValue = 8L;\r\n\r\n aDate = null;\r\n aDateDataSourceValue = null;\r\n\r\n aRo = null;\r\n\r\n\r\n }", "public void clear() {\n count = 0;\n }", "public void clear() \r\n\t{\r\n\t\ttotal = 0;\r\n\t\thistory = \"\";\r\n\t}", "public void clearData() {\r\n\t\tdata = null;\r\n\t}" ]
[ "0.7870697", "0.7760746", "0.77066165", "0.7427396", "0.7420087", "0.7403553", "0.7403553", "0.73887455", "0.7363386", "0.73512363", "0.73506874", "0.73506874", "0.7348205", "0.7326617", "0.73145086", "0.73145086", "0.7281084", "0.72516906", "0.72352856", "0.7226716", "0.72069055", "0.7205753", "0.72037375", "0.72025657", "0.71946496", "0.71919614", "0.7189233", "0.7170746", "0.7170221", "0.71697605", "0.7164969", "0.71643114", "0.71535957", "0.71531004", "0.71409243", "0.71398693", "0.713599", "0.7133691", "0.7117442", "0.7116744", "0.7113335", "0.71050674", "0.7103236", "0.7100692", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.7087711", "0.70843285", "0.70799834", "0.707764", "0.7072955", "0.70558786", "0.70511234", "0.7045355", "0.70288396", "0.70287997", "0.70181775", "0.70177764", "0.70177764", "0.7017406", "0.70139074", "0.7012228", "0.70032865", "0.69916105", "0.6989971", "0.6976536", "0.69761705", "0.69671744", "0.69599444" ]
0.76875746
3
display only, no action here
@Override @PayloadMeta(Payload.class) @InboundActionMeta(name = "top") public void handleInbound(Context ctx) throws ServletException, IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void display() {\n\r\n\t}", "@Override\r\n\tpublic void display() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display() {\n\t\t\r\n\t}", "@Override\n\tpublic void display() {\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\t\t\n\t}", "@Override\n\tpublic void display() {\n\n\t}", "@Override\n\tpublic void display() {\n\n\t}", "@Override\n\tpublic void display() {\n\n\t}", "@Override\r\n\tpublic void display() {\n\r\n\t}", "public void display() {\n\t\t\n\t}", "public void display() {\n\t\t\n\t}", "public void display()\r\n\t{\r\n\t\t\r\n\t}", "public void display() {\n\t\tSystem.out.println(\"none static display() called\");\n\t}", "public void display() {\n\t}", "@Override\n public void display() {\n\n }", "@Override\n public void display() {\n display.display();\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "abstract public void display();", "public abstract void display();", "public abstract void display();", "boolean isDisplay();", "boolean isDisplay();", "protected abstract String display();", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t}", "public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"콘텐츠화면이 출력되었습니다\");\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "public void display() {\n\t\tSystem.out.println(\"display..\");\n\t}", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Displaying...\");\r\n\t}", "public boolean getNoDisplay() {\n\t\treturn false;\n\t}", "public void display();", "public void display();", "public void show() {\n\t\thidden = false;\n\t}", "@Override\r\n\tpublic void show() {\n\t}", "public void onDisplay() {\n\n\t}", "@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic String display() {\n\t\treturn null;\n\t}", "public void show() {\n hidden = false;\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "@Override\r\n public void show()\r\n {\r\n\r\n }", "public void display() {\n\t\tSystem.out.println(\"do something...\");\n\t}", "public abstract String display();", "private void handle_mode_display() {\n\t\t\t\n\t\t}", "public void redisplay();", "public static void show() {\n\t\t\n\t}", "@java.lang.Override\n public boolean hasDisplay() {\n return display_ != null;\n }", "@Override\n\tpublic void render() {\n\t\t// only render it when visible is true\n\t\tif (visible == false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tsuper.render();\n\t\t}\n\t}", "@Override\r\n\tpublic void display() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"Im a mallard Duck!\");\r\n\t}", "@Override\n public void show() {\n }", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "public void show()\r\n {\r\n\tshow(\"\");\r\n }", "public void display() {\r\n\t\tsetVisible(true);\r\n\t}", "@Override\r\n\tpublic Media display() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic int display() {\n\t\treturn 0;\n\t}", "public void display() {\n startPreview();\n }", "public boolean shown();", "public abstract void displayInfo();", "@Override\n\tpublic void show4() {\n\t\t\n\t}", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "public Boolean getDisplay() {\n return display;\n }", "@Override\n\tpublic void shown() {\n\n\t}", "void display();", "void display();", "void display();", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}", "public void show() {\r\n show(\"\");\r\n }", "@Override\n\t\tpublic void displayMessage() {\n\t\t\tsuper.displayMessage();\n\t\t}", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }" ]
[ "0.7852362", "0.773682", "0.773682", "0.7619379", "0.7619379", "0.75740147", "0.75740147", "0.75740147", "0.753076", "0.75264543", "0.75264543", "0.7427898", "0.7427064", "0.7348186", "0.73443806", "0.7239367", "0.70900774", "0.708816", "0.70718706", "0.70718706", "0.7057832", "0.7057832", "0.70218325", "0.7021482", "0.7021482", "0.7021482", "0.6981906", "0.6974433", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6960608", "0.6941768", "0.69245833", "0.69081587", "0.6900598", "0.6900598", "0.68701416", "0.68675464", "0.6857402", "0.6849414", "0.6849414", "0.6819714", "0.6819714", "0.68039995", "0.68039995", "0.68039995", "0.68039995", "0.68039995", "0.68039995", "0.68039995", "0.68039995", "0.6799583", "0.6799583", "0.67768973", "0.67604864", "0.6754795", "0.6754795", "0.67311656", "0.6687581", "0.66828734", "0.6680924", "0.6678852", "0.66732603", "0.6668463", "0.6663942", "0.6662701", "0.6648323", "0.6648323", "0.66384184", "0.6626386", "0.66258186", "0.6623455", "0.660555", "0.6603556", "0.65721786", "0.6571794", "0.6564039", "0.65400034", "0.65400034", "0.6530455", "0.6518499", "0.65083987", "0.65083987", "0.65083987", "0.6505677", "0.649723", "0.64960915", "0.64883226", "0.6476142" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean save() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean delete() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
/ To find out the precedence, we take the index of the token in the ops string and divide by 2 (rounding down). This will give us: 0, 0, 1, 1, 2
static String infixToPostfix(String infix) { final String ops = "-+/*^"; StringBuilder sb = new StringBuilder(); Stack<Integer> s = new Stack<>(); for (String token : infix.split("\\s")) { if (token.isEmpty()) continue; char c = token.charAt(0); int idx = ops.indexOf(c); // check for operator if (idx != -1) { if (s.isEmpty()) s.push(idx); else { while (!s.isEmpty()) { int prec2 = s.peek() / 2; int prec1 = idx / 2; if (prec2 > prec1 || (prec2 == prec1 && c != '^')) sb.append(ops.charAt(s.pop())).append(' '); else break; } s.push(idx); } } else if (c == '(') { s.push(-2); // -2 stands for '(' } else if (c == ')') { // until '(' on stack, pop operators. while (s.peek() != -2) sb.append(ops.charAt(s.pop())).append(' '); s.pop(); } else { sb.append(token).append(' '); } } while (!s.isEmpty()) sb.append(ops.charAt(s.pop())).append(' '); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getPrecedence(char operator)\r\n\t{\r\n\t\tswitch (operator)\r\n\t\t{\r\n\t\tcase '(': case ')': return 0;\r\n\t\tcase '+': case '-': return 1;\r\n\t\tcase '*': case '/': return 2;\r\n\t\tcase '^':\t\t\treturn 3;\r\n\t\tcase '.': return 4;\r\n\t\t} // end switch\r\n\r\n\t\treturn -1;\r\n\t\t\r\n\t}", "public int score(String ops[]) {\n int result = 0;\n\n Deque<Integer> stack = new ArrayDeque<>();\n\n for (String op : ops) {\n if (\"+\".equals(op)) {\n int prev1 = stack.pop();\n int prev2 = stack.peek();\n\n stack.push(prev1);\n stack.push(prev1 + prev2);\n } else if (\"D\".equals(op)) {\n int prev1 = stack.peek();\n stack.push(prev1 * prev1);\n } else if (\"C\".equals(op)) {\n stack.pop();\n } else {\n stack.push(Integer.parseInt(op));\n }\n }\n\n System.out.println(stack);\n\n while (!stack.isEmpty()) {\n result += stack.pop();\n }\n\n return result;\n }", "public int getPrecedence(char operator) {\n switch (operator) {\n case '+':\n case '-':\n return 1;\n case '*':\n case '/':\n return 2;\n case '^':\n return 3;\n }\n\n return -1;\n }", "@Override\n public int precedence() {\n return op.precedence();\n }", "public int precedence(String c){\n if(c.equals(\"+\")) return 1;\r\n if(c.equals(\"-\")) return 1;\r\n if(c.equals(\"*\")) return 2;\r\n if(c.equals(\"/\")) return 2;\r\n return -1;\r\n }", "private static int precedence(Element element1, Element element2) {\r\n\t\tif (element1.isLeftParenthesis()) {\r\n\t\t\treturn 2;\r\n\t\t}\r\n\t\tif (element1.isPlusSign() || element1.isMinusSign()) {\r\n\t\t\tif (element2.isTimesSign() || element2.isDividedBySign()) {\r\n\t\t\t\treturn 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "abstract public int getPrecedence();", "public int precedence(String c){\n if(c.equals(\"+\")) return 1;\n if(c.equals(\"-\")) return 1;\n if(c.equals(\"*\")) return 2;\n if(c.equals(\"/\")) return 2;\n return -1;\n }", "public abstract int getPrecedence();", "public static int calculate2(String s) {\n\t\tStack<Character> operators = new Stack<Character>();\n\t\tStack<Integer> operands = new Stack<Integer>();\n\t\t\n\t\tList<String> tokens = tokenize(s);\n\t\tfor (String token : tokens) {\n\t\t\ttoken = token.trim();\n\t\t\tif (!Character.isDigit(token.charAt(0))) {\n\t\t\t\tchar op = token.charAt(0);\n\t\t\t\tif (op == '+' || op == '-' || op == '*' || op == '/') {\n\t\t\t\t\twhile (!operators.empty() && priority(op) <= priority(operators.peek()))\n\t\t\t\t\t\teval(operators.pop(), operands);\n\t\t\t\t\toperators.push(op);\n\t\t\t\t} else if (op == '(')\n\t\t\t\t\toperators.push(op);\n\t\t\t\telse {\n\t\t\t\t\twhile (!operators.empty()) {\n\t\t\t\t\t\tchar tmp = operators.pop();\n\t\t\t\t\t\tif (tmp == '(')\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\teval(tmp, operands);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\toperands.push(Integer.parseInt(token));\n\t\t}\n\t\twhile(! operators.empty())\n\t\t\teval(operators.pop(), operands);\n\t\treturn operands.pop();\n\t}", "public int getPrecedence() {\n switch (operator) {\n case AND:\n return 2;\n case OR:\n default:\n return 1;\n }\n }", "private static int precedence(char c) {\n if (c == '-' || c == '+') {\n return 1;\n } else if (c == '*' || c == '/') {\n return 2;\n }\n return -1;\n }", "private static Integer getPrecedence(Character c) {\n Integer precedence = operatorMap.get(c);\n return precedence == null ? 6 : precedence;\n }", "private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "private int precedenceOf(char x) {\n final int EXPONENT_PRECEDENCE = 2;\n final int MULTIPLY_PRECEDENCE = 1;\n final int ADDITION_PRECEDENCE = 0;\n\n int precedence = -1;\n if (x == '^') precedence = EXPONENT_PRECEDENCE;\n if (x == '*' || x == '/') precedence = MULTIPLY_PRECEDENCE;\n if (x == '+' || x == '-') precedence = ADDITION_PRECEDENCE;\n return precedence;\n }", "@Override\n public int precedence() {\n return 2;\n }", "@Override\n public int precedence() {\n return 2;\n }", "public String getOperator()\r\n\t{\r\n\t\tSystem.out.println(\"Choose the any operation from the following operations:\");\r\n System.out.println(\"1.+\");\r\n System.out.println(\"2.-\");\r\n System.out.println(\"3.*\");\r\n System.out.println(\"4./\");\r\n \r\n\t\tString op=sc.next();\r\n\t\treturn op;\r\n\t}", "public int calculate_2(String s) {\n if ((s == null) || (s.length() == 0)) return 0;\n int i = 0;\n int j = 0;\n s = s.replace(\" \", \"\");\n String val = \"\";\n boolean ifStop = true;\n while (i < s.length()) {\n if ((s.charAt(i) == '+') || (s.charAt(i) == '-') || (s.charAt(i) == '*')\n || (s.charAt(i) == '/')) {\n j = i;\n ifStop = false;\n break;\n } else {\n val = val + s.charAt(i);\n }\n i++;\n }\n if (ifStop) return Integer.parseInt(val);\n while (j < s.length()) {\n char op = s.charAt(j);\n if (op == ' ') {\n j++;\n continue;\n }\n if ((op == '+') || (op == '-')) {\n int nextOperator = calculate(s.substring(j + 1, s.length()));\n // System.out.println(nextOperator);\n if (op == '+') return (Integer.parseInt(val) + nextOperator);\n else if (op == '-') return (Integer.parseInt(val) - nextOperator);\n j++;\n } else {\n i = j + 1;\n String anotherval = \"\";\n ifStop = true;\n while (i < s.length()) {\n if ((s.charAt(i) == '+') || (s.charAt(i) == '-') || (s.charAt(i) == '*')\n || (s.charAt(i) == '/')) {\n j = i;\n ifStop = false;\n break;\n } else {\n anotherval = anotherval + s.charAt(i);\n }\n i++;\n }\n if (op == '*')\n val = Integer.parseInt(val) * Integer.parseInt(anotherval) + \"\";\n else if (op == '/')\n val = Integer.parseInt(val) / Integer.parseInt(anotherval) + \"\";\n\n if (ifStop)\n return Integer.parseInt(val);\n }\n }\n return Integer.parseInt(val);\n }", "public int operation(int number1,int number2,String operator)", "public void convertInfixToPostfix() {\n\t\t// Create operator stack\n\t\tStack<String> op_stack = new Stack<String>();\n\n\t\t// Prepare the input string\n\t\tprepareInput();\n\t\t\n\t\t// Split the expression \n\t\tString[] tokens = input.split(\"(?<=[^\\\\.a-zA-Z\\\\d])|(?=[^\\\\.a-zA-Z\\\\d])\");\n\t\t\n\t\t//For each token\n\t\tfor (String t : tokens) {\n\t\t\t// If the token is empty, skip it\n\t\t\tif(t.equals(\"\") || t.equals(\" \")) continue;\n\t\t\t\n\t\t\t// If operator (o1)\n\t\t\tif (Operator.isOperator(t)) {\n\n\t\t\t\t// While there is an operator (o2) an the stack and\n\t\t\t\t// (o1 is left associative AND o2 precedence is higher or equal to o1 precedence)\n\t\t\t\t// OR\n\t\t\t\t// (o1 is right associative AND o2 precedence is higher than o1 precedence)\n\t\t\t\twhile (!op_stack.empty()\n\t\t\t\t\t\t&& Operator.isOperator(op_stack.peek())\n\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.LEFT) && Operator.comparePrec(op_stack.peek(), t) >= 0) \n\t\t\t\t\t\t\t|| \n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.RIGHT) && Operator.comparePrec(op_stack.peek(), t) > 0)\n\t\t\t\t\t\t )\n\t\t\t\t ) \n\t\t\t\t{\n\t\t\t\t\t// add o2 to the output\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Push o1 on to the stack.\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\"(\")) {\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\")\")) {\n\t\t\t\t// While there is not a left parenthesis, add the top token from the stack to the output\n\t\t\t\twhile (!op_stack.peek().equals(\"(\")) {\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\n\t\t\t\t// Pop out the left parenthesis\n\t\t\t\top_stack.pop();\n\t\t\t\t\n\t\t\t\t// While there is a function on the top of the stack, add it to the output\n\t\t\t\tif(!op_stack.empty() && Function.isFunction(op_stack.peek())) output.add(op_stack.pop());\n\t\t\t}\n\t\t\telse if(Function.isFunction(t)){\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\t\t\telse if(isNumeric(t) || isVariable(t)){\n\t\t\t\toutput.add(t);\n\t\t\t}\n\t\t}\n\n\t\t// Finally empty the stack, by adding all remaining tokens to the output.\n\t\twhile (!op_stack.empty()) {\n\t\t\toutput.add(op_stack.pop());\n\t\t}\n\t}", "protected void operation(String op) {\n \tint value;\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tint second = stack.pop();\n \t // handles when only one value in stack\n \t\tif (stack.empty()) {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tstack.push(second);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tcurrent = second *-1;\n \t\t\t\tstack.push(current);\n \t\t\t\tshow(stack.peek());\n \t\t\t\tcurrent = 0;\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t}\n \t // handles the other cases\n \t\telse {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tvalue = second + stack.pop();\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tvalue = stack.pop() - second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tvalue = stack.pop() * second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tvalue = stack.pop() / second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t}\n \t}\n }", "static BinaryOperator<SibillaValue> getOperator(String op) {\n if (op.equals(\"+\")) {return SibillaValue::sum;}\n if (op.equals(\"-\")) {return SibillaValue::sub; }\n if (op.equals(\"%\")) {return SibillaValue::mod; }\n if (op.equals(\"*\")) {return SibillaValue::mul; }\n if (op.equals(\"/\")) {return SibillaValue::div; }\n if (op.equals(\"//\")) {return SibillaValue::zeroDiv; }\n return (x,y) -> SibillaValue.ERROR_VALUE;\n }", "protected static int calculateTwoTokens(String[] tokens) throws NumberFormatException, CalculatorException\n {\n int a = Integer.parseInt(tokens[1]); // Throws NumberFormatException if the second token is not an int value.\n \n \tif (tokens[0] == \"negate\") {\n \t\ta=-a;\n \t\treturn a;\n \t}\n \tif (tokens[0] == \"halve\") {\n \t\ta = Math.round(a/2);\n \t\treturn a;\n \t}\n \n \telse {\n \n throw new CalculatorException (\"Illegal Command\");\n }\n \n }", "public int getPriority(char operator){\n switch(operator){\n case '^':\n return 3;\n case '*':\n case '/':\n return 2;\n case '+':\n case '-':\n return 1;\n }\n\n return 0;\n }", "@Override\n public int precedence() {\n return 1;\n }", "@Override\n public int precedence() {\n return 1;\n }", "@Override public int precedence() {\n return precedence;\n }", "public static String getrp(String s){\n char[] arr = s.toCharArray();\n int len = arr.length;\n String out = \"\";\n\n for(int i = 0; i < len; i++){\n char ch = arr[i];\n if(ch == ' ') continue;\n\n // if is operand, add to\n // the output stream directly\n if(ch >= '0' && ch <= '9') {\n out+=ch;\n continue;\n }\n\n //if is '(', push to the stack directly\n if(ch == '(') op.push(ch);\n\n //if is '+' or '-', pop the operator\n // from the stack until '(' and add to\n // the output stream\n //push the operator to the stack\n if(ch == '+' || ch == '-'){\n while(!op.empty() && (op.peek() != '('))\n out+=op.pop();\n op.push(ch);\n continue;\n }\n\n //if is '*' or '/', pop the operator stack and\n // add to the output stream\n // until lower priority or '('\n //push the operator to the stack\n if(ch == '*' || ch == '/'){\n while(!op.empty() && (op.peek() == '*' || op.peek() == '/'))\n out+=op.pop();\n op.push(ch);\n continue;\n }\n\n //if is ')' pop the operator stack and\n // add to the output stream until '(',\n // pop '('\n if(ch == ')'){\n while(!op.empty() && op.peek() != '(')\n out += op.pop();\n op.pop();\n continue;\n }\n }\n while(!op.empty()) out += op.pop();\n return out;\n }", "public int eval(String expression) {\n String token;\n // The 3rd argument is true to indicate that the delimiters should be used\n // as tokens, too. \n this.tokenizer = new StringTokenizer(expression, DELIMITERS, true);\n\n //initialized with # operator, used as bogus to compare priorities and detect end of operatorStack.\n operatorStack.push(new PoundOperator());\n\n //Checks whether there are more tokens to be pushed in stacks\n while (this.tokenizer.hasMoreTokens()) {\n // filter out spaces\n if (!(token = this.tokenizer.nextToken()).equals(\" \")) {\n // check if token is an operand\n if (Operand.check(token)) {\n operandStack.push(new Operand(token));\n\n } else {\n if (!Operator.check(token)) {\n System.out.println(\"*****invalid token******\");\n System.exit(1);\n }\n\n //Gets a newOperator it matches from hashmap.\n Operator newOperator = Operator.getToken(token);\n\n //Processes only, when there is greater priority in stack and there are no '('\n while (operatorStack.peek().priority() >= newOperator.priority() && !newOperator.equals(Operator.getToken(\"(\"))) {\n\n //If the token read is ), then there is already '(' which is inserted in the operator stack.\n if (token.equals(\")\")) {\n //Perform until, the '(' is on top of the stack.\n while (!operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n\n }\n\n //If '(' found on top, pop and break, to continue to read more takens\n if (operatorStack.peek().equals(Operator.getToken(\"(\"))) {\n operatorStack.pop();\n break;\n }\n\n } \n //if ')' not found, it means either its in '(' or there are no parenthesis\n else {\n Operator oldOpr = operatorStack.pop();\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n }\n }\n //Pushes the operator, when the operator!=')'\n if (!newOperator.equals(Operator.getToken(\")\"))) {\n operatorStack.push(newOperator);\n }\n }\n }\n }\n // No more tokens to be read. All the tokens are in stacks, gets processed.\n if (!this.tokenizer.hasMoreTokens()) {\n //Keeps processing, until it reaches #\n while (operatorStack.size() != 1) {\n Operator oldOpr = operatorStack.pop();\n //Checks if there are operand left to be used,\n if (!operandStack.empty()) {\n Operand op2 = operandStack.pop();\n Operand op1 = operandStack.pop();\n operandStack.push(oldOpr.execute(op1, op2));\n } else {\n System.exit(1);\n }\n }\n }\n // Returns, the final result\n return operandStack.pop().getValue();\n }", "public int evalRPN(String[] tokens) {\n\n\t\tStack<String> stack = new Stack<String>();\n\n\t\tString operators = \"+-*/\";\n\n\t\tint result = 0;\n\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\n\t\t\tif (tokens[i].equals(\"+\") || tokens[i].equals(\"*\")\n\t\t\t\t\t|| tokens[i].equals(\"-\") || tokens[i].equals(\"/\")) {\n\t\t\t\tint a = Integer.valueOf(stack.pop());\n\t\t\t\tint b = Integer.valueOf(stack.pop());\n\n\t\t\t\tint index = operators.indexOf(tokens[i]);\n\n\t\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\n\t\t\t\t\tstack.push(String.valueOf(b / a));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\n\t\t\t\tstack.push(tokens[i]);\n\t\t\t}\n\n\t\t}\n\t\tresult = Integer.valueOf(stack.pop());\n\n\t\treturn result;\n\t}", "public String operator( String op);", "public static int getOperatorPrecedence(Tree.Kind kind) {\n switch (kind) {\n case AND:\n return BITWISE_AND;\n case BITWISE_COMPLEMENT:\n return UNARY;\n case CONDITIONAL_AND:\n return LOGICAL_AND;\n case CONDITIONAL_EXPRESSION:\n return TERNARY;\n case CONDITIONAL_OR:\n return LOGICAL_OR;\n case DIVIDE:\n return MULTIPLICATIVE;\n case EQUAL_TO:\n return EQUALITY;\n case GREATER_THAN:\n return RATIONAL;\n case INSTANCE_OF:\n return RATIONAL;\n case LEFT_SHIFT:\n return SHIFT;\n case LESS_THAN:\n return RATIONAL;\n case LESS_THAN_EQUAL:\n return RATIONAL;\n case LOGICAL_COMPLEMENT:\n return UNARY;\n case MINUS:\n return ADDITIVE;\n case MULTIPLY:\n return MULTIPLICATIVE;\n case NOT_EQUAL_TO:\n return EQUALITY;\n case OR:\n return BITWISE_INCLUSIVE_OR;\n case PLUS:\n return ADDITIVE;\n case POSTFIX_DECREMENT:\n return POSTFIX;\n case POSTFIX_INCREMENT:\n return POSTFIX;\n case PREFIX_DECREMENT:\n return UNARY;\n case PREFIX_INCREMENT:\n return UNARY;\n case REMAINDER:\n return MULTIPLICATIVE;\n case RIGHT_SHIFT:\n return SHIFT;\n case UNARY_MINUS:\n return UNARY;\n case UNARY_PLUS:\n return UNARY;\n case UNSIGNED_RIGHT_SHIFT:\n return SHIFT;\n case XOR:\n return BITWISE_EXCLUSIVE_OR;\n default:\n return 14;\n }\n }", "private void processOperator(String operator){\n if (numStack.size() <2){\n System.out.println(\"Stack underflow.\");\n }\n else if (dividingByZero(operator)){\n System.out.println(\"Divide by 0.\"); \n }\n else{\n int num1 = numStack.pop();\n int num2 = numStack.pop();\n int result = performCalculation(num1, num2, operator);\n numStack.push(result);\n }\n\n }", "String getOp();", "String getOp();", "String getOp();", "public static boolean precedenceOrder(char op1, char op2) {\n\t\t\n\t\tif (op2 == '(' || op2 == ')')\n\t\t\treturn false;\n\t\t// if the second operator is a + or - than it does not get higher precendence\n\t\t// over the * and /\n\t\tif ((op1 == '*' || op1 == '/') && (op2 == '+' || op2 == '-'))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "private static int getOperandImportance(char operand)\r\n {\r\n int result = 0;\r\n switch(operand)\r\n {\r\n case '+':case '-':\r\n result = 1;\r\n break;\r\n case '*':case '/':\r\n result = 2;\r\n break;\r\n case '^':\r\n result = 3;\r\n }\r\n return result;\r\n }", "public static String[] convertToPos(String[] string) {\n\n\t\tHashMap<String, Integer> operator = new HashMap<String, Integer>();\n\t\toperator.put(\"*\", 2);\n\t\toperator.put(\"/\", 2);\n\t\toperator.put(\"+\", 1);\n\t\toperator.put(\"-\", 1);\n\t\toperator.put(\"(\", 3);\n\t\toperator.put(\")\", 0);\n\n\t\tStack<String> evaluationStack = new Stack<String>();\n\t\tStack<String> operatorStack = new Stack<String>();\n\n\t\tfor (int i = 0; i < string.length; i++) {\n\t\t\tif (!(operator.containsKey(string[i]))) {\n\t\t\t\tevaluationStack.push(string[i]);\n\t\t\t} else {\n\t\t\t\tint precedence = operator.get(string[i]);\n\t\t\t\tif (!operatorStack.isEmpty()) {\n\t\t\t\t\tif (operator.get(operatorStack.peek()) >= precedence) {\n\t\t\t\t\t\tif (!(operatorStack.peek().equals(\"(\") || operatorStack.peek().equals(\")\") || operatorStack.peek().equals(\"(\")))\n\t\t\t\t\t\t\tevaluationStack.push(operatorStack.pop());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toperatorStack.push(string[i]);\n\t\t\t}\n\t\t}\n\n\t\twhile (!operatorStack.isEmpty()) {\n\t\t\tif (!((operatorStack.peek().equals(\")\") || operatorStack.peek().equals(\"(\")))) {\n\t\t\t\tevaluationStack.push(operatorStack.pop());\n\t\t\t} else {\n\t\t\t\toperatorStack.pop();\n\t\t\t}\n\t\t}\n\t\t\n\t\tString str[] = new String[evaluationStack.size()];\n\n\t\tint c = str.length - 1;\n\t\twhile (!evaluationStack.isEmpty()) {\n\t\t\tstr[c] = evaluationStack.pop();\n\t\t\tc--;\n\t\t}\n\n\t\treturn str;\n\n\t}", "protected Evaluable parseTerm() throws ParsingException {\n Evaluable factor = parseFactor();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \"*/%\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable factor2 = parseFactor();\n\n factor = new OperatorCallExpr(new Evaluable[] { factor, factor2 }, op);\n }\n\n return factor;\n }", "private static boolean checkPrecedence(String operator1, String operator2){\n\n\t\tif((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "private int findExpression(List<Operator> ops, int offset, int length) {\n \n Operator op = ops.get(offset);\n if (op instanceof BinaryOperator) {\n \n // Invalid\n throw new RuntimeException(\"Expression must not start with binary operator\");\n } else if (op instanceof UnaryOperator) {\n \n // Just a unary operator\n return 1;\n \n } else if (op instanceof PrecedenceOperator) {\n \n PrecedenceOperator pop = (PrecedenceOperator)op;\n \n if (!pop.begin) {\n \n // Invalid\n throw new RuntimeException(\"Invalid paranthesis\");\n \n } else {\n \n // Find closing bracket\n int open = 1;\n for (int i=offset+1; i<length; i++){\n if (ops.get(i) instanceof PrecedenceOperator){\n pop = (PrecedenceOperator)ops.get(i);\n if (pop.begin) open++;\n else open--;\n if (open == 0){\n return i-offset+1;\n }\n }\n }\n // Invalid\n throw new RuntimeException(\"Missing closing paranthesis\");\n }\n } else {\n \n // Invalid\n throw new RuntimeException(\"Unknown operator\");\n }\n }", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }", "protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }", "private int operation(int b, char op, int a) {\n switch (op) {\n case '+': return a + b;\n case '-': return a - b;\n case '*': return a * b;\n case '/': return a / b; //assume b is not 0\n }\n return 0;\n }", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "public static int applyOp(char op, int b, int a)\n {\n switch (op)\n {\n case '+':\n return a + b;\n case '-':\n return a - b;\n case '*':\n return a * b;\n case '/':\n if (b == 0)\n throw new\n UnsupportedOperationException(\"Cannot divide by zero\");\n return a / b;\n }\n return 0;\n }", "private int eval(ExpressionNodes root)\n\t {\n\t \tif (root.right == null && root.left == null) \n\t \t{\n\t \t\t\tint leaf = Integer.parseInt(root.data);\n\t \t\t\treturn leaf; \n\t \t}\n\t \t\n\t \t// if the node is an operator // \n\t \telse \n\t \t{\n\t \t\t\tint op1 = eval(root.left); \n\t \t\t\tint op2 = eval(root.right);\n\t \n\t \t\n\t\t\t \tString operator = root.data; // initialize operator string \n\t\t\t \tint n = 0; // initialize the integer that will be returned \n\t\t\t \t\n\t\t\t \t// switch case to conduct for the different operators \n\t\t\t \tswitch(operator) \n\t\t\t \t{\n\t\t\t\t case \"+\":\n\t\t\t\t \tn = op1 + op2; \n\t\t\t\t \tbreak;\n\t\t\t\t \t\n\t\t\t\t case \"-\":\n\t\t\t\t n = op1 - op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"*\":\n\t\t\t\t n = op1 * op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"/\":\n\t\t\t\t n = op1 / op2; \n\t\t\t\t break;\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \treturn n; \n\t \t}\n\t\t\t\n\t }", "java.lang.String getOperator();", "public int evalusteReversePolishNotation(String[] tokens) {\n\t\tif (tokens == null || tokens.length == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tStack<Integer> stack = new Stack<>();\n\t\tfor (String token: tokens) {\n\t\t\tif (token.equals(\"+\")) { // be care cannot use ==\n\t\t\t\tstack.push(stack.pop() + stack.pop());\n\t\t\t}\n\t\t\telse if (token.equals(\"-\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tstack.push(a - b);\n\t\t\t}\n\t\t\telse if (token.equals(\"*\")) {\n\t\t\t\tstack.push(stack.pop() * stack.pop());\n\t\t\t}\n\t\t\telse if (token.equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tstack.push(a / b);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstack.push(Integer.valueOf(token));\n\t\t\t}\n\t\t}\n\t\treturn stack.pop();\n\t}", "@Test\r\n\tpublic void testParseOperator() {\r\n\r\n\t\t// find the number of operators in the input\r\n\r\n\t\tint add = 0;\r\n\t\tint minus = 0;\r\n\t\tint multiply = 0;\r\n\t\tint divide = 0;\r\n\t\tString input = \"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\";\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) == '+')\r\n\t\t\t\tadd++;\r\n\t\t\tif (input.charAt(i) == '-')\r\n\t\t\t\tminus++;\r\n\t\t\tif (input.charAt(i) == '*')\r\n\t\t\t\tmultiply++;\r\n\t\t\tif (input.charAt(i) == '/')\r\n\t\t\t\tdivide++;\r\n\t\t}\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(input);\r\n\r\n\t\t// Look for the \"Parse\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(1).click();\r\n\r\n\t\t// Check that there contains corresponding quantity of operators\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint add1 = 0, minus1 = 0, multiply1 = 0, divide1 = 0;\r\n\t\t\tfor (int i = 0; i < res.length(); i++) {\r\n\t\t\t\tif (res.charAt(i) == '+')\r\n\t\t\t\t\tadd1++;\r\n\t\t\t\tif (res.charAt(i) == '-')\r\n\t\t\t\t\tminus1++;\r\n\t\t\t\tif (res.charAt(i) == '*')\r\n\t\t\t\t\tmultiply1++;\r\n\t\t\t\tif (res.charAt(i) == '/')\r\n\t\t\t\t\tdivide1++;\r\n\t\t\t}\r\n\t\t\tassertEquals(add, add1);\r\n\t\t\tassertEquals(minus, minus1);\r\n\t\t\tassertEquals(multiply, multiply1);\r\n\t\t\tassertEquals(divide, divide1);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "operations(StringBuilder input, int currentMode)\n\t{\n\t\t\n\t\tchar tempVal = ' ';\n\t\t\n\t\tif(isPair(input) == true) {\n\t\t\t\n\t\t\t// determining which mode the input is set to and converting to decimal to make it easier \n\t\t\t\n\t\t\tif(currentMode == 1)\n\t\t\t{\n\t\t\t\tinput = hexConversion(input);\n\t\t\t}\n\t\t\telse if(currentMode == 3)\n\t\t\t{\n\t\t\t\tinput = binConversion(input);\n\t\t\t}\n\t\t\telse if(currentMode == 4)\n\t\t\t{\n\t\t\t\tinput = octConversion(input);\n\t\t\t}\n\t\t\telse if(currentMode != 2)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error, invalid input mode\");\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < input.length(); i++)\n\t\t\t{\n\t\t\t\ttempVal = input.charAt(i);\n\t\t\t\t\n\t\t\t\t\tif(isNumber(input.charAt(i)) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\tevalulateQueue.add(Character.toString(tempVal));\n\t\t\t\t\t}\n\t\t\t\t\telse if((isOperator(input.charAt(i)) == true) || (isLeftParen(input.charAt(i)) == true) || (isRightParen(input.charAt(i)) == true))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(isLeftParen(input.charAt(i)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\toperationStack.push(Character.toString(tempVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((isRightParen(input.charAt(i))) == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (operationStack.empty() == false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp = operationStack.peek();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(temp.equals(\"(\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tevalulateQueue.add(temp);\n\t\t\t\t\t\t\t\t\toperationStack.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\toperationStack.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(precedence(Character.toString(tempVal)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\toperationStack.push(Character.toString(tempVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twhile(precedence(Character.toString(tempVal)) == false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tString temp = operationStack.peek();\n\t\t\t\t\t\t\t\toperationStack.pop();\n\t\t\t\t\t\t\t\tevalulateQueue.add(temp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\toperationStack.push(Character.toString(tempVal));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"An error has occured, invalid input values\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"An error has occured, invalid input values\");\n\t\t}\n\t\t\n\t\t// moving operation stack to evaluation queue\n\t\t\n\t\twhile(operationStack.empty() != true)\n\t\t{\n\t\t\tString movingVal = operationStack.peek();\n\t\t\tevalulateQueue.add(movingVal);\n\t\t\toperationStack.pop();\n\t\t}\n\t\t\n\t\t// test \n\t\t\n\t\tSystem.out.println(\"$$$$$$$$$$\");\n\t\tfor(String item: evalulateQueue) {\n\t\t\tSystem.out.print(item);\n\t\t}\n\t\tSystem.out.println(\"\\n$$$$$$$$$$\");\n\t\t\n\t\t// converting post-fix notation to the final result\n\t\t\n\t\twhile(evalulateQueue.isEmpty() != true)\n\t\t{\n\t\t\tString currentNum = evalulateQueue.peek();\n\t\t\tSystem.out.println(currentNum);\n\t\t\t\n\t\t\t// if its an operator, popping two numbers from evaluate stack to evaluate\n\t\t\tif((isOperator(currentNum.charAt(0))) && (evaluateStack.size() > 0))\n\t\t\t{\n\t\t\t\tString firstNum = evaluateStack.pop();\n\t\t\t\tString secondNum = evaluateStack.pop();\n\t\t\t\tdouble addedRes;\n\t\t\t\t\n\t\t\t\t// evaluating and pushing into the final queue\n\t\t\t\t\n\t\t\t\tswitch (currentNum) {\n\t\t\t\t\tcase \"+\": \n\t\t\t\t\t\taddedRes = Double.parseDouble(secondNum) + Double.parseDouble(firstNum);\n\t\t\t\t\t\tif(finalQueue.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdouble newRes = Double.parseDouble(finalQueue.peek()) + addedRes;\n\t\t\t\t\t\t\tfinalQueue.remove();\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(newRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(addedRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(finalQueue.peek());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"-\":\n\t\t\t\t\t\taddedRes = Double.parseDouble(secondNum) - Double.parseDouble(firstNum);\n\t\t\t\t\t\tif(finalQueue.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdouble newRes = Double.parseDouble(finalQueue.peek()) + addedRes;\n\t\t\t\t\t\t\tfinalQueue.remove();\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(newRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(addedRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(finalQueue.peek());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"*\":\n\t\t\t\t\t\taddedRes = Double.parseDouble(secondNum) * Double.parseDouble(firstNum);\n\t\t\t\t\t\tif(finalQueue.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdouble newRes = Double.parseDouble(finalQueue.peek()) + addedRes;\n\t\t\t\t\t\t\tfinalQueue.remove();\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(newRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(addedRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(finalQueue.peek());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\taddedRes = Double.parseDouble(secondNum) / Double.parseDouble(firstNum);\n\t\t\t\t\t\tif(finalQueue.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdouble newRes = Double.parseDouble(finalQueue.peek()) + addedRes;\n\t\t\t\t\t\t\tfinalQueue.remove();\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(newRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfinalQueue.add(Double.toString(addedRes));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(finalQueue.peek());\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Error, invalid operation\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if its a number, pushing it on the evaluate stack to be operated on\n\t\t\telse if (isNumber(currentNum.charAt(0)))\n\t\t\t{\n\t\t\t\tevaluateStack.push(currentNum);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error, invalid input into final queue\");\n\t\t\t}\n\t\t\t\n\t\t\t// removing the last item in the queue\n\t\t\t\n\t\t\tevalulateQueue.remove();\n\t\t\t\n\t\t}\n\t}", "private static String evaluate(ArrayList<String> operators, ArrayList<String> operands) {\n\n /* Check for valid input. There should be one more operand than operator. */\n if (operands.size() != operators.size()+1)\n return \"Invalid Input\";\n\n String current;\n int value;\n int numMultiply = 0;\n int numAdd = 0;\n int currentOperator = 0;\n\n /* Get the number of multiplications in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"*\"))\n numMultiply++;\n }\n\n /* Get the number of addition and subtraction in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"-\") || operators.get(i).equals(\"+\"))\n numAdd++;\n }\n\n /* Evaluate multiplications first, from left to right. */\n while (numMultiply > 0){\n\n current = operators.get(currentOperator);\n if (current.equals(\"*\")) {\n\n /* When multiplication is found in the operators, get the associative operands from the operands list.\n Associative operands are found in the operands list at indexes current operator and current operator + 1.\n */\n value = Integer.parseInt(operands.get(currentOperator)) * Integer.parseInt(operands.get(currentOperator+1));\n\n /* Remove the operands and the operator since they have been evaluated and add the evaluated answer back in the operands. */\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n\n numMultiply--;\n }\n else\n currentOperator++;\n }\n\n currentOperator = 0;\n\n /* Next evaluate the addition and subtraction, from left to right. */\n while (numAdd > 0){\n current = operators.get(currentOperator);\n if (current.equals(\"+\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) + Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n\n else if (current.equals(\"-\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) - Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n else\n currentOperator++;\n }\n\n /* When all the operations have been evaluated, the final answer will be in the first element of the operands list. */\n return operands.get(0);\n }", "public int evalRPN(String[] tokens) {\n Stack<Integer> stack = new Stack<>();\n for(String token : tokens){\n if(token.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b+a);\n }else if(token.equals(\"-\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b-a);\n }else if(token.equals(\"*\")){\n stack.push(stack.pop()*stack.pop());\n }else if(token.equals(\"/\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b/a);\n }else{\n stack.push(Integer.parseInt(token));\n }\n }\n return stack.pop();\n }", "public int evalRPN(String[] tokens){\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\tfor (int i = 0; i < tokens.length; i++){\n\t\t\tif (!tokens[i].equals(\"+\") && !tokens[i].equals(\"-\") && !tokens[i].equals(\"*\") && !tokens[i].equals(\"/\"))\n\t\t\t\ts.push(Integer.parseInt(tokens[i]));\n\t\t\telse {\n\t\t\t\tint v2 = s.pop();\n\t\t\t\tint v1 = s.pop();\n\t\t\t\tif (tokens[i].equals(\"+\"))\n\t\t\t\t\ts.push(v1 + v2);\n\t\t\t\telse if(tokens[i].equals(\"-\"))\n\t\t\t\t\ts.push(v1-v2);\n\t\t\t\telse if(tokens[i].equals(\"*\"))\n\t\t\t\t\ts.push(v1 * v2);\n\t\t\t\telse if(tokens[i].equals(\"/\"))\n\t\t\t\t\ts.push(v1/v2);\n\t\t\t}\n\t\t}\n\t\treturn s.pop();\n\t}", "private int eval(Node<String> temp) {\n\t\t\tif(temp==null)\n\t\t\t\treturn 0;\n\t\t\tif(temp.left==null && temp.right==null)\n\t\t\t\treturn Integer.parseInt(temp.data);\n\t\t\t\n\t\t\tint right=eval(temp.right);\n\t\t\tint left=eval(temp.left);\n\t\t\tif(isOperator(temp.data.charAt(0))) {\n\t\t\t\tif(temp.data.charAt(0)=='*') \n\t\t\t\t\treturn right * left;\n\t\t\t\telse if(temp.data.charAt(0)=='/') \n\t\t\t\t\treturn right / left;\n\t\t\t\telse if(temp.data.charAt(0)=='+') \n\t\t\t\t\treturn right + left;\n\t\t\t\telse \n\t\t\t\t\treturn right - left;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Integer.parseInt(temp.data);\n\t\t\t}\n\t\t}", "private String getOpossiteOperation(String operation) {\n StringBuilder newOperation = new StringBuilder();\n for (int i = 0; i < operation.length(); i++) { \n if (i+2 <= operation.length()) {\n StringBuilder sb = new StringBuilder();\n sb.append(operation.charAt(i));\n sb.append(operation.charAt(i+1));\n String op = sb.toString();\n if (this.opposites.containsKey(op)) {\n newOperation.append(this.opposites.get(op));\n i++;\n } else if (this.opposites.containsKey(String.valueOf(operation.charAt(i)))) {\n newOperation.append(this.opposites.get(String.valueOf(operation.charAt(i))));\n } else if (Arrays.asList(this.operators_logical).contains(op)) {\n newOperation.append(op);\n i++;\n } else {\n newOperation.append(operation.charAt(i));\n }\n } else{ //Last character\n newOperation.append(operation.charAt(i));\n } \n }\n return newOperation.toString();\n }", "String getOperator();", "private int cal(int num1, int op, int num2){\n\n int ans=0;\n if(op<2){\n ans=num1+op*num2;\n }else if(op==2){\n ans=num1*num2;\n }else{\n ans=num1/num2;\n }\n return ans;\n }", "private boolean hasPrecedence(char op1, char op2) {\n if (op1 == '(' || op1 == ')') {\n return false;\n }\n if ((op1 == '+' || op1 == '-') && (op2 == '*' || op2 == '/')) {\n return false;\n }\n return true;\n }", "public java.lang.Short getPrecedence() {\r\n return precedence;\r\n }", "public int getOp() {\n\t\treturn op;\n\t}", "private IMathExpr parseOperator(String expr, MathBinOper operator,\r\n boolean processLeft2Right) throws InvalidMathExprException {\r\n int startPos, endPos, step;\r\n \r\n if (processLeft2Right) { // Parse expression forwards.\r\n startPos = 0;\r\n endPos = expr.length();\r\n step = 1;\r\n } else { // Parse expression backwards.\r\n startPos = expr.length() - 1;\r\n endPos = -1; // Going backwards, even 0 index counts.\r\n step = -1;\r\n }\r\n \r\n int i = startPos;\r\n while (i != endPos) {\r\n if (this.isOutsideOfBracket(expr, i)) {\r\n char c = expr.charAt(i);\r\n \r\n if (c == operator.getSign()) {\r\n IMathExpr left = new MathExpr(expr.substring(0, i));\r\n IMathExpr right = new MathExpr(expr.substring(i + 1,\r\n expr.length()));\r\n \r\n return MathBinOper.buildBinaryOper(operator, left, right);\r\n }\r\n }\r\n \r\n i += step;\r\n }\r\n \r\n return null;\r\n }", "public String getOp() {\n return op;\n }", "public String getOp() {\n return op;\n }", "public OperatorBuilder precedence(int precedence) {\n return new OperatorBuilder(this.unaryOp, this.binaryOp, this.symbol, precedence, this.type);\n }", "protected static int calculateThreeTokens(String[] tokens)\n throws ArithmeticException, NumberFormatException, CalculatorException\n {\t\n \tint a = Integer.parseInt(tokens[0]); \n \tint b = Integer.parseInt(tokens[2]); \n \tint value = 0;\n \tString operation = tokens[1]; //operation sign is at the second index\n \tif (operation.equals(\"+\")) {\n \t\tvalue = a + b;\n \t\treturn value;\n \t}\n \tif (operation.equals(\"-\")) {\n \t\tvalue = a - b;\n \t\treturn value;\n \t}\n \tif (operation.equals(\"/\")) {\n \t\tvalue = a/b;\n \t\treturn value;\n \t}\n \telse //if operation is not \"+\",\"-\", or \"/\"\n \t\t\n \t\t{ throw new CalculatorException(\"Illegal Command\");\n \t} \t\n \n }", "private static char getOperator() throws ParseError {\n TextIO.skipBlanks(); // Skip past any blanks in the input.\n\n char op = TextIO.peek();\n\n if ( op == '+' || op == '-' || op == '*' || op == '/' )\n TextIO.getAnyChar(); // Read the operator.\n else\n throw new ParseError( \"Found \" + op + \" instead of an operator.\" );\n\n return op;\n\n }", "private int getPrio(int op){\n return ((Integer)opPrio.get(new Integer(op))).intValue();\n }", "public double calculate(String expression) {\n\t\tString[] inputs = expression.split(\" \");\n\t if(debug) {\n\t\tSystem.out.print(\"Input array: \");\n\t\tfor(String value : inputs) {\n\t\t\tSystem.out.print(value + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t }\t\n\t\t\n\t\t// Go through the string array and pop operators onto the\n\t\t// operators stack and operands onto the the operands stack\n\t\tfor(String value : inputs) {\n\t\t if(debug) System.out.println(\"Evaluating: \" + value);\n\t\t\tif(value.equals(\"*\") || value.equals(\"/\") || value.equals(\"+\") || value.equals(\"-\")) {\n\t\t\t\t// If stack is empty push onto stack\n\t\t\t\tif(operand.empty()) {\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If new operator is higher than old push onto\n\t\t\t\t// stack\n\t\t\t\telse if(value.equals(\"*\") || value.equals(\"/\")) {\n\t\t\t\t\tString old = (String)operand.peek();\n\t\t\t\t\tif(old.equals(\"*\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = a*b;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse if(old.equals(\"/\")) {\n\t\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\t if(debug) {\n\t\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t\t }\n\t\t\t\t\t \ta = b/a;\n\t\t\t\t\t\toperators.push(a);\n\t\t\t\t\t\told = (String)operand.pop();\n\t\t\t\t\t\toperand.push(value);\n\t\t\t\t\t}\n\t\t\t\t\telse operand.push(value);\n\t\t\t\t}\n\n\t\t\t\t// Else pop old operator and evaluate top two\n\t\t\t\t// elements on operand stack then push new\n\t\t\t\t// operator onto stack\n\t\t\t\telse {\n\t\t\t\t\tdouble a = (Double)operators.pop();\n\t\t\t\t\tdouble b = (Double)operators.pop();\n\t\t\t\t\tString old = (String)operand.pop();\n\t\t\t\t if(debug) {\n\t\t\t\t\tSystem.out.println(a + old + b);\n\t\t\t\t }\n\t\t\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\t\t\telse a = b-a;\n\t\t\t\t\toperators.push(a);\n\t\t\t\t\toperand.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Put operators into operators stack\n\t\t\telse {\n\t\t\t try {\n\t\t\t\tDouble num = Double.parseDouble(value);\n\t\t\t\toperators.push(num);\n\t\t\t }\n\t\t\t catch(NumberFormatException e) {\n\t\t\t\t System.out.println(\"NumberFormatException: Something besides a number or operator entered\");\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t// Finish up everything left over in stack\n\t\tString old;\n\t\tdouble a;\n\t\tdouble b;\n\t\twhile(!operand.empty()) {\n\t\t\told = (String)operand.pop();\n\t\t\ta = (Double)operators.pop();\n\t\t\tb = (Double)operators.pop();\n\t\t\tif(old.equals(\"*\")) a = a*b;\n\t\t\telse if(old.equals(\"/\")) a = b/a;\n\t\t\telse if(old.equals(\"+\")) a = a+b;\n\t\t\telse a = b-a;\n\t\t\toperators.push(a);\n\t\t}\n\t\treturn (Double)operators.peek();\n\t}", "private Operator compile(List<Operator> ops, int offset, int length) {\n \n int lLength = findExpression(ops, offset, length);\n \n if (lLength == length){\n \n // Case 1: EXPR\n if (length == 1){\n \n // Return single operator\n return ops.get(offset);\n \n } else if ((ops.get(offset) instanceof PrecedenceOperator) &&\n (ops.get(offset + length - 1) instanceof PrecedenceOperator)){\n \n // Remove brackets\n return compile(ops, offset+1, length-2);\n \n } else {\n throw new RuntimeException(\"Invalid expression\");\n }\n \n } else {\n \n // Case 2: EXPR <OP> EXPR\n if (!(ops.get(offset + lLength) instanceof BinaryOperator)){\n \n // Invalid\n throw new RuntimeException(\"Expecting EXPR <OP> EXPR\");\n } else {\n \n // Binary operator\n BinaryOperator bop = (BinaryOperator)ops.get(offset + lLength);\n bop.left = compile(ops, offset, lLength);\n bop.right = compile(ops, offset + lLength + 1, length - lLength - 1);\n return bop;\n }\n }\n }", "private String auxOperacion(int operando1, int operando2, String valor1, String valor2, int op) {\n if (ManejadorMemoria.isInt(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n System.out.println(valor1 + \" \" + valor2 + \" \" + (Integer.parseInt(valor1) > Integer.parseInt(valor2)));\n return (Integer.parseInt(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Integer.parseInt(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isFloat(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isString(operando1)) {\n return valor1 + valor2;\n } else if(ManejadorMemoria.isBool(operando1)){\n switch(op){\n case Codigos.AND:\n return (Boolean.parseBoolean(valor1) && Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.OR:\n return (Boolean.parseBoolean(valor1) || Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.NOT:\n return (! Boolean.parseBoolean(valor1))+ \"\";\n }\n }\n\n return \"\";\n }", "static int calculate(int a, int b, String op) {\n switch (op) {\n case \"+\":\n return a + b;\n case \"-\":\n return a - b;\n case \"*\":\n return a * b;\n case \"/\":\n return a / b;\n default:\n break;\n }\n return 0;\n }", "private double evaluarExp2() throws Excepciones{\n char op;\n double resultado;\n double resultadoParcial;\n resultado = evaluarExp3();\n while((op = token.charAt(0)) == '+' || op == '-') {\n obtieneToken();\n resultadoParcial = evaluarExp3();\n switch(op) {\n case '-':\n resultado = resultado - resultadoParcial;\n break;\n case '+':\n resultado = resultado + resultadoParcial;\n break;\n } \n }\n return resultado;\n }", "@Test\r\n\tpublic void testTokenizeOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\"))\r\n\t\t\t\t.sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\\nputs \\\"The best cat is: \\\" + the_best_cat\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_op\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 6; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 6);\r\n\t\t\t\tif (sub.equals(\":on_op\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 2);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public void recursion(final String expression, int countOperation) {\n int numberOfOperations=0;\n String operationString=expression.replace(\" \",\"\");\n for (int i=0; i<operationString.length()-1; i++)\n {\n if(expression.substring(i,i+1).matches(\"\\\\+\")\n ||operationString.substring(i,i+1).matches(\"\\\\-\")\n ||operationString.substring(i,i+1).matches(\"\\\\*\")\n ||operationString.substring(i,i+1).matches(\"/\")\n ||operationString.substring(i,i+1).matches(\"\\\\^\")\n ||operationString.substring(i,i+1).matches(\"i\")\n ||operationString.substring(i,i+1).matches(\"a\")\n ||operationString.substring(i,i+1).matches(\"o\"))\n {\n numberOfOperations++;\n }\n }\n String result;\n int count=0;\n if (operationString.substring(0,1).equals(\"(\"))\n {\n int start=1;\n int end=0;\n count=1;\n while (count<operationString.length() && start!=end)\n {\n String temp=operationString.substring(count,count+1);\n if (temp.equals(\"(\"))\n {\n start++;\n }\n if (temp.equals(\")\"))\n {\n end++;\n }\n count++;\n }\n }\n if (count!=operationString.length() && !operationString.substring(0,1).equals(\"(\"))\n {\n //разбиваем выражения на подвыражения\n List<String> symbols=new ArrayList<>();\n for (int i=0; i<operationString.length()-1;)\n {\n String temp=operationString.substring(i,i+1);\n if (\"+-*/^\".contains(temp))\n {\n symbols.add(temp);\n i++;\n }\n if(temp.equals(\"s\") || temp.equals(\"t\") || temp.equals(\"c\"))\n {\n symbols.add(operationString.substring(i,i+3));\n i=i+3;\n }\n if (temp.matches(\"\\\\d\"))\n {\n int k=i+1;\n StringBuilder sb=new StringBuilder(temp);\n while (k<operationString.length()&&(operationString.substring(k,k+1).matches(\"\\\\d\")||operationString.substring(k,k+1).matches(\"\\\\.\")))\n {\n sb.append(operationString.substring(k,k+1));\n k++;\n }\n i=k;\n symbols.add(new String(sb));\n }\n if (temp.equals(\"(\"))\n {\n int start=1;\n int end=0;\n int k=i+1;\n while(k<operationString.length() && start!=end)\n {\n if (operationString.substring(k,k+1).equals(\"(\"))\n {\n start++;\n }\n if(operationString.substring(k,k+1).equals(\")\"))\n {\n end++;\n }\n k++;\n }\n PrintStream oldOut=System.out;\n String recTemp;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString.substring(i,k),++countOperation);\n recTemp=baos.toString();\n System.setOut(oldOut);\n symbols.add(recTemp);\n i=k;\n }\n }\n\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).startsWith(\"s\"))\n {\n symbols.set(i,\"\"+Math.sin(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"t\"))\n {\n symbols.set(i,\"\"+Math.tan(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"c\"))\n {\n symbols.set(i,\"\"+Math.cos(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"^\"))\n {\n symbols.set(i-1, Math.pow(Double.parseDouble(symbols.get(i - 1)), Double.parseDouble(symbols.get(i + 1))) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"/\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))/Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n if (symbols.get(i).equals(\"*\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))*Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).equals(\"-\"))\n {\n symbols.set(i,\"-\"+symbols.remove(i+1));\n }\n if (symbols.get(i).equals(\"+\"))\n {\n symbols.remove(i);\n i--;\n }\n }\n double answer=0;\n for (String s:symbols)\n {\n answer=answer+Double.parseDouble(s);\n }\n result=answer+\"\";\n countOperation--;\n }\n else\n {\n //отбрасываем начальные и конечные скобки\n operationString=operationString.substring(1,operationString.length()-1);\n PrintStream oldOut=System.out;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString,++countOperation);\n result=baos.toString();\n System.setOut(oldOut);\n }\n if (countOperation==0)\n {\n System.out.println(result+\" \"+numberOfOperations);\n }\n else\n {\n System.out.println(result);\n }\n }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public static String parseExpressionForOperator(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n return operator;\n }", "private void operator() {\n reduce();\n shift();\n getDispenser().advance();\n if(getDispenser().tokenIsNumber()) setState(State.NUMBER);\n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM);\n \n }", "private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }", "private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }", "private String normalizeOperator(String op)\n {\n String normalOp = null;\n \n if (op != null && op.trim().length() > 0)\n {\n op = op.trim().toLowerCase();\n\n String [] ops = new String []\n {\n OP_EQUALS,\n OP_NOTEQUAL,\n OP_LESSTHAN,\n OP_LESSTHANEQUAL,\n OP_GREATERTHAN,\n OP_GREATERTHANEQUAL,\n OP_ISNULL,\n OP_ISNOTNULL,\n OP_IN,\n OP_NOTIN,\n OP_LIKE,\n OP_NOTLIKE,\n OP_BETWEEN\n };\n\n for (int i=0; i<ops.length && normalOp == null; i++)\n {\n if (ops[i].equalsIgnoreCase(op))\n normalOp = ops[i];\n }\n }\n \n return normalOp;\n }", "public String parsePrefixToPostfix(String exp) throws SyntaxError {\n \tif (exp.length() == 0) {\n \t\tthrow new SyntaxError(\"No expression has been entered.\");\n \t}\n //parser accepts user input into exp\n \tScanner parser = new Scanner(exp);\n int element;\n String operator;\n String entity;\n String postfixExpression = \"\"; \n String firstOperand, secondOperand;\n int result = 0;\n \n //tokenize prefix string and set up 2 stacks\n Stack<String> operandStack = new Stack<String>();\n Stack<String> reverseOperatorStack = new Stack<String>();\n //while statement to push onto the reversal stack if there are more tokens\n while (parser.hasNext()) {\n entity = parser.next();\n // unless there is a space\n if (!entity.equals(\" \"))\n reverseOperatorStack.push(entity);\n }\n try { \n \t// while statement to pop to reversal stack if it is not empty\n \twhile (!reverseOperatorStack.isEmpty()) {\n //peek to retrieve the token at the top of the stack\n \t\tentity = reverseOperatorStack.peek();\n \t\t//pop to take the token off the stack\n\t reverseOperatorStack.pop();\n\t \n\t // if it is an operand\n\t if (Character.isDigit(entity.charAt(0))) {\n\t \t//push token onto the operand stack\n\t \toperandStack.push(entity);\n\t }\n\t // if it is an operator\n\t else if (entity.equals(\"/\") || entity.equals(\"*\") \n\t \t\t|| entity.equals(\"+\") || entity.equals(\"-\")) {\n\t \t//retrieve, then pop first operand off the stack\n\t \tfirstOperand = operandStack.peek();\n\t operandStack.pop();\n\t //retrieve, then pop second operand off the stack\n\t secondOperand = operandStack.peek();\n\t operandStack.pop();\n\t // formats miniExpression String with the 2 operands followed by the operator \n\t String miniExpression = firstOperand + \" \" + secondOperand + \" \" + entity;\n\t //push the string onto the operand stack\n\t operandStack.push(miniExpression);\n\t }\n \t}\n \t //throws error if there is an incorrect entry improperly formatted \t\n } catch (Exception e) {\n throw new SyntaxError(\"You have entered an improper expression. Check your input.\");\n }\n //retrieve, then pop the postfix expression off the stack\n postfixExpression = operandStack.peek();\n operandStack.pop();\n //return postfix - holding the converted expression\n return postfixExpression; \n }", "public static void main(String[] args) {\n String input = \"( ( 1 + sqrt ( 5 ) ) / 2 )\";\n Stack<String> ops = new Stack<String>();\n Stack<Double> vals = new Stack<Double>();\n String[] temps = input.split(\" \");\n for (String temp : temps) {\n\n if (temp.equals(\"(\")) ;\n else if (temp.equals(\"+\")) ops.push(temp);\n else if (temp.equals(\"-\")) ops.push(temp);\n else if (temp.equals(\"*\")) ops.push(temp);\n else if (temp.equals(\"/\")) ops.push(temp);\n else if (temp.equals(\"sqrt\")) ops.push(temp);\n else if (temp.equals(\")\")){\n String op = ops.pop();\n double v = vals.pop();\n if (op.equals(\"+\")) v = vals.pop() + v;\n else if (op.equals(\"-\")) v = vals.pop() - v;\n else if (op.equals(\"*\")) v = vals.pop() * v;\n else if (op.equals(\"/\")) v = vals.pop() / v;\n else if (op.equals(\"sqrt\")) v = Math.sqrt(v);\n vals.push(v);\n }else {\n vals.push(Double.parseDouble(temp));\n }\n }\n System.out.println(vals.pop());\n }", "private int parseExpression(Queue<String> exp) {\n int value = parseTerm(exp);\n while (exp.peek().equals(\"+\") || exp.peek().equals(\"-\")) {\n String op = exp.dequeue().getData().toString();\n if (op.equals(\"+\")) {\n value = value + parseTerm(exp);\n } else {\n value = value - parseTerm(exp);\n }\n }\n return value;\n }", "private Token getNextOperator() {\n char currChar = this.data[currentIndex];\n\n if (currChar == '+' || currChar == '-' || currChar == '*' || currChar == '/' || currChar == '^') {\n currentIndex++;\n return new Token(TokenType.OPERATOR, currChar);\n } else {\n throw new LexerException(\"Invalid character in tags\");\n }\n }", "private DoubleBinaryOperator chooseOperator() {\n\t\tswitch(name) {\n\t\tcase \"+\":\n\t\t\treturn ADD;\n\t\t\t\n\t\tcase \"-\":\n\t\t\treturn SUB;\n\t\t\t\n\t\tcase \"*\":\n\t\t\treturn MULTIPLY;\n\t\t\t\n\t\tcase \"/\":\n\t\t\treturn DIVIDE;\n\t\t\t\n\t\tcase \"x^n\":\n\t\t\treturn POW;\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Invalid binary operator\");\n\t\t}\n\t}", "static int countEvalWays(String expr, boolean result) {\n // check error\n if (expr == null || expr.length() == 0) {\n return 0;\n }\n // base case\n if (expr.length() == 1) {\n if (expr.equals(\"1\") && result) return 1; // count as one way\n else if (expr.equals(\"0\") && !result) return 1; // count as one way\n else return 0; // not evaluted to desired result\n }\n int count = 0;\n for (int i = 1; i < expr.length() - 1; i++) { // from first operator to last operator\n if (result) {\n if (expr.charAt(i) == '&') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true);\n }\n if (expr.charAt(i) == '|') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true);\n }\n if (expr.charAt(i) == '^') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true);\n }\n } else if (!result) {\n if (expr.charAt(i) == '&') {\n count += countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), false)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n if (expr.charAt(i) == '|') {\n count += countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n if (expr.charAt(i) == '^') {\n count += countEvalWays(expr.substring(0, i), true) * countEvalWays(expr.substring(i + 1), true)\n + countEvalWays(expr.substring(0, i), false) * countEvalWays(expr.substring(i + 1), false);\n }\n }\n }\n return count;\n }", "public static int Evaluate(String post){\n\t\tObjectStack postfix =new ObjectStack();\n\t\t\n\t\tfor (int i = 0; i < post.length(); i++) {\n\t\t\tchar ch = post.charAt(i);\n\t\t\tif (ch >= '0' && ch <= '9') {\n\t\t\t\tint number = ch - '0';\n\t\t\t\tpostfix.push(number);\n\t\t\t} else if ((ch == '*' || ch == '/' || ch == '+' || ch == '-' || ch == '^')) {\n\t\t\t\tint top2 = (Integer) postfix.pop();\n\t\t\t\tint top1 = (Integer) postfix.pop();\n\t\t\t\tchar operator = ch;\n\t\t\t\tif (operator == '+')\n\t\t\t\t\tpostfix.push(top1 + top2);\n\t\t\t\telse if (operator == '-')\n\t\t\t\t\tpostfix.push(top1 - top2);\n\t\t\t\telse if (operator == '*')\n\t\t\t\t\tpostfix.push(top1 * top2);\n\t\t\t\telse if (operator == '/')\n\t\t\t\t\tpostfix.push(top1 / top2);\n\t\t\t\telse if (operator == '^')\n\t\t\t\t\tpostfix.push((int) Math.pow(top1, top2));\n\t\t\t}\n\t\t}\n\t\treturn (Integer) postfix.pop();\n\t\n}", "Operator(String s, Precedence precedence) {\n this.operatorString = s;\n this.precedence = precedence;\n }", "public static int operatorCases(char op, int x, int y) {\n\t\t\n\t\tswitch (op) {\n\t\tcase '+':\n\t\t\treturn y + x;\n\t\tcase '-':\n\t\t\treturn y - x;\n\t\tcase '/':\n\t\t\t// not allowed to divide by 0, throw the exceptions\n\t\t\tif (x == 0)\n\t\t\t\tthrow new UnsupportedOperationException(\"Cannot divide by zero\");\n\t\t\treturn y / x;\n\t\tcase '*':\n\t\t\treturn y * x;\n\t\t}\n\t\treturn 0;\n\t}", "private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }", "private boolean precedence(String input) {\n\t\tboolean complies = true;\n\t\t\n\t\tif(((input.equals(\"+\")) || (input.equals(\"-\"))) && (operationStack.empty() == false))\n\t\t{\n\t\t\tif((operationStack.peek().equals(\"*\")) || (operationStack.peek().equals(\"/\")))\n\t\t\t{\n\t\t\t\tcomplies = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn complies;\n\t}", "public int calculate(String s) {\n Deque<Integer> stack = new ArrayDeque<>();\n\n // Init\n int result = 0; // For the on-going result\n int sign = 1; // 1 means positive, -1 means negative\n int operand = 0;\n\n // 1 + 2 + 1\n // The tricky part is that we find an operator/sign first, then we know\n // the operand after that. We save the sign first, and when we evaluate the\n // expression so far, we use that sign.\n\n // Go through the expression string character by character.\n // Evaluate to the left when we find '+', '-', ')', or end of loop.\n // We use a stack when we find parenthesis.\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c)) {\n // Form operand, since it could be more than one digit.\n operand = 10 * operand + (c - '0');\n } else if (c == '+') {\n // We can evaluate the expression to the left,\n // with result, sign, operand\n result += sign * operand;\n // Save the recently encountered '+' sign\n sign = 1;\n // Reset operand\n operand = 0;\n } else if (c == '-') {\n // We can evaluate the expression to the left,\n result += sign * operand;\n // Save the '-' sign.\n sign = -1;\n operand = 0;\n } else if (c == '(') {\n // Push the result so far and sign onto the stack, for later use.\n // We push the result first, then sign in the stack.\n stack.push(result);\n stack.push(sign);\n // Reset result, sign, and operand, as if new evaluation begins for the new\n // sub-expression\n result = 0;\n sign = 1;\n operand = 0;\n } else if (c == ')') {\n // We can evaluate the sub-expression to the left.\n result += sign * operand;\n // Now that we know the sub-expression ended, we can also evaluate to the left.\n // First we take the sign out of the stack, and then add the result we saved\n // before to the result of the sub-expression.\n result *= stack.pop();\n result += stack.pop();\n // Reset sign and operand.\n sign = 1;\n operand = 0;\n }\n }\n\n // We need to evaluate again.\n result += sign * operand;\n\n return result;\n }", "public String getOper() {\n return oper;\n }", "SEIntegerVariable getOperand2();", "public char getOper(){\n\t\treturn oper;\n\t}", "abstract String getOp();", "public static int evalPostfix(String postfix) throws PostFixException{\n\t\t//MyStack instance to store results of evaluation\n\t\tStack<Integer> result = new Stack<Integer>();\n\t\t\n\t\t//Scanner instance to scan tokens\n\t\tScanner getToken = new Scanner(postfix);\n\t\t\n\t\twhile(getToken.hasNext()){\n\t\t\t\n\t\t\tString curToken = getToken.next();\n\t\t\t//if the token is a valid operator, push it onto stack as a Double object\n\t\t\tif(isPositiveInteger(curToken)){\n\t\t\t\tresult.push(Integer.parseInt(curToken));\n\t\t\t}\n\t\t\t\n\t\t\t//if the current token is an operator\n\t\t\telse if(curToken.equals(\"+\")||curToken.equals(\"-\")||curToken.equals(\"*\")||curToken.equals(\"/\")){\n\t\t\t\ttry{\n\t\t\t\t\t//Get the operands from the stack\n\t\t\t\t\tint operand2 = result.pop().intValue();\n\t\t\t\t\tint operand1 = result.pop().intValue();\n\t\t\t\t\t\n\t\t\t\t\t//find the operator and perform the arithmetic\n\t\t\t\t\tswitch(curToken){\n\t\t\t\t\t\tcase \"+\": result.push(operand1 + operand2);\n\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\tcase \"-\": result.push(operand1 - operand2);\n\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\tcase \"*\": result.push(operand1 * operand2);\n\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\tcase \"/\": result.push(operand1 / operand2);\n\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\tdefault: throw new PostFixException(\"Invalid token: \" + curToken);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//if the stack is empty when attempting to pop, throw a PostFixException\n\t\t\t\tcatch(EmptyStackException e){\n\t\t\t\t\tthrow new PostFixException(\"Not enough operands\");\n\t\t\t\t}\n\t\t\t\t//If there is an ArithMetic Exception, rethrow it\n\t\t\t\tcatch(ArithmeticException e){\n\t\t\t\t\tthrow new ArithmeticException(\"Divide by 0\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//if the token is not an operand or operator it is invalid,\n\t\t\t//throw a PostFixException\n\t\t\telse{\n\t\t\t\tthrow new PostFixException(\"Invalid token: \" + curToken);\n\t\t\t}\n\t\t}\n\t\t\n\t\tgetToken.close();\n\t\t\n\t\t//if the result is not in the stack\n\t\tif(result.empty()){\n\t\t\tthrow new PostFixException(\"Not enough operands\");\n\t\t}\n\t\t\n\t\tint resultNum = result.pop().intValue();\n\t\t\n\t\t//If there are still operands in the stack\n\t\tif(!result.empty()){\n\t\t\tthrow new PostFixException(\"Too many operands\");\n\t\t}\n\t\t\n\t\treturn resultNum;\n\t}" ]
[ "0.7165369", "0.7146971", "0.68951756", "0.67943317", "0.6786692", "0.67729396", "0.6710438", "0.66829795", "0.66807085", "0.66200197", "0.6491883", "0.6480707", "0.64530224", "0.6451341", "0.64399385", "0.64201164", "0.64201164", "0.64164096", "0.63914496", "0.63162947", "0.6309098", "0.63086253", "0.6273876", "0.62125033", "0.6193413", "0.6191427", "0.6191427", "0.6180698", "0.6143758", "0.61080486", "0.6103741", "0.6084945", "0.6051822", "0.60416937", "0.60272807", "0.60272807", "0.60272807", "0.6023735", "0.6017812", "0.6016665", "0.6003594", "0.5981498", "0.595763", "0.5951855", "0.5951116", "0.59386474", "0.59383976", "0.5910425", "0.5878163", "0.5853516", "0.58473814", "0.5844384", "0.5835742", "0.5821563", "0.58206695", "0.5810646", "0.5807395", "0.58013386", "0.58013237", "0.5777296", "0.5764455", "0.57530916", "0.57317704", "0.57222956", "0.5719494", "0.5719494", "0.5713682", "0.570928", "0.56939155", "0.5685868", "0.56792164", "0.5678167", "0.5669081", "0.56563634", "0.56413925", "0.56331587", "0.56313324", "0.5628172", "0.56254864", "0.5620796", "0.56174994", "0.5615876", "0.56148237", "0.5610522", "0.55884403", "0.55773264", "0.5575989", "0.5575244", "0.5572496", "0.5553312", "0.5547924", "0.55392194", "0.5527444", "0.5522247", "0.5521263", "0.55198437", "0.5518791", "0.55175626", "0.5516432", "0.55132836" ]
0.5604368
84