query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set number to adapter.
private void setNumber(final int pos, final String number) { if (pos < 0 || pos >= this.objects.size()) { Preferences.this.objects.add(number); } else { Preferences.this.objects.set(pos, number); } Preferences.this.adapter.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}", "public void setNumber(int number)\n {\n this.number = number;\n }", "public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}", "public void setNumber(String name, int value) {\n itemNumbers.put(name, value);\n }", "public void setNumber(int number)\n {\n Number = number;\n }", "public void setNumber(int number) {\n this.number = number;\n }", "public void setNumber(int number) {\r\n\t\tthis.number = number;\r\n\t}", "public void setNumber(Integer number) {\r\n this.number = number;\r\n }", "public void setNumber(String newValue);", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(Integer number) {\n this.number = number;\n }", "@Override\r\npublic void setNumber(int number) {\n\tsuper.setNumber(number);\r\n}", "void SetItemNumber(int ItemNumber);", "public void setNum(int num) {\r\n this.num = num;\r\n }", "public void setNumber(String number) {\n this.number = number;\n }", "public void setNumero(int index, int value){\r\n\t\tnumeros.set(index, value);\r\n\t}", "public void setNumber(String number) {\r\n\t\tthis.number = number;\r\n\t}", "public Builder setNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n number_ = value;\n onChanged();\n return this;\n }", "public void setValue(Number value) {\n\t\tspinner.setValue(value);\n\t\tintegerTextField.setValue(value.longValue());\n\n\t\tfireStateChanged();\n\t}", "public Builder setNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n number_ = value;\n onChanged();\n return this;\n }", "private void setCardNumber() {\n String temp = \"\";\n temp = \"\" + (curIndex + 1) + \"/\" + deckOfCards.size();\n cardNumberString.setText(temp);\n }", "public void setNum(int num) {\n\t\tthis.num = num;\n\t}", "@Override\n public void onAmountChange(View view, int amount) {\n item.num = amount;\n }", "public Series setNumber(IntegerDt theValue) {\n\t\tmyNumber = theValue;\n\t\treturn this;\n\t}", "public void setDigit(int position, int value) {\r\n array[position] = value;\r\n }", "public SeriesInstance setNumber(IntegerDt theValue) {\n\t\tmyNumber = theValue;\n\t\treturn this;\n\t}", "public void setNum(Integer num) {\n this.num = num;\n }", "public void setNum(Integer num) {\n this.num = num;\n }", "public Series setNumber( int theInteger) {\n\t\tmyNumber = new IntegerDt(theInteger); \n\t\treturn this; \n\t}", "void setIdNumber(String idNumber);", "public void setNum (java.lang.Integer num) {\r\n\t\tthis.num = num;\r\n\t}", "public void setNumber(int number){\n \t\n int max = (int)Math.pow(10, DIGIT_COUNT)-1;\n if (number < 0 && number > max)\n throw new IllegalArgumentException(\"The number needs to be in range <0, \" + max + \">\");\n \t\n int[] digits = getDigitArray(number);\n \t\n removeAll();\n for (int i = 0; i < digits.length; i++) {\n //labels[i].setIcon(numbers[digits[i]]);\n //Instead seting an icon just create & add new JLabel. As setting\n //an icon invokes repaint and the digits in display might not change at once but one after another.\n //TODO look at better solutions (other than custom painting).\n add(new JLabel(numbers[digits[i]]));\n }\n \t\n revalidate();\n repaint();\n }", "public SeriesInstance setNumber( int theInteger) {\n\t\tmyNumber = new IntegerDt(theInteger); \n\t\treturn this; \n\t}", "public void setValue(Number value) {\n this.value = value;\n }", "public static void setNum(Object holder, Object index, Object value) {\n\n\t\tsetObj(holder, index, new RubyFixnum(getRunTime(holder, index), Long.valueOf(value.toString())));\n\t}", "public void setNumber(java.lang.String number) {\n this.number = number;\n }", "public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }", "public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }", "public Builder setNumber(java.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\tnumber_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "public void setDrawerNumber(int nr) {\r\n\t\ttxtNumber.setText(\"\" + nr);\r\n\t}", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "public void setData(int data) {\n\t\tthis.data = data;\n\t}", "@JsonSetter(\"number\")\r\n public void setNumber (String value) { \r\n this.number = value;\r\n }", "private void setQuestion(int number){\n tv_question.setText(questionsList.get(number).getQuestion());\n\n }", "public void setNumer(int numer)\n\t{\n\t\tthis.numer = numer;\n\t}", "void setPhone(int phone);", "public void setID(Number numID);", "public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }", "public void setData(int data)\n\t {\n\t this.data = data;\n\t }", "public Builder setPostNum(int value) {\n \n postNum_ = value;\n onChanged();\n return this;\n }", "public void setCounter(int number){\n this.counter = number;\n }", "public void setNumero(int numero) { this.numero = numero; }", "public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }", "private static void setValues( String name, Integer number, Item item ) {\n\t\titem.getItemProperty( \"name\" ).setValue( name );\n\t\titem.getItemProperty( \"number\" ).setValue( number );\n\t\titem.getItemProperty( \"id\" ).setValue( itemId );\n\t\titem.getItemProperty( \"id\" ).setReadOnly( true );\n\t\titemId++;\n\t}", "public void setValue(Number i) {\n setText(i.toString());\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(Integer num) {\n Integer num2 = num;\n if (num2 != null) {\n this.a.c.scrollToPosition(num2.intValue());\n }\n }", "public void setNumDigits(int digits) {\r\n \r\n //Set Value\r\n numDigits = digits;\r\n \r\n }", "void setNumber (int col, int row, int number) {\n\t\tboardArray[col][row] = number;\n\t}", "protected void setNumbertoZero() {\n\t\tnumber = 0;\n\t}", "public void setSlotNumber(int value) {\n this.slotNumber = value;\n }", "public void onPressNumber(View view) {\r\n CallHelper.callNumber(this, event.contactNumber);\r\n }", "public Numbers(int number) {\r\n\t\tthis.number = number;\r\n\t}", "public void setCardNo(int cardNumber);", "void bind(int listIndex) {\n\n //listItemNumberView.setText(String.valueOf(listIndex));\n }", "public synchronized void setTbApWtEntryNumber(Integer value){\n\t\t// Fill up with necessary processing\n\n\t\ttbApWtEntryNumber = value;\n\t}", "public Builder setNumberBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n number_ = value;\n onChanged();\n return this;\n }", "public static void setBondNumber(int num)\n {\n \tbondNumber = num;\n }", "public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }", "void setQuantity(int quantity) {\n mQuantityTextView.setText(String.valueOf(quantity));\n }", "public void setTel(Integer tel) {\n this.tel = tel;\n }", "public void setITEM(int value) {\r\n this.item = value;\r\n }", "public static void setTrackNumber( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, TRACKNUMBER, value);\r\n\t}", "public void setInteger(int value){}", "public void setValue(int value) {\r\n this.value = value;\r\n }", "public void setID(int number) {\n this.clientNumber = number;\n }", "public static void setIdNumber(int idNumber) {\n catalogue.idNumber = idNumber;\n }", "@Override\r\n\tpublic void changeNumber(String name, String newNumber) {\n\t\tfor (Entry e : array[name.toUpperCase().charAt(0) - 'A']) {\r\n\t\t\tif (e.name == name) {\r\n\t\t\t\te.setNumber(newNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setFromNumber(java.lang.String fromNumber)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNUMBER$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROMNUMBER$2);\n }\n target.setStringValue(fromNumber);\n }\n }", "public static void m(int number, int[] numbers){\n number = 1001;\n numbers[0] = 5005;\n }", "public void setInumber(final String value)\n\t{\n\t\tsetInumber( getSession().getSessionContext(), value );\n\t}", "public void setAdapter(Adapter adapter) {\n this.adapter = adapter;\n }", "public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}", "public void setValue(int value);", "public void updatedNumber(String key, Number val) {}", "public Builder setNumberBytes(com.google.protobuf.ByteString value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\t\t\t\t\tcheckByteStringIsUtf8(value);\n\n\t\t\t\t\tnumber_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "public void setValue(int value){\n selectedValue = value;\n currentValue.setText(String.valueOf(value));\n }", "public void setValue(int n) {\n\t\t\tthis.value = n;\n\t}", "public void setPhoneNuber(int value) {\r\n this.phoneNuber = value;\r\n }", "public void setInteger(int value);", "public void setBikeNum(int NewValue){\n bike = NewValue;\n }", "public void setAmount(int to) {\n\n if(to>99){\n bankView.setTextSize(100);\n }\n\n bankView.setText(Integer.toString(to));\n // This will never be called when getView() is null\n //noinspection ConstantConditions\n getView().findViewById(R.id.btnArm).setEnabled(to != 0);\n }", "public void setidnumber(int id) {\r\n idnumber = id;\r\n }", "public void setValue(int value)\n {\n this.value = value;\n }", "void setNumber(int row, int col, int num){\n board[row][col].setNumber(num);\n }", "@Override\n public void setAtomicNumber(int atomicNumber) {\n }", "public Builder setNumberBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n number_ = value;\n onChanged();\n return this;\n }" ]
[ "0.6909254", "0.68034095", "0.6791689", "0.6770674", "0.675652", "0.6753719", "0.672215", "0.66374177", "0.6621348", "0.6605304", "0.6605304", "0.6605304", "0.65497255", "0.64965963", "0.64202344", "0.6316056", "0.6302861", "0.627217", "0.62647384", "0.6241831", "0.6182982", "0.61402994", "0.6140147", "0.6097825", "0.6096634", "0.60752517", "0.60246193", "0.60189533", "0.60080945", "0.60080945", "0.59952366", "0.59690106", "0.5956088", "0.59495604", "0.5948881", "0.5948818", "0.58953047", "0.58850574", "0.58828294", "0.58774424", "0.58666146", "0.58420086", "0.5819669", "0.5819669", "0.579606", "0.57514644", "0.57444465", "0.5708811", "0.57054436", "0.5690192", "0.56826323", "0.56734514", "0.56324565", "0.56085193", "0.5582705", "0.55784947", "0.5576995", "0.5558174", "0.5557448", "0.5538826", "0.5535844", "0.5534536", "0.55325484", "0.5532041", "0.5525021", "0.5521447", "0.55169255", "0.5516675", "0.5500098", "0.54910713", "0.54659617", "0.5458629", "0.54548466", "0.5454569", "0.54341894", "0.54335946", "0.543194", "0.542911", "0.54260194", "0.54254895", "0.54245526", "0.54214364", "0.5420357", "0.54119146", "0.5409063", "0.540867", "0.5403049", "0.53997874", "0.53947574", "0.53941613", "0.5393835", "0.5387978", "0.5385434", "0.53849494", "0.53821254", "0.5374903", "0.5372064", "0.5370403", "0.5370147", "0.53685087" ]
0.6601253
12
Add or edit an item.
private void addEdit(final int pos) { final AlertDialog.Builder b = new AlertDialog.Builder(this); b.setTitle(R.string.add_number); b.setCancelable(true); final EditText et = new EditText(this); if (pos >= 0) { et.setText(this.objects.get(pos)); } b.setView(et); b.setNegativeButton(android.R.string.cancel, null); b.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int which) { final String number = et.getText().toString(); if (number == null || number.length() == 0) { return; } Preferences.this.setNumber(pos, number); Preferences.this.findViewById(R.id.add_hint) .setVisibility(View.GONE); } }); b.setNeutralButton(R.string.contacts, new DialogInterface.OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int which) { final Intent intent = ContactsWrapper.getInstance() .getPickPhoneIntent(); Preferences.this .startActivityForResult(intent, pos + 1); } }); b.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void editItem();", "void add(Item item);", "public abstract void addItem(AbstractItemAPI item);", "public void setEditedItem(Object item) {editedItem = item;}", "Item update(Item item);", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public final void editItem(Item i) {\n if (i == null) {\n setVisible(false);\n return;\n }\n final boolean persisted = i.getId() != null;\n if (persisted) {\n // Find fresh entity for editing\n item = itemRepository.findById(i.getId()).get();\n } else {\n item = i;\n }\n cancel.setVisible(persisted);\n\n // Bind customer properties to similarly named fields\n // Could also use annotation or \"manual binding\" or programmatically\n // moving values from fields to entities before saving\n binder.setBean(item);\n\n setVisible(true);\n\n // Focus first name initially\n name.focus();\n }", "public int addItem(Item i);", "public boolean add(Type item);", "public void store(Item item) {\n this.items.add(item);\n }", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void updateItem(Item item) {\n\t\taddItem(item);\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "public void addItem(View view) {\n mainActivityPresenter.startEventEditActivity( this);\n }", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public Object putItem (String key, Object item);", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "@Override\n\tItem save(Item item);", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "public void setItem(Item item) {\n this.item = item;\n }", "@Override\n public Item vendItem(Item item) {\n allItems.put(item.getItemId(), item);\n return item;\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }", "public @NotNull Item newItem();", "public void clickOpenEditDialog(Item item){\n /** Store as public reference */\n this.item = item;\n dialogNewItem.show();\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "void updateItem(IDAOSession session, Item item);", "public abstract void add(T item) throws RepositoryException;", "private void insertOrUpdateItem(){\n Toaster toaster = new Toaster(getContext());\n DBManager dbManager = new DBManager(getContext());\n if((Afegir.getText() == getText(R.string.actualitza) && updateItem(dbManager)) ||\n (Afegir.getText() == getText(R.string.afegir) && insertItem(dbManager))){\n\n ((MainActivity) getActivity()).swapFrameLayoutVisibility(true);\n ((MainActivity) getActivity()).refreshListView();\n toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.commit_insert).toString(), null);\n reset(true);\n }\n\n else toaster.customizedToast(getLayoutInflater(), getView(), getText(R.string.reboke_action).toString(), getContext().getDrawable(R.drawable.ic_error_vector));\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "void addCpItem(ICpItem item);", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "public void insert(KeyedItem newItem);", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public ModifyItem() {\n initComponents();\n }", "public void add(E item);", "public void updateItem(){\n\n System.out.println(\"Update item with ID: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n System.out.println(\"Enter new characteristics: \");\n System.out.println(\"Name: \");\n String newName = bufferRead.readLine();\n System.out.println(\"Designer: \");\n String newDesigner = bufferRead.readLine();\n System.out.println(\"Price: \");\n int newPrice = Integer.parseInt(bufferRead.readLine());\n ClothingItem newCI = new ClothingItem(newName, newDesigner, newPrice);\n newCI.setId(id);\n this.ctrl.updateItem(newCI);\n\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "public void addItem(Object obj) {\n items.add(obj);\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "void onEditItem(E itemElementView);", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "void updateItem(E itemElementView);", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "void insertItem(Position position, IItem item);", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "void add(T item);", "void setItemId(String itemId);", "public Item update(Item item) {\n Item existing = getItem(item.getItemId());\n if (existing != null) {\n return existing.setQuantity(item.getQuantity());\n }\n else {\n items.add(item.setCart(this));\n return item;\n }\n }", "void add(E item);", "void add(E item);", "void add(E item);", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void saveItem(Items item) {\n\t\tItems item1 = itemDao.getItemByName(item.getItems1());\r\n\t\tif (item1 == null) {\r\n\t\t\titemDao.saveItem(item);\r\n\t\t} else if (item1.getItems1().equalsIgnoreCase(item.getItems1())) {\r\n\t\t\tSystem.out.println(\"Item already exists\");\r\n\t\t}\r\n\t}", "Product editProduct(Product product);", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "public void putItemByKey(String key, Item value) {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an object.\");\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tListSelectionModel lsm = list.getSelectionModel();\r\n\t\t\tint selected = lsm.getMinSelectionIndex();\r\n\r\n\t\t\tItemView itemView = (ItemView) list.getModel().getElementAt(selected);\r\n\r\n\t\t\t// change item\r\n\t\t\tJOptionPane options = new JOptionPane();\r\n\t\t\tObject[] addFields = { \"Name: \", nameTextField, \"Price: \", priceTextField, \"URL: \", urlTextField, };\r\n\t\t\tint option = JOptionPane.showConfirmDialog(null, addFields, \"Edit item\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\t\tString name = nameTextField.getText();\r\n\t\t\t\tString price = priceTextField.getText();\r\n\t\t\t\tString url = urlTextField.getText();\r\n\r\n\t\t\t\tdouble doublePrice = Double.parseDouble(price);\r\n\r\n\t\t\t\titemView.getItem().setName(name);\r\n\t\t\t\titemView.getItem().setCurrentPrice(doublePrice);\r\n\t\t\t\titemView.getItem().setUrl(url);\r\n\t\t\t\t// clear text fields\r\n\t\t\t\tnameTextField.setText(\"\");\r\n\t\t\t\tpriceTextField.setText(\"\");\r\n\t\t\t\turlTextField.setText(\"\");\r\n\t\t\t}\r\n\t\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "private void updateItemInStoreList(Item item, String operation) {\n if (item != null) {\n String storeId = item.getItemStoreId();\n if (!TextUtils.isEmpty(storeId)) {\n int storeObjIndex = getIndexIfStoreObjWithIdAlreadyExists(storeId, storeList);\n if (storeObjIndex != -1) {\n Store storeObj = storeList.get(storeObjIndex);\n List<Item> itemList = storeObj.getItems();\n int itemObjIndex = getIndexIfItemObjAlreadyExists(item.getItemId(), itemList);\n if (itemObjIndex != -1) {\n if (operation.equals(EDIT_ITEM_OP))\n itemList.set(itemObjIndex, item);\n else {\n // Delete item\n itemList.remove(itemObjIndex);\n // If itemList gets empty, remove store from the store-list\n if (itemList.isEmpty())\n storeList.remove(storeObjIndex);\n }\n }\n }\n }\n }\n }", "@Override\n public Item updateItem(Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item updatedItem = itemMap.put(item.getItemID(), item);\n writeItemFile();\n return itemMap.get(updatedItem.getItemID());\n }", "public EditItemDialog(MenuItem item) throws InvalidInputException {\n\t\tsetModalityType(ModalityType.APPLICATION_MODAL);\n\t\t\n\t\tthis.item = item;\n\t\t\n\t\t// Set ui to native\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException\n\t\t\t\t| UnsupportedLookAndFeelException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\t// Check that item is not null\n\t\tif(item == null) {\n\t\t\tJOptionPane.showMessageDialog(this, \"You must select an item to edit!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new InvalidInputException(\"The give menu item is invalid!\");\n\t\t}\n\t\t\n\t\t// Start generated code\n\t\tsetBounds(100, 100, 450, 323);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"Item info\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"View/Edit ingredients\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tGroupLayout gl_contentPanel = new GroupLayout(contentPanel);\n\t\tgl_contentPanel.setHorizontalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(panel, GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 425, Short.MAX_VALUE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_contentPanel.setVerticalGroup(\n\t\t\tgl_contentPanel.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPanel.createSequentialGroup()\n\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 186, Short.MAX_VALUE))\n\t\t);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\t\n\t\tingredientsComboBox = new JComboBox<String>();\n\t\tingredientsComboBox.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>) arg0.getSource();\n\t\t\t\tselectedSupply = cb.getSelectedIndex();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"Quantity:\");\n\t\t\n\t\tqtyTextField = new JTextField();\n\t\tqtyTextField.setColumns(10);\n\t\t\n\t\tJButton btnAdd = new JButton(\"Add\");\n\t\tbtnAdd.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddButtonActionPerformed();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnRemoveSelected = new JButton(\"Remove Selected Item\");\n\t\tbtnRemoveSelected.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tremoveButtonActionPerformed();\n\t\t\t}\n\t\t});\n\t\tGroupLayout gl_panel_1 = new GroupLayout(panel_1);\n\t\tgl_panel_1.setHorizontalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addGap(2)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnRemoveSelected, GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(ingredientsComboBox, GroupLayout.PREFERRED_SIZE, 173, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t.addComponent(lblQuantity)\n\t\t\t\t\t\t\t.addGap(6)\n\t\t\t\t\t\t\t.addComponent(qtyTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(btnAdd, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_panel_1.setVerticalGroup(\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\n\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(ingredientsComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(lblQuantity)\n\t\t\t\t\t\t.addComponent(qtyTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(btnAdd))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(btnRemoveSelected)\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\t\n\t\tsupplyList = new JList<String>();\n\t\tsupplyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tscrollPane.setViewportView(supplyList);\n\t\tpanel_1.setLayout(gl_panel_1);\n\t\t\n\t\tJLabel lblName = new JLabel(\"Name: \");\n\t\t\n\t\tlblItemname = new JLabel(\"itemName\");\n\t\t\n\t\tJLabel lblPrice = new JLabel(\"Price:\");\n\t\t\n\t\tlblItemPrice = new JLabel(\"itemPrice\");\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\t\tpanel.add(lblName);\n\t\tpanel.add(lblItemname);\n\t\tpanel.add(lblPrice);\n\t\tpanel.add(lblItemPrice);\n\t\tcontentPanel.setLayout(gl_contentPanel);\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\terrorLabel.setForeground(Color.RED);\n\t\t\t{\n\t\t\t\tokButton = new JButton(\"OK\");\n\t\t\t\tokButton.addActionListener(new ActionListener() {\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tdispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));\n\t\t\tbuttonPane.add(errorLabel);\n\t\t\tbuttonPane.add(okButton);\n\t\t}\n\t\t// End generated code\n\t\t\n\t\t// Prepare list\n\t\tlistModel = new DefaultListModel<String>();\n\t\tsupplyList.setModel(listModel);\n\t\t\n\t\trefreshData();\n\t}", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public int updateItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n // updating record\n return db.update(TABLE_NAME, values, KEY_ID + \" = ?\", // update query to make changes to the existing record\n new String[]{String.valueOf(item.getId())});\n }", "public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void setItem(T item) {\n this.item = item;\n }", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "private void addItemScreen() {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tstartActivity(intent);\n }", "public void insert(Object item);", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "@PutMapping(\"/items/{item_id}\")\n\tpublic ResponseEntity<Item> updateItem(@PathVariable(value=\"item_id\") Long item_id, @Valid @RequestBody Item itemDetails){ \n\t\tItem item = itemDAO.findOne(item_id);\n\t\tif(item == null) {\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\titem.setItem_id(itemDetails.getItem_id());\n\t\titem.setItem_name(itemDetails.getItem_name());\n\t\titem.setItem_discription(itemDetails.getItem_discription());\n\t\titem.setCategory(itemDetails.getCategory());\n\t\titem.setPrice(itemDetails.getPrice());\n\t\t\n\t\tItem upItem = itemDAO.save(item);\n\t\t\n\t\treturn ResponseEntity.ok().body(upItem);\n\t\t\n\t}", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}", "public void insertItem(Item item) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, item.getName());\n values.put(KEY_ARRAY_ID, item.getArrayId());\n values.put(KEY_DESCRIPTION, item.getDescription());\n\n // Inserting Row\n db.insert(TABLE_ITEMS, null, values);\n DataBaseManager.getInstance().closeDatabase();\n }", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "@Override\n\tpublic ThematicItem changeItem(ThematicItem item) {\n\t\treturn repository.changeItem(item);\n\t}", "public int addItem(Itemset i);" ]
[ "0.7420294", "0.72789234", "0.69057184", "0.6886352", "0.6876168", "0.6724139", "0.65786666", "0.6551235", "0.6545374", "0.6541552", "0.6491439", "0.648827", "0.64581114", "0.64581114", "0.64224887", "0.6384609", "0.6384481", "0.6379958", "0.637201", "0.63693637", "0.63522774", "0.6349805", "0.6323791", "0.6309239", "0.6308921", "0.6303339", "0.6302498", "0.62943184", "0.62798625", "0.6261419", "0.62486416", "0.62428266", "0.6230464", "0.6187383", "0.61736965", "0.61736035", "0.6163263", "0.61621314", "0.61571425", "0.6155703", "0.61540455", "0.6153305", "0.61484927", "0.6146186", "0.6142182", "0.6141026", "0.613815", "0.61283886", "0.61214197", "0.6090457", "0.60866606", "0.6079624", "0.60762185", "0.60750145", "0.6060827", "0.6055534", "0.60465634", "0.60465634", "0.6029804", "0.6027612", "0.60264593", "0.6023738", "0.6017417", "0.6017296", "0.60144395", "0.60144395", "0.60144395", "0.6006096", "0.6000087", "0.59852654", "0.59839725", "0.5973886", "0.59563875", "0.59536034", "0.59536034", "0.5952347", "0.59404284", "0.59371316", "0.5933705", "0.5928473", "0.59239024", "0.5923652", "0.59199244", "0.5908059", "0.58818614", "0.5880924", "0.5880151", "0.5877883", "0.5877187", "0.5874201", "0.5874177", "0.5869965", "0.5860521", "0.585901", "0.58582336", "0.5856265", "0.585415", "0.58505106", "0.5845197", "0.5839424", "0.5839287" ]
0.0
-1
Export un fichier SRT sous forme de flux.
public byte[] export() { ByteArrayOutputStream bos = new ByteArrayOutputStream(); try { for (Ligne ligne : lignes) { if (ligne.getTraduit() != null) { bos.write(ligne.getTraduit().getBytes()); } else { bos.write(ligne.getOriginal().getBytes()); } bos.write("\r\n".getBytes()); } } catch (IOException ex) { ex.printStackTrace(); } return bos.toByteArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "void saveAs() {\n writeFile.Export();\n }", "public void exportMedia(){\r\n \r\n }", "public void exportFxwl(File dir) {\n File f = new File(dir,getName() + \".fxwl\");\n try {\n X.toXML(this, new BufferedWriter(new FileWriter(f)));\n } catch (IOException ex) {\n LOGGER.error(\"Unable to export component launcher for {} into {}\", getName(),f);\n }\n }", "static void escribir(Planeta planeta_a_escribir) {\n if (escritor != null) {\n try {\n escritor.writeObject(planeta_a_escribir);\n \n } catch (IOException ex) {\n System.out.println(\"Error al escribir el archivo\");\n }\n }\n }", "void export(String path, TimeSeries<?> series);", "abstract void outputAsSAL() throws IsabelleException, FileException;", "@FXML\n void exportFile(ActionEvent event) {\n \tFileChooser chooser = new FileChooser();\n\t\tchooser.setTitle(\"Open Target File for the Export\");\n\t\tchooser.getExtensionFilters().addAll(new ExtensionFilter(\"Text Files\", \"*.txt\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tStage stage = new Stage();\n\t\t\n\t\t//get the reference of the target file\n\t\tFile targeFile = chooser.showSaveDialog(stage); \n\t\t\n\t\t\n\t\t//writes accounts to text file and exports\n\t\ttry {\n\t\t\t\n\t\t\tBufferedWriter bf = new BufferedWriter(new FileWriter(targeFile));\n\t\t\tbf.write(db.printFormattedAccounts());\n\t\t\tbf.flush();\n\t\t\tbf.close();\n\t\t\t\n\t\t\tmessageArea.appendText(\"File successfully exported.\\n\");\n\t\t\t\n\t\t} catch (IOException e) {\n \t\tmessageArea.appendText(\"Unable to export transactions to file.\\n\");\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\tmessageArea.appendText(\"File not selected, unable to export transactions to file.\\n\");\n\t\t}\n\t\t\n\t\t\n }", "public ActionSaveAs() {\r\n putValue(SMALL_ICON, IconFactory.get().create(\"fa:floppy-o\"));\r\n Messages.get().message(\"saveAs\").subscribe((msg) -> {\r\n putValue(NAME, msg);\r\n });\r\n }", "public SaveSTF(STFFile file, File output, FileType type) {\n\t\tfile_ = file;\n\t\toutput_ = output;\n\t\ttype_ = type;\n\t}", "public static void saveStudRecsToFile(File file) {\r\n\t\ttry {\r\n\t\t\tJAXBContext context = JAXBContext\r\n\t\t\t\t\t.newInstance(StudRecsWrapper.class);\r\n\t\t\tMarshaller m = context.createMarshaller();\r\n\t\t\tm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\r\n\t\t\t\r\n\t\t\tStudRecsWrapper wrapper = new StudRecsWrapper();\r\n\t\t\twrapper.setStudRecs(studRecs);\r\n\t\t\t\r\n\t\t\tm.marshal(wrapper, file);\r\n\t\t\tSystem.out.println(\"File saved!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Cannot save file, check write permissions!\");\r\n\t\t}\r\n\t}", "public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }", "public static void exportToFile() throws Exception {\n String fileName = \"Prova.txt\";\n try (PrintWriter outputStream = new PrintWriter(new FileWriter(fileName))) {\n List<Libro> libroList = Biblioteca.getRepo().getListaLibri();\n Iterator<Libro> libri = libroList.iterator();\n\n while (libri.hasNext()) {\n String sLibro = convertToString(libri.next());\n outputStream.println(sLibro);\n }\n }\n }", "private void export() {\n print(\"Outputting Instructions to file ... \");\n\n // Generate instructions right now\n List<Instruction> instructions = new ArrayList<Instruction>();\n convertToInstructions(instructions, shape);\n\n // Verify Instructions\n if (instructions == null || instructions.size() == 0) {\n println(\"failed\\nNo instructions!\");\n return;\n }\n\n // Prepare the output file\n output = createWriter(\"output/instructions.txt\");\n \n // TODO: Write configuration information to the file\n \n\n // Write all the Instructions to the file\n for (int i = 0; i < instructions.size(); i++) {\n Instruction instruction = instructions.get(i);\n output.println(instruction.toString());\n }\n\n // Finish the file\n output.flush();\n output.close();\n\n println(\"done\");\n }", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "public static void save(String fn, AllSTLsToBuild allSTL)\n\t{\n\t\tif(!fn.endsWith(\".rfo\"))\n\t\t\tfn += \".rfo\";\n\t\tRFO rfo = new RFO(fn, allSTL);\n\t\trfo.copySTLs();\n\t\trfo.createLegend();\n\t\trfo.compress();\n\t\tFile t = new File(rfo.tempDir);\n\t\trecursiveDelete(t);\n\t}", "void toFile (String fileName);", "public String ToFile() {\n\t\tif (ismonitored) {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",1;\");\r\n\t\t} else {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",0;\");\r\n\t\t}\r\n\r\n\t}", "File getSaveFile();", "public void exportTMX(String path, String extention) throws IOException {\r\n\t\tStringBuilder seg1 = new StringBuilder();\r\n\t\tStringBuilder seg2 = new StringBuilder();\r\n\r\n\t\tpath = checkPath(path, extention);\r\n\r\n\t\ttry {\r\n\t\t\tOutputStream fout = new FileOutputStream(path);\r\n\t\t\tOutputStream bout = new BufferedOutputStream(fout);\r\n\t\t\tOutputStreamWriter output = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\toutput.write(\"<tmx version=\\\"1.4\\\">\\r\\n\\r\\n\");\r\n\r\n\t\t\t// ispis headera\r\n\t\t\ttemp = \"<header\\t\" + \"creationtool=\" + \"\\\"\" + \"Coral\" + \"\\\"\\r\\n\"\r\n\t\t\t\t\t+ \"\\t\" + \"creationtoolversion=\" + \"\\\"\" + \"v1.0\" + \"\\\"\\r\\n\"\r\n\t\t\t\t\t+ \"\\t\" + \"datatype=\" + \"\\\"\" + \"plaintext\" + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"segtype=\" + \"\\\"\" + \"block\" + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"adminlang=\" + \"\\\"\" + System.getProperty(\"user.language\")\r\n\t\t\t\t\t+ \"\\\"\\r\\n\" + \"\\t\" + \"srclang=\" + \"\\\"\"\r\n\t\t\t\t\t+ dataModel.getProperty(\"language1\") + \"\\\"\\r\\n\" + \"\\t\"\r\n\t\t\t\t\t+ \"o-tmf=\" + \"\\\"\" + \"xml\" + \"\\\">\\r\\n\" + \"</header>\\r\\n\\r\\n\";\r\n\t\t\toutput.write(temp);\r\n\r\n\t\t\t// body\r\n\t\t\toutput.write(\"<body>\\r\\n\");\r\n\r\n\t\t\tfor (int i = 0; i < idList1.size(); i++) {\r\n\r\n\t\t\t\tif (dataModel.getConnections(idList1.get(i)).isEmpty()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// prolazi se kroz lijevu listu\r\n\t\t\t\tif (!visited.contains(idList1.get(i))) {\r\n\t\t\t\t\t// traze se parovi od trenutnog elementa iz lijeve liste\r\n\t\t\t\t\tgoDeep(idList1.get(i));\r\n\r\n\t\t\t\t\t// vrsi se sortiranje dohvacenih parova ovisno o tome kojoj\r\n\t\t\t\t\t// listi izvorno pripadaju\r\n\t\t\t\t\t// takoder, ako se radi o visestrukim vezama elementi se\r\n\t\t\t\t\t// spajaju\r\n\t\t\t\t\tfor (int j = 0; j < tuvPair.size(); j++) {\r\n\t\t\t\t\t\tif (idList1.contains(tuvPair.get(j))) {\r\n\t\t\t\t\t\t\tseg1.append(dataModel.getElement(tuvPair.get(j))\r\n\t\t\t\t\t\t\t\t\t+ \" \");\r\n\t\t\t\t\t\t} else if (idList2.contains(tuvPair.get(j))) {\r\n\t\t\t\t\t\t\tseg2.append(dataModel.getElement(tuvPair.get(j))\r\n\t\t\t\t\t\t\t\t\t+ \" \");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// stvara se novi translation unit\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tu>\\r\\n\");\r\n\r\n\t\t\t\t\t// prethodno spojeni elementi ispisuju se u translation unit\r\n\t\t\t\t\t// variant\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tuv xml:lang=\" + \"\\\"\"\r\n\t\t\t\t\t\t\t+ dataModel.getProperty(\"language1\") + \"\\\"\"\r\n\t\t\t\t\t\t\t+ \"><seg>\" + seg1.toString().trim()\r\n\t\t\t\t\t\t\t+ \"</seg></tuv>\\r\\n\");\r\n\t\t\t\t\toutput.write(\"\\t\" + \"<tuv xml:lang=\" + \"\\\"\"\r\n\t\t\t\t\t\t\t+ dataModel.getProperty(\"language2\") + \"\\\"\"\r\n\t\t\t\t\t\t\t+ \"><seg>\" + seg2.toString().trim()\r\n\t\t\t\t\t\t\t+ \"</seg></tuv>\\r\\n\");\r\n\r\n\t\t\t\t\toutput.write(\"\\t\" + \"</tu>\\r\\n\\r\\n\");\r\n\r\n\t\t\t\t\ttuvPair.clear();\r\n\t\t\t\t\tseg1.delete(0, seg1.length());\r\n\t\t\t\t\tseg2.delete(0, seg2.length());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\toutput.write(\"</body>\");\r\n\t\t\toutput.write(\"</tmx>\");\r\n\r\n\t\t\toutput.close();\r\n\t\t\tvisited.clear();\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\t\"File could not be found!\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Verify that the file exists in the specified location.\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Check the spelling of the name of the document.\\r\\n\\r\\n\"\r\n\t\t\t\t\t\t\t+ path);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tthrow new UnsupportedEncodingException(\"Selected encoding is not supported.\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IOException(\"I/O exception has occurred.\");\r\n\t\t}\r\n\t}", "private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}", "private void exportFiles()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\t\t\n\t\t// Report String\n\t\t//----------------\n\t\tString reportString = \"Date,Location Latitude, Location Longitude,Vehicle,Description\\n\";\t\n\t\t\n\t\tStringBuilder reportBuilder = new StringBuilder();\n\t\treportBuilder.append(reportString);\n\t\t\n\t\tString objectString = \"\"+ \n\t\t\t\tincident.getDate()+\",\" +\n\t\t\t\tincident.getLatitude() + \",\" +\n\t\t\t\tincident.getLongitude()+\",\" +\n\t\t\t\tincident.getVehicleReg()+\",\" +\n\t\t\t\tincident.getDescription()+\",\" + \"\\n\";\n\t\t\n\t\treportBuilder.append(objectString);\n\t\t\n\t\t// Witnesses String\n\t\t//----------------\n\t\tString witnessString = \"witnessName,witnessEmail,witnessNumber,witnessStatement\\n\";\n\t\t\n\t\tStringBuilder witnessesBuilder = new StringBuilder();\n\t\twitnessesBuilder.append(witnessString);\n\t\t\n\t\tfor(int i=0; i<incident.getWitnesses().size(); i++)\n\t\t{\n\t\t\tobjectString = \"\"+ \n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessName\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessEmail\") + \",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessNumber\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessStatement\")+\",\" + \"\\n\";\n\t\t\t\n\t\t\twitnessesBuilder.append(objectString);\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Create file\n\t\t//===========================================\n\t\t// Incident Report\n\t\t//-------------------------------------------------\n\t\tfinal File reportFile = new File(getFilesDir() + \"/\" + \"incident_report.csv\");\n\t\treportFile.setReadable(true,false);\n\t\t\n\t\tif( reportFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"incident_report.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(reportBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Witnesses file\n\t\t//-------------------------------------------------\n\t\tfinal File witnessesFile = new File(getFilesDir() + \"/\" + \"witnesses.csv\");\n\t\twitnessesFile.setReadable(true,false);\n\t\t\n\t\tif( witnessesFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"witnesses.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(witnessesBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Media files\n\t\t//-------------------------------------------------\t\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(),new GetCallback<ParseObject>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void done(final ParseObject parseIncident, ParseException e) \n\t\t\t{\n\t\t\t\tif(e == null)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Get number of photos attached\n\t\t\t\t\tParseQuery<ParseObject> queryPhotos = parseIncident.getRelation(\"incidentPhotos\").getQuery();\n\t\t\t\t\tqueryPhotos.findInBackground(new FindCallback<ParseObject>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(List<ParseObject> parsePhotos, ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tArrayList<byte[]> bytes = new ArrayList<byte[]>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i<parsePhotos.size(); i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\t\t\tParseFile photo = (ParseFile) parsePhotos.get(i).get(\"photoFile\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbytes.add(photo.getData());\n\t\t\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\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\tphotoFiles = AssetsUtilities.saveIncidentPhoto(ReviewReportActivity.this, bytes);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Video\n\t\t\t\t\t\t\tParseFile parseVideo = (ParseFile) parseIncident.get(\"incidentVideo\");\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(parseVideo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparseVideo.getDataInBackground(new GetDataCallback()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(byte[] data, ParseException e) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(e == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Save file\n\t\t\t\t\t\t\t\t\t\t\tvideoFile = AssetsUtilities.saveIncidentVideo(ReviewReportActivity.this,data);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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\telse\n\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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}", "public void testExportToStream() throws FileNotFoundException {\n List<SheetDataDto> data = new ArrayList<SheetDataDto>();\n RowDataDto headerRow = new RowDataDto();\n headerRow.getCells().add(new CellDataDto(\"Col 1\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 2\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 3\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 4\", CellDataTypeEnum.TEXT));\n\n SheetDataDto sheet1 = new SheetDataDto();\n sheet1.setName(\"First sheet\");\n sheet1.setHeaderRow(headerRow);\n\n RowDataDto row1 = new RowDataDto();\n row1.getCells().add(new CellDataDto(1d, CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(\"IF(A2 > 0, \\\"1\\\", \\\"0\\\")\", CellDataTypeEnum.FORMULAR));\n row1.getCells().add(new CellDataDto(\"123456789\", CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(new Date(), CellDataTypeEnum.DATE));\n\n sheet1.getRows().add(row1);\n data.add(sheet1);\n\n OutputStream out1 = new FileOutputStream(new File(\"t2-out.xls\"));\n excelExportingService.exportToExcel(null, out1, data, ExcelFormatTypeEnum.XLS);\n\n InputStream in2 = getClass().getResourceAsStream(\"/exportData/t2-in.xlsx\");\n OutputStream out2 = new FileOutputStream(new File(\"t2-out.xlsx\"));\n sheet1.setName(\"Append Sheet\");\n sheet1.setSheetIndex(0);\n excelExportingService.exportToExcel(in2, out2, data, ExcelFormatTypeEnum.XLSX);\n }", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "private void exportFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdrinkListFileOutput = new BufferedWriter(new FileWriter(drinkListFile));\n\t\t\tdrinkListFileOutput.write(exportDrinkList);//insert string of drinks\n\t\t\tdrinkListFileOutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Successfully saved drinks\");\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.toString();//change this\n\t\t\tJOptionPane.showMessageDialog(null, \"Drink save error: \" + e.toString());//change this);\n\t\t}\n\n\n\n\t}", "void exportGame();", "@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}", "private Step exportSerial() {\n return stepBuilderFactory.get(STEP_CREATE_SCENARIO_METER_FILE)\n .tasklet(savingsPotentialExportMeterSerialTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n // Scenario key\n String jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialExportMeterSerialTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n\n // Set output filename\n jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialExportMeterSerialTask.EnumInParameter.OUTPUT_FILENAME.getValue();\n jobContext.put(jobContextKey, METER_SERIAL_FILENAME);\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_EXPORT_METER_DATA +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.METER_FILTER_FILENAME.getValue();\n jobContext.put(jobContextKey, METER_SERIAL_FILENAME);\n\n return null;\n }\n\n })\n .build();\n }", "public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "String saveFile(FileStoreDto dto);", "public void writeSHFP(Path outPath, OpenOption... options) throws IOException {\n // if(true)return;\n try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter(outPath))) {\n // header\n String[] header = outputDSMHeader();\n Arrays.stream(header).forEach(pw::println);\n\n // structure\n String[] structurePart = STRUCTURE.toSHlines();\n Arrays.stream(structurePart).forEach(pw::println);\n\n // source\n pw.println(EVENT.getCmtLocation().getR() + \" \" + EVENT.getCmtLocation().getLatitude() + \" \" +\n EVENT.getCmtLocation().getLongitude());\n double[] mt = EVENT.getCmt().getDSMmt();\n pw.println(Arrays.stream(mt).mapToObj(Double::toString).collect(Collectors.joining(\" \")) +\n \" Moment Tensor (1.e25 dyne cm)\");\n\n // output info\n pw.println(\"c output directory\");\n pw.println(OUTPUT + \"/\");\n pw.println(EVENT);\n pw.println(\"c events and stations\");\n\n // horizontal positions for perturbation points\n pw.println(POSITIONS.length + \" nsta\");\n Arrays.stream(POSITIONS).forEach(pp -> pw.println(pp.getLatitude() + \" \" + pp.getLongitude()));\n\n // radii for perturbation points\n pw.println(RADII.length + \" nr\");\n Arrays.stream(RADII).forEach(pw::println);\n pw.println(\"end\");\n }\n }", "public static void RDStockePEntrpot(Destination entrepot){\n File file = new File(\"src/StockeParEntrpot.txt\");\n try {\n if(!file.exists())\n file.createNewFile();\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n for(int i = 0; i < entrepot.getSize(); i++){\n if(entrepot.getDon(i).getEtat() == Etat.STOCKE) {\n System.out.println(entrepot.getDon(i));\n writer.write(entrepot.getDon(i).toString() + \"\\r\\n\");\n }\n }\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "public abstract void saveToFile(PrintWriter out);", "public void saveTemplate(String filename){\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"savingTemplate\");\n blueprint = currentTemplate.createBlueprint();\n //make sure we have correct extension\n filename = FileManager.removeExtension(filename);\n if (isInspecting){\n filename = filename + \".in\";\n } else {\n filename = filename + \".bp\";\n }\n boolean hasSaved = FileManager.createTemplate(filename, blueprint);\n if (hasSaved){\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(this, \"Did not save\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic void doSaveAs() {\n\t}", "public boolean saveSaucers(){\r\n try{\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileOutputStream fos = new FileOutputStream(file);\r\n ObjectOutputStream output = new ObjectOutputStream(fos);\r\n output.writeObject(new ArrayList<Saucer>(this.saucers));\r\n output.close();\r\n\r\n return true;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return false;\r\n }\r\n }", "public void exportPuzzle () {\r\n fileManager.exportPuzzle (puzzle);\r\n }", "private void writeFile(TimerEntity entity) {\n final File file = fileName(entity.getTimedObjectId(), entity.getId());\n\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file, false);\n final Marshaller marshaller = factory.createMarshaller(configuration);\n marshaller.start(new OutputStreamByteOutput(fileOutputStream));\n marshaller.writeObject(entity);\n marshaller.finish();\n fileOutputStream.flush();\n fileOutputStream.getFD().sync();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n if (fileOutputStream != null) {\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n logger.error(\"IOException closing file \", e);\n }\n }\n }\n }", "public static void save(String vxlFileName) {\n\t\ttry {\n\t\t\t// PrintStream file = new PrintStream(new FileOutputStream(vxlFileName, false));\n\t\t\t// file.print(vxl.toString());\n\t\t\t// file.close();\n\t\t\tOutputStream file = new FileOutputStream(vxlFileName);\n\t\t\tOutputStreamWriter bufferedWriter = new OutputStreamWriter(file, \"UTF8\");\n\t\t\tbufferedWriter.write(vxl.toString());\n\t\t\tbufferedWriter.close();\n\t\t\tclear();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\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 }", "private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}", "void save(String filename);", "public void Sauvegarder(Partie p) {\n if (SaveNum > 0 && SaveNum < 10) {\n //System.out.println(\"index ok\");\n try {\n if (erase) {\n slot[SaveNum - 1].delete();\n }\n //System.out.println(\"Try start\");\n //File f = new File(i + \".\" + p.getJoueur1().getNom() + \"-vs-\" + p.getJoueur2().getNom() + \".ser\");\n SaveName = (SaveNum - 1 + \"-\" + SaveName + \".ser\");\n File fichier = new File(SavePath + SaveName);\n FileOutputStream fos = new FileOutputStream(fichier);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //System.out.println(\"ok\");\n oos.writeObject(p);\n //System.out.println(\"ok\");\n oos.close();\n //slot[i] = fichier;\n SaveName = \"Sauvegarde\";\n //System.out.println(\"Save Done\" + SaveNum);\n SaveNum = 20;\n } catch (IOException | NullPointerException e) {\n System.out.println(\"Erreur lors de la sauvegarde du fichier\");\n }\n }\n }", "String ser(LockssSerializable o) throws Exception {\n File tf = getTempFile(\"ser\", \".xml\");\n new XStreamSerializer().serialize(tf, o);\n return StringUtil.fromFile(tf);\n }", "public void save () {\n // Make sure the workspace folder exist\n createFolder(this.pathToWorkspaceFolder);\n\n // Write the serialized Flow object\n System.out.println(\"Saving\");\n try (FileWriter file = new FileWriter(this.pathToWorkspaceFolder.toString() + \"/\" + FLOW_FILE_NAME)) {\n file.write(flow.serialize());\n System.out.println(\"Successfully Copied Flow \" + flow.getId() + \" to File :)\");\n } catch (IOException e) {\n e.printStackTrace();\n }\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 }", "public String toFile(){\n return String.format(\"%s:%s:%s:%s:%s:%s:%s\",hashIndex,id,super.toFile(), \r\n facultyAbbr.getAbbreviation(), courseName.getCourseName(),tutorialGroup,session);\r\n }", "void downloadSavi(File file, int id) throws IOException, SQLException;", "@FXML\n public void handleExport() throws Exception{\n \n Writer writer = null;\n String filename = file.getText();\n file.clear();\n \n try {\n File file = new File(filename+\".csv\");\n writer = new BufferedWriter(new FileWriter(file));\n for (MarkLayer1 mark : data) {\n\n String text = mark.getStunum()+\";\" + mark.getCoursename() + \";\" + mark.getClassM()\n + \";\"+ mark.getExam()+\";\"+mark.getFinalM()+\"\\n\";\n\n writer.write(text);\n msg.setText(\"Export Success\");\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n msg.setText(\"Error with export\");\n }\n finally {\n\n writer.flush();\n writer.close();\n } \n \n }", "public void writePSVFP(Path outPath, OpenOption... options) throws IOException {\n // if(true)return;\n try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter(outPath))) {\n // header\n String[] header = outputDSMHeader();\n Arrays.stream(header).forEach(pw::println);\n\n // structure\n String[] structurePart = STRUCTURE.toPSVlines();\n Arrays.stream(structurePart).forEach(pw::println);\n\n // source\n pw.println(EVENT.getCmtLocation().getR() + \" \" + EVENT.getCmtLocation().getLatitude() + \" \" +\n EVENT.getCmtLocation().getLongitude());\n double[] mt = EVENT.getCmt().getDSMmt();\n pw.println(Arrays.stream(mt).mapToObj(Double::toString).collect(Collectors.joining(\" \")) +\n \" Moment Tensor (1.e25 dyne cm)\");\n\n // output info\n pw.println(\"c output directory\");\n pw.println(OUTPUT + \"/\");\n pw.println(EVENT);\n pw.println(\"c events and stations\");\n\n // horizontal positions for perturbation points\n pw.println(POSITIONS.length + \" nsta\");\n Arrays.stream(POSITIONS).forEach(pp -> pw.println(pp.getLatitude() + \" \" + pp.getLongitude()));\n\n // radii for perturbation points\n pw.println(RADII.length + \" nr\");\n Arrays.stream(RADII).forEach(pw::println);\n pw.println(\"end\");\n }\n }", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void generateTts() {\n File mediaStorageDir = new File(\n Environment.getExternalStorageDirectory(),\n resources.getTtsStorageFolder());\n \n if (!mediaStorageDir.exists())\n {\n if (!mediaStorageDir.mkdirs())\n {\n Log.w(TAG, \"Failed to create mediadir\");\n }\n else\n {\n Log.d(TAG, \"Created mediadir\" + mediaStorageDir.getAbsolutePath());\n }\n }\n\n File mediaFile = new File(mediaStorageDir.getPath() + File.separator + resources.getTtsFileName());\n Log.d(TAG, \"TTS path : \" + mediaFile.getAbsolutePath());\n\n HashMap<String, String> hashTts = new HashMap<>();\n hashTts.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, \"ttsToFile\");\n t1.setSpeechRate(Float.parseFloat(resources.getTtsSpeechRate()));\n t1.synthesizeToFile(message, hashTts, mediaFile.getAbsolutePath());\n\n }", "private void backup(SubscriptionDto sDto) throws IOException {\n\t\tSystem.out.println(\"Gaurav\");\n\t\tString routePath = this.getClass().getClassLoader()\n\t\t\t\t.getResource(File.separator).getPath();\n\t\tSystem.out.println(routePath);\n\t\tString newLine = System.getProperty(\"line.separator\");\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(routePath+File.separator+\"..\"+File.separator+\"backup.txt\"), true));\n\t\tbw.write(\"Suscription Details\" + newLine);\n\t\tbw.write(\"**************************************\" + newLine);\n\t\tbw.write(\"SUBSCRIPTION ID \" + sDto.getSubscriptionId() + newLine);\n\t\tbw.write(\"CUSTOMER NAME \" + sDto.getCustomerName() + newLine);\n\t\tbw.write(\"Total Cost :\" + sDto.getTotalCost() + newLine);\n\t\tbw.write(\"-----------------------------------------------------------------------\"\n\t\t\t\t+ newLine);\n\n\t\tbw.write(\"Channel Suscribed Details\" + newLine);\n\t\tbw.write(\"**************************************\\n\" + newLine);\n\t\tbw.write(\" CHANNEL NAME | COST_PER MONTH \"\n\t\t\t\t+ newLine);\n\t\tbw.write(\"+--------------------------------------------------------------+\"\n\t\t\t\t+ newLine);\n\t\tfor (Channel c : sDto.getSubscribedChannel()) {\n\t\t\tbw.write(\"|\" + c.getChannelName() + \"\\t\\t\\t\\t | \\t\\t\\t \"\n\t\t\t\t\t+ c.getCostPerMonth() + \"\\t\\t\\t\\t\\t | \" + newLine);\n\t\t}\n\n\t\tbw.write(newLine);\n\t\tbw.write(\"-------------End---------------------\" + newLine);\n\t\tbw.close();\n\n\t}", "public void toFile(String filename) {\n\t\tString serialized = Serializer.serializeLevelPack(this);\n\t\tSerializer.writeToFile(filename, serialized.getBytes());\n\t}", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override public void outputAsSAL() throws IsabelleException, FileException { \r\n outputSAL(value.useAsSAL());\r\n }", "public void writeToServiceFile()\r\n {\r\n\ttry(ObjectOutputStream toServiceFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/servicelist.dta\")))\r\n\t{\r\n toServiceFile.writeObject(serviceList);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Service objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "@Override\r\n\tpublic void exportar(ActionEvent actionEvent) {\n\t\t\r\n\t}", "public static void saveAs(){\n\t\tFile saveFile;\n\t\tJFileChooser saveChooser = new JFileChooser();\n\t\tFileNameExtensionFilter saveFilter = new FileNameExtensionFilter(\"Sensormap Files (.stuff)\", \"stuff\");\n\t\tFileNameExtensionFilter saveFilter2 = new FileNameExtensionFilter(\"Gzipped Sensormap Files (.stuff.gz)\", \"stuff.gz\");\n\t\tsaveChooser.setFileFilter(saveFilter);\n\t\tsaveChooser.setFileFilter(saveFilter2);\n\t\tint saveReturnVal = saveChooser.showSaveDialog(ControlPanelFrame.getFrame());\n\t\tif(saveReturnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tif(saveChooser.getFileFilter() == saveFilter && saveChooser.getSelectedFile().getName().endsWith(\".stuff\")==false){\n\t\t\t\tsaveFile = new File(saveChooser.getSelectedFile().getAbsolutePath()+\".stuff\");\n\t\t\t} else if(saveChooser.getFileFilter() == saveFilter2 && saveChooser.getSelectedFile().getName().endsWith(\".stuff.gz\")==false){\n\t\t\t\tsaveFile = new File(saveChooser.getSelectedFile().getAbsolutePath()+\".stuff.gz\");\n\t\t\t} else {\n\t\t\t\tsaveFile = saveChooser.getSelectedFile();\n\t\t\t}\n\t\t\tXMLSaver.saveSensorList(saveFile);\n\t\t\tGUIReferences.viewPort.halfTitle = saveFile.getName();\n\t\t\tGUIReferences.viewPort.setTitle(saveFile.getName());\n\t\t\tGUIReferences.currentFile = saveFile;\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t}\n\t}", "public RTS_Outbytefile(final RTS_RTObject SL, final RTS_TXT FN) {\n\t\tsuper(SL, FN);\n\t}", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "private void actionTimelapseExport ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser saveFileChooser = new JFileChooser();\r\n\r\n\t\t\tFileNameExtensionFilter typeCSV = new FileNameExtensionFilter(\"CSV\", \"csv\", \"CSV\");\r\n\t\t\tsaveFileChooser.addChoosableFileFilter(typeCSV);\r\n\r\n\t\t\tFileNameExtensionFilter typeTXT = new FileNameExtensionFilter(\"TXT\", \"txt\", \"TXT\");\r\n\t\t\tsaveFileChooser.addChoosableFileFilter(typeTXT);\r\n\r\n\t\t\tsaveFileChooser.setAcceptAllFileFilterUsed(false);\r\n\t\t\tsaveFileChooser.setFileFilter(typeCSV);\r\n\r\n\t\t\tint isOpen = saveFileChooser.showOpenDialog(saveFileChooser);\r\n\r\n\t\t\tif (isOpen == JFileChooser.APPROVE_OPTION) \r\n\t\t\t{\r\n\t\t\t\tString folderPath = saveFileChooser.getSelectedFile().getPath();\r\n\t\t\t\t\r\n\t\t\t\tOutputController.exportTimelapseImage(folderPath, DataController.getTable());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@Override\n public String toFile() {\n String isDoneString = (isDone) ? \"1\" : \"0\";\n return getDescription() + \" | \" + getGrade() + \" | \" + getMc() + \" | \" + getSemester() + \" | \" + isDoneString;\n }", "public void exportResultsToFile(){\r\n\t\t\t\t\r\n\t\t// This if clause shouldn't fire as the icon is grayed out if there is no tab open\r\n\t\tif(currentView == null \r\n\t\t\t\t|| currentView.getDynamicModelView() == null \r\n\t\t\t\t|| currentView.getDynamicModelView().getModel() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open, and a model and table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(currentView.getDynamicModelView().getModel().getDefaultHistory() == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A table must be present before results can be exported\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDynamicModelHistory history = currentView.getDynamicModelView().getModel().getDefaultHistory();\r\n\r\n\t\tStringBuffer buffer = new StringBuffer(30000);\r\n\r\n\t\tif(history != null && history.getTimePointCount() > 0 && history.getSnapshot(0) != null){\r\n\t\t\r\n\t\t\t// Get the filename\r\n\t\t\tYorkGUIUtils guiUtils = new YorkGUIUtils();\r\n\t\t\tString selectedFile = guiUtils.getUserToDefineFilename(this, propertiesMemento.getBaseDir(), \"txt csv\", \"Results files (.txt, .csv)\", JFileChooser.SAVE_DIALOG);\r\n\r\n\t\t\tif(selectedFile == null || guiUtils.wasCancelled()){\r\n\t\t\t\trequestFocusInWindow();\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\t\r\n\t\t\tlogger.info(\"Selected file for exporting results:\" + selectedFile);\r\n\t\t\r\n\t\t\tbuffer.append(\"time point\").append(\"\\t\");\r\n\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\tbuffer.append(t).append(\"\\t\");\r\n\t\t\t}\r\n\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(Iterator<String> it = history.getSnapshot(0).keySet().iterator(); it.hasNext();){\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\tbuffer.append(name).append(\"\\t\");\r\n\t\t\t\t// For all time points\r\n\t\t\t\tfor(int t = 0; t < history.getTimePointCount(); t++){\r\n\t\t\t\t\tbuffer.append(history.getSnapshot(t).get(name).getOutputValue()).append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t}\r\n\t\t\tFileLoader.save(selectedFile, buffer.toString());\r\n\t\t}\r\n\t\telse{\r\n\t\t\tJOptionPane.showMessageDialog(this, \"No results available in the selected tab. Run the model first.\", \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Action(semantics = SemanticsOf.SAFE)\n public Blob download() {\n final String fileName = \"TurnoverRentBulkUpdate-\" + getProperty().getReference() + \"@\" + getYear() + \".xlsx\";\n final List<LeaseTermForTurnOverRentFixedImport> lineItems = getTurnoverRentLines();\n return excelService.toExcel(lineItems, LeaseTermForTurnOverRentFixedImport.class,\n LEASE_TERM_FOR_TURNOVER_RENT_SHEET_NAME, fileName);\n }", "void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}", "void save(String fileName);", "public void export(String ZUGFeRDfilename) throws IOException {\n\t\tif (!documentPrepared) {\n\t\t\tprepareDocument();\n\t\t}\n\t\tif ((!fileAttached) && (attachZUGFeRDHeaders)) {\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"File must be attached (usually with setTransaction) before perfoming this operation\");\n\t\t}\n\t\tdoc.save(ZUGFeRDfilename);\n\t\tif (!disableAutoClose) {\n\t\t\tclose();\n\t\t}\n\t}", "private void export(ActionEvent actionEvent) {\n if (this.totalCycles == -1) {\n var result = JOptionPane.showConfirmDialog(this, \"The run is not finished yet. Are you sure you want to proceed?\",\n \"Unfinished run\", JOptionPane.YES_NO_CANCEL_OPTION);\n\n if (result == JOptionPane.NO_OPTION) {\n return;\n }\n }\n\n // File dialog to save the history\n var fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getName().endsWith(\".json\");\n }\n\n @Override\n public String getDescription() {\n return \"*.json\";\n }\n });\n\n fileChooser.setAcceptAllFileFilterUsed(false);\n fileChooser.setCurrentDirectory(new File(Variables.OUTPUT_PATH));\n var resultDialog = fileChooser.showSaveDialog(this);\n\n if (resultDialog == JFileChooser.APPROVE_OPTION) {\n var file = fileChooser.getSelectedFile();\n\n if (!file.getName().endsWith(\".json\")) {\n file = new File(file.getAbsolutePath() + \".json\");\n }\n if (file.exists()) {\n var sure = JOptionPane.showConfirmDialog(this, \"File already exists. Overwrite?\",\n \"Overwrite file?\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\n if (sure != JOptionPane.YES_OPTION) {\n return;\n }\n }\n\n this.saveHistoryToFile(file);\n }\n }", "public static void savewtg() throws FileNotFoundException {\n String fileName = \"./outputFiles/wtgVector.txt\";\n PrintWriter pw = new PrintWriter(new FileOutputStream(fileName));\n for (Map.Entry<String,List<Double>> entry : wtgMap.entrySet()){\n pw.println(entry.getKey() + \"-> \" + entry.getValue());\n }\n pw.close();\n }", "private void save()\n\t{\n\t\t//get the text\n\t\tString spssTxt = spssText.getText();\n\t\t//save it to a JS place where Java can find it\n\t\tsaveToJS(spssTxt);\n\t\t//make up a file name\n\t\tString fileName = form.getText().replace(\" \", \"_\").replace(\"\\\\\", \"\").replace(\"/\",\"\").replace(\"*\", \"\").replace(\"\\\"\", \"\")\n\t\t\t\t.replace(\"<\", \"\").replace(\">\", \"\").replace(\"#\", \"\").replace(\"'\", \"\") + \".spss\";\t\t\n\t\t\n\t\t\n\t\t\n\t\tappletHtml.setHTML(\"<APPLET codebase=\\\"fileioapplets/\\\"+\" +\n\t\t\t\t\" archive=\\\"kobo_fileIOApplets.jar, plugin.jar\\\" \"+\n\t\t\t\t\" code=\\\"org.oyrm.kobo.fileIOApplets.ui.FileSaveApplet.class\\\" \"+\n\t\t\t\t\" width=\\\"5\\\" HEIGHT=\\\"5\\\" MAYSCRIPT> \"+\n\t\t\t\t\"<param name=\\\"formName\\\" value=\\\"\"+fileName+\"\\\"/>\"+\n\t\t\t\t\"<param name=\\\"save\\\" value=\\\"\"+LocaleText.get(\"SaveSPSSFile\")+\"\\\"/>\"+\n\t\t\t\t\"</APPLET>\");\n\t}", "@FXML\n private void saveFile() {\n FileHandler.saveFileData(stage, dRegister);\n }", "@Override\n protected String getExportFileType() {\n return null;\n }", "@Override\n protected String getExportFileType() {\n return null;\n }", "@Override\n protected String getExportFileType() {\n return null;\n }", "public void outputToFile(String filemame)\n {\n }", "public void saveToFile(File outputFile) throws IOException {\n PrintWriter writer = new PrintWriter(outputFile);\n\n writer.write(\"# Exported by FrogLord\" + Constants.NEWLINE);\n for (Tuple3<Float, Float, Float> vertex : this.vertices)\n writer.write(\"v \" + vertex.getA() + \" \" + vertex.getB() + \" \" + vertex.getC() + Constants.NEWLINE);\n\n for (Tuple2<Float, Float> normal : this.normals)\n writer.write(\"vt \" + normal.getA() + \" \" + normal.getB() + Constants.NEWLINE);\n\n writer.close();\n }", "private void batchExport(){\r\n \t \t\r\n \t// Retrieve all the rsml files\r\n \tFile f = new File(batchSourceFolder.getText());\r\n \tFile[] rsml = f.listFiles(new FilenameFilter() {\r\n \t\tpublic boolean accept(File directory, String fileName) {\r\n \t\t\treturn fileName.endsWith(\".rsml\");\r\n \t\t}\r\n \t});\r\n \t \t\r\n \tif(rsml.length < 100){\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel[] models = new RootModel[rsml.length];\r\n\t \tint w = 0; int h = 0;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodels[i] = new RootModel(rsml[i].getAbsolutePath());\r\n\t \t \t\tif(models[i].getWidth(true) > w) w = models[i].getWidth(true);\r\n\t \t \t\tif(models[i].getHeight(true) > h) h = models[i].getHeight(true);\r\n\t \t \t}\r\n\t \t \t\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t \tImageStack is= new ImageStack(w, h);\r\n\t \t \r\n\t \t \r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\t// Send the imagr to the stack\r\n\t \t \t\tif(batchImage.isSelected()) {\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), w, h, batchConvex.isSelected())); \r\n\t \t \t\t\tis.addSlice(ip.getProcessor());\r\n\t \t \t \t\t// Save a single image\r\n\t \t \t \t\tif(batchSave.isSelected()){\r\n\t \t \t \t\t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\r\n\t \t \t \t\t}\r\n\t \t \t\t}\r\n\t\t \t \tif(!batchImage.isSelected() && batchSave.isSelected()){\r\n\t\t \t \t\tSR.write(rsml[i].getName());\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),models[i].createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: models[i].sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: models[i].sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: models[i].sendNodeData(rt, rsml[i].getName()); break;\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 \tif(batchResults.isSelected()) rt.show(batchJCB.getSelectedItem().toString()+\" data\");\r\n\t \t \tif(batchImage.isSelected()){\r\n\t \t \t\tImagePlus ip = new ImagePlus(\"RSML images\");\r\n\t \t \t\tip.setStack(is);\r\n\t \t \t\tip.show();\r\n\t \t \t}\t\t\t\r\n \t}\r\n \telse{\r\n\t \tSR.write(\"Batch export started for \"+rsml.length+\" files\");\r\n\t \t \tResultsTable rt = new ResultsTable();\r\n\t \t// Open the different RSML files, retriev their data and get their size.\r\n\t \tRootModel model;\r\n\t \t \tfor(int i = 0; i < rsml.length; i++){\r\n\t \t \t\tmodel = new RootModel(rsml[i].getAbsolutePath());\r\n\t\t \t \tif(batchSave.isSelected()){\r\n\t \t \t\t\tImagePlus ip = new ImagePlus(rsml[i].getName(),model.createImage(batchColorJCB.getSelectedIndex() == 0, Integer.valueOf(batchLineWidth.getText()), batchRealWidth.isSelected(), batchConvex.isSelected())); \r\n\t\t \t \t\tIJ.save(ip, this.batchSourceFolder.getText()+\"/images/\"+rsml[i].getName()+\".jpg\");\r\n\t\t \t \t}\t \t \t\t\r\n\t \t \t\t\r\n\t \t \t\t// Send the results to the Result Table\r\n\t \t \t\tif(batchResults.isSelected()){\r\n\t \t \t\t\tint sel = batchJCB.getSelectedIndex();\r\n\t \t \t\t\tswitch (sel) { \r\n\t \t \t\t\t\tcase 0: model.sendImageData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 1: model.sendRootData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t\tcase 2: model.sendNodeData(rt, rsml[i].getName()); break;\r\n\t \t \t\t\t}\r\n\t \t \t\t}\r\n\t \t \t}\r\n \t\trt.show(batchJCB.getSelectedItem().toString());\r\n \t}\r\n \t\r\n \t \tSR.write(\"Export done for \"+rsml.length+\" files\"); \r\n }", "@FXML\r\n\tpublic void save() {\r\n\t\ttry {\r\n\t\t\tFile copy = new File(fileName.getText());\r\n\t\t\tScanner fileIn = new Scanner(result.getText());\r\n\t\t\tPrintStream fileOut = new PrintStream(copy);\r\n\r\n\t\t\twhile (fileIn.hasNextLine()) {\r\n\t\t\t\tfileOut.print(fileIn.nextLine());\r\n\t\t\t}\r\n\r\n\t\t\tfileIn.close();\r\n\t\t\tfileOut.close();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void export(URNspec urn, HashMap mapDiagrams, FileOutputStream fos) throws InvocationTargetException {\n\t}", "@Override\n\t\t\tpublic Result createOutput(String ns, String file)\n\t\t\t\t\tthrows IOException {\n\t\t\t\tStreamResult res = new StreamResult(writer);\n\t\t\t\tres.setSystemId(\"no-id\");\n\t\t\t\treturn res;\n\t\t\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 }", "void export(String path, Events<?> events);", "private static void writeFile(String name, Trajectory t) {\n\t\ttry {\n\t\t\tFile directory = new File(cacheDirectory);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tconsole.log(\"missing dir, making\");\n\t\t\t\tdirectory.mkdir();\n\t\t\t}\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(cacheDirectory + name);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t oos.writeObject(t);\n\t\t oos.close();\n\t\t fos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t}", "public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }", "public String getExportMimeType(){\n return \"text/plain\";\n }", "private void exportarDatos() {\r\n // Cabecera\r\n System.out.println(\"Exportación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (PrintWriter pr = new PrintWriter(DEF_NOMBRE_FICHERO)) {\r\n // Bucle de Escritura\r\n for (Item item : CARRITO) {\r\n // Generar Linea de Texto\r\n String linea = String.format(Locale.ENGLISH, \"%d%s%s%s%.2f%s%s\",\r\n item.getId(), REG_CSV_ESCR,\r\n item.getNombre(), REG_CSV_ESCR,\r\n item.getPrecio(), REG_CSV_ESCR,\r\n UtilesGraficos.obtenerNombreColor(item.getColor()));\r\n\r\n // Item > Fichero\r\n pr.println(linea);\r\n }\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos exportados 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 SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }", "static void saveMeta() {\n File dir = new File(\"./plugins/SkyblockShop/\");\n if (!dir.exists()) {if (!dir.mkdir()) { System.out.println(\"Failed to create SkyblockShop directory!\");}}\n\n //save 'money' to .meta file\n try {\n PrintWriter writer = new PrintWriter(\"./plugins/SkyblockShop/.meta\", \"UTF-8\");\n writer.println(Main.money);\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"Something went wrong while creating the .meta file!\");\n }\n }", "public abstract String FileOutput();", "private void saveUCSC() throws FileNotFoundException, IOException {\n\t\tString name = Misc.removeExtension(bedFile.getName());\n\t\tFile ucscFile = new File (bedFile.getParentFile(), name+\".ucsc.gz\");\n\t\tGzipper out = new Gzipper( ucscFile);\n\t\tfor (String chr: chromGenes.keySet()) {\n\t\t\tfor (UCSCGeneLine ugl: chromGenes.get(chr)) {\n\t\t\t\tout.println(ugl.toUCSC());\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tIO.pl(\"\\nSaved \"+ucscFile);\n\t\t\n\t}", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"client-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "public void exportToFile(Grid grid, String filePath) throws IOException {\n\n File file = new File(filePath);\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file);\n writeGridAndCloseStream(grid, fileOutputStream);\n \n if (this instanceof EsriASCIIGridExporter) {\n WKTProjectionFile.write(grid.getPrjFileContent(), filePath);\n }\n } catch (Exception exc) {\n // Delete the file if an exception is thrown. Before the file can be \n // deleted, the output stream needs to be closed.\n closeQuietly(fileOutputStream);\n fileOutputStream = null;\n if (file.exists()) {\n file.delete();\n }\n throw exc;\n } finally {\n closeQuietly(fileOutputStream);\n\n // delete the file if the user cancelled the operation\n if (progressIndicator != null\n && progressIndicator.isCancelled()) {\n if (file.exists()) {\n file.delete();\n }\n }\n }\n }", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "private void printFile(Products print, String ufilename) {\n\t\tFile file = new File(\"output\"+File.separator+ufilename+fileId+\".xml\"); \n\t\tSystem.out.println(\"Exporting : \"+ file);\n\t\tJAXBContext jaxbContext;\n\t\ttry {\n\t\t\tjaxbContext = JAXBContext.newInstance(Products.class); \n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\n\t\t\tjaxbMarshaller.setProperty(\"com.sun.xml.internal.bind.xmlHeaders\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);\n\t\t\tjaxbMarshaller.marshal(print, file); // prints the file\n\t\t\t// \t\t jaxbMarshaller.marshal(products, System.out);\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void export(Tensor tensor, String filterType, int index, int radius, SmoothingKernel smoothingKernel) throws IOException {\n try (FileWriter writer = new FileWriter(\"030619_\" + filterType + \"_\" + smoothingKernel.toString() + \"_\" + radius + \"_\" + index + \".csv\")) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < tensor.length(); i++) {\n sb.append(tensor.get(i).Get(0).toString());\n sb.append(\",\");\n sb.append(tensor.get(i).Get(1).toString());\n sb.append(\",\");\n sb.append(tensor.get(i).Get(2).toString());\n sb.append(\"\\n\");\n }\n writer.write(sb.toString());\n }\n }", "public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.getFilename();\n dstFile = new File(outputFile);\n if (!new File(fileInfo.getDestinationDirectory()).exists()) { //si le fichier n'existe pas\n new File(fileInfo.getDestinationDirectory()).mkdirs(); //creation du fichier\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData()); //ecrire les données dans le fichier\n fos.flush();\n fileInfo.setFileData(null);\n System.gc();\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n\n } else if (dstFile.lastModified() < fileInfo.getModifier()) { //si le fichier existe et que c'est une nouvelle version alors\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData());\n fos.flush();\n fileInfo.setFileData(null);\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(RecevoirFichier.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.61432517", "0.59426624", "0.56408376", "0.5593061", "0.5550418", "0.5460113", "0.54494035", "0.5405103", "0.5370357", "0.5366678", "0.53499836", "0.53424656", "0.53193134", "0.5318653", "0.5314959", "0.53107893", "0.5308951", "0.5292381", "0.5274626", "0.525102", "0.5239812", "0.5233039", "0.52325773", "0.5230517", "0.52270865", "0.5217358", "0.5216199", "0.52002424", "0.51980567", "0.5192385", "0.5187456", "0.51859045", "0.5171369", "0.51682097", "0.51658636", "0.51501036", "0.5147774", "0.51472735", "0.51325446", "0.5132176", "0.512354", "0.5117788", "0.5114227", "0.5109788", "0.5109301", "0.5107137", "0.5106493", "0.51025295", "0.5089781", "0.5086663", "0.50772893", "0.5072549", "0.50682485", "0.50669277", "0.5063304", "0.50596786", "0.50543845", "0.5054111", "0.5049468", "0.50489837", "0.50414765", "0.5039681", "0.50354195", "0.5030669", "0.50304747", "0.50287443", "0.50281084", "0.50251794", "0.50221115", "0.5013774", "0.50132227", "0.501316", "0.5010179", "0.5009341", "0.50091434", "0.50091434", "0.50091434", "0.5004644", "0.5003279", "0.49979877", "0.49976915", "0.4997648", "0.4993072", "0.49862665", "0.4985796", "0.49849308", "0.49770132", "0.49744564", "0.49744523", "0.49712342", "0.496198", "0.4958152", "0.4957976", "0.49548474", "0.4954721", "0.49543262", "0.49539444", "0.4952671", "0.49491027", "0.49402854" ]
0.525263
19
base case: verify that a word, a whitespace token, and a punctuation mark each count as one token
"@Test\n\tpublic void testParse() {\n\t\tSentence s = new Sentence();\n\t\ts.parseSentence(BASE_STRI(...TRUNCATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["public static void checkPunctuation(List<Token> token) {\r\n\t\tfor (Token tk : token) {\r\n\t\t\t(...TRUNCATED)
["0.69662774","0.6747211","0.6424397","0.640992","0.6175242","0.5913263","0.5903798","0.5858258","0.(...TRUNCATED)
0.0
-1
Interface to be used while getting the section type of the item
public interface Item { boolean isSection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["public String getSectionType() {\n\treturn sectionType;\n }","SectionType createSectionType();"(...TRUNCATED)
["0.73157513","0.6732766","0.66432995","0.6617953","0.64287835","0.63825434","0.6362256","0.6280955"(...TRUNCATED)
0.67849755
1
private void signSetter(String[] lines, Player p, Block s)
"private void signSetter(Block b, Player p, String[] lines) \n\t{\t\t\n\t\t//TODO: virer debug\n\t\t(...TRUNCATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["void updateSignToPlayer(Player player, Location location, String[] lines);","public void setChest((...TRUNCATED)
["0.75891334","0.63917273","0.61865866","0.6100723","0.60475695","0.58892536","0.58086187","0.574983(...TRUNCATED)
0.83206785
0
TODO virer debug p.sendMessage(plugin.chatPrefix + "displaySignInfo");
"public void displaySignInfo(Block b, Player p) \n\t{\n\t\t\n\t\tBoutiqueSign bs = getBoutiqueSign(b(...TRUNCATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showSignature() {\n\t\tBaseResponse(...TRUNCATED)
["0.64014196","0.59764016","0.5920605","0.5916014","0.5915829","0.5879527","0.5822003","0.5818665","(...TRUNCATED)
0.7373652
0
Double costAmount = bs.getMoneyTo();
"public boolean getDonation(BoutiqueSign bs, Player p)\n\t{\n\t\t\n\t\tString signOwner = bs.getOwne(...TRUNCATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["double getMoney();","public Money getCost(){\r\n return this.cost;\r\n }","org.adscale.f(...TRUNCATED)
["0.76533526","0.7470142","0.72322387","0.7154191","0.7131233","0.7111577","0.70155936","0.69375885"(...TRUNCATED)
0.0
-1
TODO Autogenerated method stub
public void saveGlobalSigns() { plugin.fileio.saveGlobalSigns(); }
{ "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(...TRUNCATED)
["0.6671074","0.6567672","0.6523024","0.6481211","0.6477082","0.64591026","0.64127725","0.63762105",(...TRUNCATED)
0.0
-1
/ Enregistre le coffre pour un BoutiqueSignChest
"public void setChest(Block sign, Chest chest, Player p)\n\t{\n\t\tBoutiqueSign bs = this.getBoutiqu(...TRUNCATED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
["@RequiresApi(api = Build.VERSION_CODES.M)\n private void enregistrerCours()\n {\n cou(...TRUNCATED)
["0.68283004","0.584956","0.57410794","0.57351005","0.57296467","0.5677461","0.5673804","0.5672335",(...TRUNCATED)
0.6351957
1

No dataset card yet

Downloads last month
218